FP3.6 - Further matrix algebra

Syllabus
2019
Topic
Level
A2

Learning objectives

Represent linear transformations with matrices

A matrix represents a linear transformation by multiplying a column vector. If T:RnRmT:\mathbb R^n\to\mathbb R^m has matrix AA, thenT(x)=Ax.T(\mathbf x)=A\mathbf x.Linearity means T(u+v)=T(u)+T(v)T(\mathbf u+\mathbf v)=T(\mathbf u)+T(\mathbf v) and T(ku)=kT(u)T(k\mathbf u)=kT(\mathbf u), so the origin maps to the origin.

The columns of AA are the images of the standard basis vectors. In three dimensions,A=(T(e1)T(e2)T(e3)).A=\begin{pmatrix}|&|&|\\T(\mathbf e_1)&T(\mathbf e_2)&T(\mathbf e_3)\\|&|&|\end{pmatrix}.This gives the matrix immediately when the action on i,j,k\mathbf i,\mathbf j,\mathbf k is known, and explains why matrix multiplication forms the correct linear combination of those images.

Transformation Matrix size Multiplication
R2R2\mathbb R^2\to\mathbb R^2 2×22\times2 two-component output from a two-component input
R3R3\mathbb R^3\to\mathbb R^3 3×33\times3 three-component output from a three-component input
RnRm\mathbb R^n\to\mathbb R^m m×nm\times n mm rows determine output components; nn columns match inputs

LetA=(102011210).A=\begin{pmatrix}1&0&2\\0&-1&1\\2&1&0\end{pmatrix}.Its columns show T(e1)=(1,0,2)TT(\mathbf e_1)=(1,0,2)^T, T(e2)=(0,1,1)TT(\mathbf e_2)=(0,-1,1)^T and T(e3)=(2,1,0)TT(\mathbf e_3)=(2,1,0)^T. HenceT(1,2,1)T=A(121)=(134).T(1,2,-1)^T=A\begin{pmatrix}1\\2\\-1\end{pmatrix}=\begin{pmatrix}-1\\-3\\4\end{pmatrix}.The same result is the linear combination T(e1)+2T(e2)T(e3)T(\mathbf e_1)+2T(\mathbf e_2)-T(\mathbf e_3).

If images of enough independent vectors are supplied instead of basis vectors, put the input vectors as columns of a matrix XX and their images as columns of YY. The unknown transformation matrix satisfies AX=YAX=Y; when XX is invertible, A=YX1A=YX^{-1}. Verify every supplied mapping after solving.

A matrix represents a linear transformation only when the coordinate conventions and vector order are fixed. Do not place basis images in rows, and do not include a translation term in a purely linear matrix transformation. A map that sends the zero vector to a non-zero vector is affine, not linear.

Compose transformations in the correct order

Matrix products encode successive transformations, but the rightmost matrix acts first. If BB is followed by AA, thenxBBxAA(Bx)=(AB)x.\mathbf x\xmapsto{B}B\mathbf x\xmapsto{A}A(B\mathbf x)=(AB)\mathbf x.This is why the product ABAB represents BB followed by AA.

A product ABAB exists when the number of columns of AA equals the number of rows of BB. The result has the rows of AA and columns of BB. Each entry is a row-column dot product; dimension compatibility must be checked before interpreting a composition.

LetA=(1001),B=(1201).A=\begin{pmatrix}1&0\\0&-1\end{pmatrix},\qquad B=\begin{pmatrix}1&2\\0&1\end{pmatrix}.ThenAB=(1201)AB=\begin{pmatrix}1&2\\0&-1\end{pmatrix}represents the shear BB followed by reflection AA. For (1,1)T(1,1)^T, BB gives (3,1)T(3,1)^T and AA gives (3,1)T(3,-1)^T, matching AB(1,1)TAB(1,1)^T.

Reversing the order givesBA=(1201),BA=\begin{pmatrix}1&-2\\0&-1\end{pmatrix},which sends (1,1)T(1,1)^T to (1,1)T(-1,-1)^T. Thus ABBAAB\ne BA in general. A quick test vector can reveal an order error even before the full product is interpreted.

The identity matrix II leaves every vector unchanged, so AI=IA=AAI=IA=A. If two successive transformations undo one another, their product is II in the appropriate order; this becomes the basis of inverse transformations later in the Topic.

