Type a command or search the notes. Tab cycles completions. Up and down recall history when blank. Escape dismisses, then leaves the prompt.
MATH
[1251]

Geometric examples

Matrix maps, scaling, reflections, rotations, dot products, projections and a translation non-example.

This page reads linear maps geometrically, through the points, lines and directions they move in R2\mathbb R^2 and R3\mathbb R^3. It first shows that linear maps between these spaces are exactly matrix maps, then works through scaling, reflections, rotations and projections.

[DEFINITION]

Linear map

Let VV and WW be vector spaces over the same field FF. A function T:V→WT:V\to W is a linear map if

T(u+v)=T(u)+T(v)for all u,v∈V,T(u+v)=T(u)+T(v)\qquad\text{for all }u,v\in V, T(ωu)=ωT(u)for all ω∈F, u∈V.T(\omega u)=\omega T(u)\qquad\text{for all }\omega\in F,\ u\in V.

Matrix maps and standard coordinates

Multiplication by a fixed matrix is a linear map. In standard coordinates, the columns of the matrix are the images of the standard basis vectors.

[THEOREM]

Matrix maps are linear

For every m×nm\times n matrix AA, the map

TA:Rn→Rm,TA(x)=AxT_A:\mathbb R^n\to\mathbb R^m,\qquad T_A(x)=Ax

is linear.

[PROOF]

For x,y∈Rnx,y\in\mathbb R^n and λ∈R\lambda\in\mathbb R,

TA(x+y)=A(x+y)=Ax+Ay=TA(x)+TA(y),T_A(x+y)=A(x+y)=Ax+Ay=T_A(x)+T_A(y),

and

TA(λx)=A(λx)=λAx=λTA(x).T_A(\lambda x)=A(\lambda x)=\lambda Ax=\lambda T_A(x).

Thus TAT_A satisfies both conditions in the definition of a linear map.

[EXAMPLE]

Reading a matrix map in coordinates

For

A=(a11a12a13a21a22a23),A= \begin{pmatrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23} \end{pmatrix},

the associated map TA:R3→R2T_A:\mathbb R^3\to\mathbb R^2 is

TA(x1x2x3)=(a11x1+a12x2+a13x3a21x1+a22x2+a23x3).T_A\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix} = \begin{pmatrix} a_{11}x_1+a_{12}x_2+a_{13}x_3\\ a_{21}x_1+a_{22}x_2+a_{23}x_3 \end{pmatrix}.

The matrix columns give the images of the standard basis vectors, so the coordinate formula is determined by those three images.

The converse also holds: by the basis-data principle, every linear map Rn→Rm\mathbb R^n\to\mathbb R^m is a matrix map.

[THEOREM]

The matrix of a linear map on standard coordinates

Let T:Rn→RmT:\mathbb R^n\to\mathbb R^m be a linear map and let e1,…,ene_1,\ldots,e_n be the standard basis vectors of Rn\mathbb R^n. If AA is the m×nm\times n matrix whose jjth column is T(ej)T(e_j), then

T(x)=AxT(x)=Ax

for every x∈Rnx\in\mathbb R^n. Thus every linear map from Rn\mathbb R^n to Rm\mathbb R^m is represented by a matrix.

[PROOF]

Write x=x1e1+⋯+xnenx=x_1e_1+\cdots+x_ne_n. Preservation of finite linear combinations gives

T(x)=x1T(e1)+⋯+xnT(en).T(x)=x_1T(e_1)+\cdots+x_nT(e_n).

These vectors are exactly the columns of AA, so the right-hand side is AxAx.

[EXAMPLE]

Constructing the matrix from a formula

Suppose

T(x1x2x3)=(x2+x3x1+x2).T\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix} = \begin{pmatrix}x_2+x_3\\x_1+x_2\end{pmatrix}.

Evaluating at the standard basis vectors gives

