# Linear Maps and Matrices

Aug-Nov 2020

## Recap

• Vector space $V$ over a scalar field $F$
• $F$: real field $\mathbb{R}$ or complex field $\mathbb{C}$ in this course
• Linear combinations
• $a_1v_1+a_2v_2+\cdots$ for $v_i\in V$ and $a_i\in F$
• Span$(v_1,\ldots,v_n)$
• All linear combinations
• Subspace
• Subset closed under linear combinations
• Linearly independent set of vectors
• No non-trivial linear combination is zero
• Sums, direct sums
• Given a subspace $U$, there is a subspace $W$ such that $V=U\oplus W$
• Gaussian elimination
• Find linear dependence by reducing a set of vectors to echelon form

## Functions or maps

• Functions or maps from real numbers to real numbers
• Express relationships between quantities and understand underlying mechanisms
• Linear function: one quantity increases proportionally with another
• Quadratic, polynomial, exponential, logarithmic, trigonometric etc.
• Most common and simplest starting point is a linear function
• Functions or maps from vectors to vectors
• Express and understand relationships between multiple related physical quantities
• Linear maps: most important class and simplest starting point
• This course: we focus on algebra of linear maps
• Very little (or no) emphasis on physical aspects of the maps
• We will study how linear maps operate on vectors and try to simplify/classify them

## Linear maps

$V,W$: Two vector spaces

A linear map from $V$ to $W$ is a function $T:V\to W$ satisfying the following two properties:

1. Additivity: $T(u+v) = Tu + Tv$ for $u,v\in V$

2. Homogeneity: $T(\lambda v) = \lambda Tv$ for $\lambda\in F$, $v\in V$

For $a,b\in F$ and $u,v\in V$, $T(au+bv) = aT(u)+bT(v)$

Linear maps preserve linear combinations

## Examples of linear maps

Trivial, but important

• zero, denoted $0$, from $V$ to $W$
• $0(v)=0$ or $0v=0$ for all $v\in V$
• $0$ denotes multiple things in the definition above
• identity, denoted $1$, from $V$ to $V$
• $1(v)=v$ or $1v=v$ for all $v\in V$

Polynomials: $P(\mathbb{R})$, denotes polynomials with real coefficients

• differentiation, denoted $D$, from $P(\mathbb{R})\to P(\mathbb{R})$
• $D(p(x)) = p'(x)$, which is the usual derivative
• Why linear? $(p+q)'=p'+q'$ and $(\lambda p)'=\lambda p'$
• integration, defined as $Tp=\int_0^1 p(x)dx$, from $P(\mathbb{R})\to\mathbb{R}$
• Integration is linear
• multiplication by $x^2$, defined as $(Tp)(x)=x^2 p(x)$, from $P(\mathbb{R})\to P(\mathbb{R})$
• Check linearity

## Maps from $F^n\to F^m$

• $T(x)=4x$ from $F\to F$

• $T(x)=4x+3$ from $F\to F$

• $T(x,y)=3x+4y$ from $F^2\to F$

• $T(x,y)=(3x+4y,5x-7y)$ from $F^2\to F^2$

• $T(x,y)=(3x+4y+5xy,5x-7y+2)$ from $F^2\to F^2$

• $T(x,y,z)=(3x+4y+z,5x-7y-2z,9x+2y-4z)$ from $F^3\to F^3$

## Linear maps and basis

Suppose $T:V\to W$ is a linear map and $V$ is finite-dimensional with a basis $\{v_1,v_2,\ldots,v_n\}$.

$T$ is fully defined by specifying $T(v_1),T(v_2),\ldots,T(v_n)$.

Proof

• Any $v\in V$ can be written as $v=a_1v_1+\cdots+a_nv_n$, $a_i\in F$
• So, $T(v)=a_1T(v_1)+\cdots+a_nT(v_n)$

In other words, for any $n$ vectors $w_1,\ldots,w_n\in W$ and a basis $\{v_1,v_2,\ldots,v_n\}$ of $V$, there is a linear map $T:V\to W$ such that $T(v_i)=w_i$.

## Matrix representation of a linear map

Suppose $T:V\to W$ is a linear map, $V$ is finite-dimensional with a basis $\{v_1,\ldots,v_n\}$ and $W$ is finite-dimensional with a basis $\{w_1,\ldots,w_m\}$.

Let $T(v_j)=A_{1j}w_1+\cdots+A_{mj}w_m$, where $A_{ij}\in F$ for $i=1,\ldots,m$, $j=1,\ldots,n$. The scalars $A_{ij}$ fully specify the linear map $T$ under the given bases for $V$ and $W$.

They are written in matrix form as $\begin{bmatrix} A_{11}&A_{12}&\cdots&A_{1n}\\ A_{21}&A_{22}&\cdots&A_{2n}\\ \vdots&\vdots&\vdots&\vdots\\ A_{m1}&A_{m2}&\cdots&A_{mn} \end{bmatrix}.$

## Examples: $F^n\to F^m$, standard bases

• $T(x)=4x$ from $F\to F$

• $T(1)=4$, Matrix: $[4]$
• $T(x,y)=3x+4y$ from $F^2\to F$

• $T(1,0)=3$, $T(0,1)=4$.

• Matrix: $[3\ \ 4]$.

• $T(x,y)=(3x+4y,5x-7y)$ from $F^2\to F^2$

• $T(1,0)=(3,5)$, $T(0,1)=(4,-7)$.

• Matrix: $\begin{bmatrix}3&4\\5&-7\end{bmatrix}$.

• $T(x,y,z)=(3x+4y+z,5x-7y-2z,9x+2y-4z)$ from $F^3\to F^3$

• $T(1,0,0)=(3,5,9)$, $T(0,1,0)=(4,-7,2)$, $T(0,0,1)=(1,-2,-4)$.

• Matrix: $\begin{bmatrix}3&4&1\\5&-7&-2\\9&2&-4\end{bmatrix}$.

## Simple modelling example

Variables

• $x_1$: number of people in India who got flu in 2020
• $y_1$: number of people in India who did not get flu in 2020
• $x_2$: number of people in India who will get flu in 2021
• $y_2$: number of people in India who will not get flu in 2021

Model

• Incidence of flu in people who already got flu in the previous year: 10%
• Incidence of flu in people who have not gotten flu in the previous year: 30%
• Overall population change is insignificant

Equations

\begin{align} x_2 &= 0.1 x_1 + 0.3 y_1\\ y_2 &= 0.9 x_1 + 0.7 y_1 \end{align}

Linear map and matrix

$T(x,y)=(0.1x+0.3y,0.9x+0.7y)$

$\begin{bmatrix} 0.1&0.3\\ 0.9&0.7 \end{bmatrix}$