Read a written sequence from the action on the vector, not from left to right in the matrix product. Matrix multiplication is associative, so parentheses may move in ABCABC, but it is not generally commutative, so factors may not be reordered.

Transpose matrices and reverse product order

The transpose ATA^{\mathsf T} is formed by exchanging rows and columns: its (i,j)(i,j) entry is the (j,i)(j,i) entry of AA. Therefore an m×nm\times n matrix becomes an n×mn\times m matrix, and (AT)T=A(A^{\mathsf T})^{\mathsf T}=A.

Operation Transpose rule
Sum (A+B)T=AT+BT(A+B)^{\mathsf T}=A^{\mathsf T}+B^{\mathsf T}
Scalar multiple (kA)T=kAT(kA)^{\mathsf T}=kA^{\mathsf T}
Product (AB)T=BTAT(AB)^{\mathsf T}=B^{\mathsf T}A^{\mathsf T}
Inverse, when it exists (A1)T=(AT)1(A^{-1})^{\mathsf T}=(A^{\mathsf T})^{-1}
Symmetric matrix AT=AA^{\mathsf T}=A

The product order reverses because(AB)ijT=(AB)ji=kAjkBki=k(BT)ik(AT)kj.(AB)^{\mathsf T}_{ij}=(AB)_{ji}=\sum_k A_{jk}B_{ki}=\sum_k(B^{\mathsf T})_{ik}(A^{\mathsf T})_{kj}.So the row-column pairing becomes BTATB^{\mathsf T}A^{\mathsf T}, not ATBTA^{\mathsf T}B^{\mathsf T}.

ForA=(1201),B=(3124),A=\begin{pmatrix}1&2\\0&-1\end{pmatrix},\qquad B=\begin{pmatrix}3&1\\2&4\end{pmatrix},we have AB=(7924)AB=\begin{pmatrix}7&9\\-2&-4\end{pmatrix} and(AB)T=(7294)=BTAT.(AB)^{\mathsf T}=\begin{pmatrix}7&-2\\9&-4\end{pmatrix}=B^{\mathsf T}A^{\mathsf T}.Direct multiplication confirms both the entries and reversed order.

Transposes convert column information into row information and are central to dot products and orthogonality. If a square matrix PP has orthonormal columns, then PTP=IP^{\mathsf T}P=I, so P1=PTP^{-1}=P^{\mathsf T}; this is used when symmetric matrices are diagonalised.

Transposition does not reverse entries within each row; it swaps the row and column indices. Do not distribute it over a product without reversing factor order. A symmetric matrix must be square, and matching diagonal entries alone is not enough: every off-diagonal pair must also agree.

Evaluate 3 by 3 determinants and test singularity

The determinant of a square matrix is a scalar that measures signed scale under its transformation. For a 3×33\times3 matrix, expand along any row or column using signed 2×22\times2 minors. A matrix is singular exactly when its determinant is zero; otherwise it is non-singular and has an inverse.

det ⁣(abcdefghi)=a(eifh)b(difg)+c(dheg)\det\!\begin{pmatrix}a&b&c\\d&e&f\\g&h&i\end{pmatrix}=a(ei-fh)-b(di-fg)+c(dh-eg)

Determinant condition Algebraic consequence Transformation consequence
detA0\det A\ne0 Unique inverse A1A^{-1} exists No dimension is collapsed; volume scale is detA|\det A|.
detA=0\det A=0 AA is singular; no inverse Some non-zero direction is collapsed; transformed volume is zero.
detA<0\det A<0 Still invertible if non-zero Orientation is reversed; physical volume uses detA|\det A|.

ForM=(210132041),M=\begin{pmatrix}2&1&0\\-1&3&2\\0&4&1\end{pmatrix},expansion along the first row givesdetM=2(3124)1((1)120)=10+1=9.\det M=2(3\cdot1-2\cdot4)-1((-1)\cdot1-2\cdot0)=-10+1=-9.Thus MM is non-singular and multiplies volumes by 99, while reversing orientation.

For a matrix containing a parameter, calculate and factor the determinant, then solve detA=0\det A=0 to find exactly the singular values. Any later inverse formula must explicitly exclude those values. Substitute a candidate back into the determinant as a check.

