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]

Examples from Geometric examples

All examples from Geometric examples.

Back to Geometric examples

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.

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.

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.

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}.

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.

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.

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

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

On this page