T(100)=(01),T(010)=(11),T(001)=(10).T\begin{pmatrix}1\\0\\0\end{pmatrix} = \begin{pmatrix}0\\1\end{pmatrix}, \qquad T\begin{pmatrix}0\\1\\0\end{pmatrix} = \begin{pmatrix}1\\1\end{pmatrix}, \qquad T\begin{pmatrix}0\\0\\1\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix}.

Therefore

A=(011110),A= \begin{pmatrix} 0&1&1\\ 1&1&0 \end{pmatrix},

whose columns reproduce the given coordinate formula.

Matrix representations extends this construction to arbitrary bases. Changing the basis changes the entries of the matrix, but not the underlying map.

Scaling and reflections

Diagonal matrices show how separate coordinate directions can be stretched or reversed.

[EXAMPLE]

Scaling in R2\mathbb R^2

For fixed positive factors λx,λy\lambda_x,\lambda_y, the map

(xy)⟼(λxxλyy)\begin{pmatrix}x\\y\end{pmatrix} \longmapsto \begin{pmatrix}\lambda_xx\\\lambda_yy\end{pmatrix}

has matrix

(λx00λy).\begin{pmatrix} \lambda_x&0\\ 0&\lambda_y \end{pmatrix}.

The two coordinate directions are scaled independently. Each axis is sent to itself: (x,0)(x,0) is sent to (λxx,0)(\lambda_xx,0) and (0,y)(0,y) to (0,λyy)(0,\lambda_yy). Any other line through the origin is sent to a line through the origin, but its slope can change unless λx=λy\lambda_x=\lambda_y.

[EXAMPLE]

Reflections in R2\mathbb R^2

Reflection in the xx-axis and reflection in the yy-axis are respectively

(xy)⟼(x−y),(xy)⟼(−xy),\begin{pmatrix}x\\y\end{pmatrix} \longmapsto \begin{pmatrix}x\\-y\end{pmatrix}, \qquad \begin{pmatrix}x\\y\end{pmatrix} \longmapsto \begin{pmatrix}-x\\y\end{pmatrix},

with matrices

(100−1),(−1001).\begin{pmatrix}1&0\\0&-1\end{pmatrix}, \qquad \begin{pmatrix}-1&0\\0&1\end{pmatrix}.

Rotations

A rotation turns every vector through the same angle about the origin and it is linear.

[EXAMPLE]

Rotation about the origin

Write (x,y)=(rcos⁡φ,rsin⁡φ)(x,y)=(r\cos\varphi,r\sin\varphi). A counterclockwise rotation through θ\theta sends the angle φ\varphi to φ+θ\varphi+\theta. The angle-addition identities give

(xy)⟼(cos⁡θ−sin⁡θsin⁡θcos⁡θ)(xy).\begin{pmatrix}x\\y\end{pmatrix} \longmapsto \begin{pmatrix} \cos\theta&-\sin\theta\\ \sin\theta&\cos\theta \end{pmatrix} \begin{pmatrix}x\\y\end{pmatrix}.

Explicitly,

rcos⁡(φ+θ)=rcos⁡φcos⁡θ−rsin⁡φsin⁡θ=xcos⁡θ−ysin⁡θ,r\cos(\varphi+\theta)=r\cos\varphi\cos\theta-r\sin\varphi\sin\theta =x\cos\theta-y\sin\theta,

and similarly the second coordinate is xsin⁡θ+ycos⁡θx\sin\theta+y\cos\theta. So the signs and the placement of sin⁡θ\sin\theta in the matrix are forced by these identities, not a convention to memorise.

The first column is the image of (1,0)T(1,0)^T, namely (cos⁡θ,sin⁡θ)T(\cos\theta,\sin\theta)^T and the second is the image of (0,1)T(0,1)^T, namely (−sin⁡θ,cos⁡θ)T(-\sin\theta,\cos\theta)^T.

Under the identification C≅R2\mathbb C\cong\mathbb R^2, write z=x+iy=reiφz=x+iy=re^{i\varphi}. Multiplication by eiθe^{i\theta} gives