Swapping two rows changes the determinant's sign; multiplying one row by kk multiplies the determinant by kk; adding a multiple of one row to another leaves it unchanged. These rules can simplify an evaluation, but every operation's effect must be tracked.

The cofactor signs alternate +,,++,-,+ across the first row. Do not confuse a negative determinant with singularity: only zero is singular. When determinant magnitude is used as an area or volume scale, take the absolute value.

Find inverses of 3 by 3 matrices

A square matrix AA has an inverse only when detA0\det A\ne0. The inverse satisfiesAA1=A1A=IAA^{-1}=A^{-1}A=Iand can be calculated from cofactors:A1=1detAadjA.A^{-1}=\frac1{\det A}\operatorname{adj}A.The adjugate is the transpose of the cofactor matrix.

Step Action
1. Determinant Calculate detA\det A and state any excluded parameter values.
2. Minors Delete row ii and column jj to form each 2×22\times2 minor.
3. Cofactors Apply signs (+++++)\begin{pmatrix}+&-&+\\-&+&-\\+&-&+\end{pmatrix}.
4. Adjugate Transpose the cofactor matrix.
5. Divide/check Divide by detA\det A and verify a product with AA gives II.

ForA=(110011001),detA=1,A=\begin{pmatrix}1&1&0\\0&1&1\\0&0&1\end{pmatrix},\qquad \det A=1,the inverse isA1=(111011001).A^{-1}=\begin{pmatrix}1&-1&1\\0&1&-1\\0&0&1\end{pmatrix}.Multiplying AA1AA^{-1} gives II, including the cancellation 11=01-1=0 and 11=01-1=0 in the upper off-diagonal entries.

For invertible AA and BB,(AB)1=B1A1.(AB)^{-1}=B^{-1}A^{-1}.Indeed, (AB)(B1A1)=AIA1=I(AB)(B^{-1}A^{-1})=AIA^{-1}=I. The order reverses because the most recently applied transformation must be undone first.

The equation Ax=bA\mathbf x=\mathbf b has the unique solution x=A1b\mathbf x=A^{-1}\mathbf b when AA is non-singular. In exact work, retain fractions and parameter restrictions until the final result, then verify by substitution.

Do not call the cofactor matrix the adjugate before transposing it, and do not divide by a determinant that may be zero. Taking reciprocals of individual entries does not form a matrix inverse. Both left and right identity products are valid checks for a square inverse.

Reverse transformations and their combinations

If a transformation sends x\mathbf x to y=Ax\mathbf y=A\mathbf x and AA is non-singular, its inverse sends the image back to the original vector:x=A1y.\mathbf x=A^{-1}\mathbf y.No inverse transformation exists when AA is singular because distinct inputs have been collapsed to the same output.

If BB acts first and AA second, the combined matrix is ABAB. To reverse the combination, undo AA first and then BB:y=ABxx=B1A1y.\mathbf y=AB\mathbf x\quad\Longrightarrow\quad \mathbf x=B^{-1}A^{-1}\mathbf y.Thus (AB)1=B1A1(AB)^{-1}=B^{-1}A^{-1} is both an algebraic and procedural rule.

A linear transformation maps every point and direction vector of a line. To find the preimage of an image liney=p+λd,\mathbf y=\mathbf p+\lambda\mathbf d,apply A1A^{-1} to both fixed vectors:x=A1p+λA1d.\mathbf x=A^{-1}\mathbf p+\lambda A^{-1}\mathbf d.The same parameter remains because matrix multiplication is linear.

LetA=diag(2,1,12)A=\operatorname{diag}\left(2,-1,\frac12\right)and suppose the image line isy=(4,1,3)T+λ(2,2,1)T.\mathbf y=(4,1,3)^T+\lambda(2,-2,1)^T.Since A1=diag(1/2,1,2)A^{-1}=\operatorname{diag}(1/2,-1,2), the original line isx=(2,1,6)T+λ(1,2,2)T.\mathbf x=(2,-1,6)^T+\lambda(1,2,2)^T.Applying AA to its point and direction recovers the image line.

Check an inverse transformation in both directions on a general vector or on the defining point/direction data. For a combination, multiply the proposed inverse by the combined matrix in the correct order and require the identity matrix.

An inverse matrix reverses a transformation; it is not the transpose unless the matrix is orthogonal. Do not reverse a product without reversing factor order, and do not attempt an inverse transformation before checking that the determinant is non-zero.

Find and normalise eigenvectors

A non-zero vector v\mathbf v is an eigenvector of AA when the transformation changes only its scale (and possibly direction):Av=λv.A\mathbf v=\lambda\mathbf v.The scalar λ\lambda is the corresponding eigenvalue. The zero vector is never an eigenvector.

Stage Calculation
Find eigenvalues Solve det(AλI)=0\det(A-\lambda I)=0.
Find an eigenvector For each λ\lambda, solve (AλI)v=0(A-\lambda I)\mathbf v=\mathbf0 for a non-zero vector.
Check Verify Av=λvA\mathbf v=\lambda\mathbf v.
Normalise if required Replace v\mathbf v by v/v\mathbf v/|\mathbf v|; its negative is equally valid.

ForA=(4123),A=\begin{pmatrix}4&1\\2&3\end{pmatrix},the characteristic equation is(4λ)(3λ)2=λ27λ+10=0,(4-\lambda)(3-\lambda)-2=\lambda^2-7\lambda+10=0,so λ=5\lambda=5 or 22.

For λ=5\lambda=5, (A5I)v=0(A-5I)\mathbf v=0 gives y=xy=x, so one eigenvector is (1,1)T(1,1)^T and a normalised choice is (1,1)T/2(1,1)^T/\sqrt2. For λ=2\lambda=2, the equation gives y=2xy=-2x, so a normalised choice is (1,2)T/5(1,-2)^T/\sqrt5. Direct multiplication verifies both pairs.

If a vector is supplied, multiply it by AA and compare corresponding non-zero components. It is an eigenvector only if one common scalar λ\lambda works in every component, including components that are zero. If an eigenvalue is supplied, substitute it into the nullspace equations rather than recomputing every root.

The same method applies to 3×33\times3 matrices: the characteristic determinant is cubic and each eigenvector comes from a homogeneous three-variable system. Row-reduce without forcing the free parameter to zero, then choose a convenient non-zero scale before normalising.

Solving only det(AλI)=0\det(A-\lambda I)=0 finds eigenvalues, not eigenvectors. Eigenvectors are non-zero and are not unique: every non-zero scalar multiple represents the same eigendirection. Normalising changes length to 11 but does not determine a unique sign.

Orthogonally diagonalise a symmetric matrix

A real symmetric matrix A=ATA=A^{\mathsf T} has an orthonormal basis of eigenvectors. Put those unit eigenvectors into the columns of an orthogonal matrix PP. ThenPTP=I,P1=PT,D=PTAPP^{\mathsf T}P=I,\qquad P^{-1}=P^{\mathsf T},\qquad D=P^{\mathsf T}APis diagonal.

Step Required consistency
1. Eigenvalues Find all eigenvalues of AA.
2. Eigenvectors Find a basis for each eigenspace.
3. Orthonormalise Normalise mutually perpendicular eigenvectors; within a repeated eigenspace choose an orthonormal basis.
4. Assemble PP Place the unit eigenvectors as columns.
5. Assemble DD Put the matching eigenvalues on the diagonal in the same column order.

Writing the column equations together gives AP=PDAP=PD. Multiplying on the left by PT=P1P^{\mathsf T}=P^{-1} yields PTAP=DP^{\mathsf T}AP=D. Orthogonality is what makes the change of coordinates preserve lengths and turns the inverse into a transpose.

ForA=(2112),A=\begin{pmatrix}2&1\\1&2\end{pmatrix},the eigenvalue 33 has unit eigenvector (1,1)T/2(1,1)^T/\sqrt2, and eigenvalue 11 has unit eigenvector (1,1)T/2(1,-1)^T/\sqrt2. ThereforeP=12(1111),D=(3001),P=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},\qquad D=\begin{pmatrix}3&0\\0&1\end{pmatrix},and direct multiplication gives PTAP=DP^{\mathsf T}AP=D.

Permuting the columns of PP is allowed only when the diagonal entries of DD are permuted in exactly the same way. Changing the sign of any eigenvector column leaves orthogonality and the resulting diagonal entry unchanged.

Diagonalisation by an orthogonal PP is guaranteed here because AA is real and symmetric; do not assume every matrix has an orthogonal eigenbasis. Columns of PP must be unit and mutually perpendicular, and their order must match the eigenvalues in DD.