eiθz=rei(φ+θ)=(xcos⁡θ−ysin⁡θ)+i(xsin⁡θ+ycos⁡θ),e^{i\theta}z =re^{i(\varphi+\theta)} =(x\cos\theta-y\sin\theta) +i(x\sin\theta+y\cos\theta),

so the real and imaginary parts are the two coordinates produced by the rotation matrix. Polar form and the matrix describe the same rotation.

[EXAMPLE]

Reflection in a line through the origin

More generally, reflection in a line through the origin making angle ϕ\phi with the positive xx-axis has matrix

(cos⁡(2ϕ)sin⁡(2ϕ)sin⁡(2ϕ)−cos⁡(2ϕ)).\begin{pmatrix} \cos(2\phi)&\sin(2\phi)\\ \sin(2\phi)&-\cos(2\phi) \end{pmatrix}.

Setting ϕ=0\phi=0 gives reflection in the xx-axis, while ϕ=π/2\phi=\pi/2 gives reflection in the yy-axis.

To derive the formula, observe that a vector at angle θ\theta reflects to angle 2ϕ−θ2\phi-\theta. Applying the cosine and sine subtraction identities to this new angle produces the two rows of the matrix.

Dot products and projections

The codomain need not have the same dimension as the domain. A dot product produces a scalar, while projection produces a vector on a fixed line.

[EXAMPLE]

A dot-product map

Fix u∈Rnu\in\mathbb R^n and define

Tu:Rn→R,Tu(x)=u⋅x.T_u:\mathbb R^n\to\mathbb R,\qquad T_u(x)=u\cdot x.

Bilinearity of the dot product gives

Tu(x+y)=u⋅(x+y)=u⋅x+u⋅y=Tu(x)+Tu(y),T_u(x+y)=u\cdot(x+y)=u\cdot x+u\cdot y=T_u(x)+T_u(y),Tu(λx)=u⋅(λx)=λ(u⋅x)=λTu(x).T_u(\lambda x)=u\cdot(\lambda x)=\lambda(u\cdot x)=\lambda T_u(x).

Thus taking the dot product with a fixed vector is a linear map.

[routine]

  1. [1]:Linear map
[EXAMPLE]

Projection onto a line

For u≠0u\ne0, the projection of x∈Rnx\in\mathbb R^n onto the line spanned by uu is

proj⁡ux=x⋅uu⋅u u.\operatorname{proj}_u x=\frac{x\cdot u}{u\cdot u}\,u.

To see this, write the projected vector as cucu. The residual x−cux-cu must be perpendicular to uu and solving (x−cu)⋅u=0(x-cu)\cdot u=0 gives c=(x⋅u)/(u⋅u)c=(x\cdot u)/(u\cdot u). The condition u≠0u\ne0 makes the denominator positive.

The projection map Pu:Rn→RnP_u:\mathbb R^n\to\mathbb R^n is therefore

Pu(x)=x⋅uu⋅u u.P_u(x)=\frac{x\cdot u}{u\cdot u}\,u.

Since u⋅uu\cdot u is a fixed non-zero scalar, bilinearity gives

Pu(x+y)=Pu(x)+Pu(y),Pu(λx)=λPu(x).P_u(x+y)=P_u(x)+P_u(y), \qquad P_u(\lambda x)=\lambda P_u(x).

Hence projection onto a fixed line through the origin is a linear map.

For orthogonal projection onto a subspace HH, every vector in HH is fixed and every vector in H⊥H^\perp is sent to zero. When those subspaces are non-zero, they are eigenspaces for eigenvalues 11 and 00 respectively; this links projection geometry to eigenvalues.

[routine]

  1. [1]:Linear map

Translation looks like these geometric maps but is not linear. For a fixed non-zero vector aa, the map T(x)=x+aT(x)=x+a satisfies T(0)=a≠0T(0)=a\ne0 and, in general,

T(λx)=λx+a≠λx+λa=λT(x).T(\lambda x)=\lambda x+a\ne\lambda x+\lambda a=\lambda T(x).

Kernel, image and rank turns next to the vectors a map sends to 00 and the outputs it can produce.

On this page