Skip to main content

Matrices and Transformations (Extended)

Matrices and Transformations (Extended Treatment)

This document covers matrix operations, determinants, inverses, 3x3 matrices, linear transformations, and an introduction to eigenvalues and eigenvectors.

Matrices provide a compact and powerful notation for systems of linear equations, geometric

transformations, and many applications in science and engineering. :::


1. Matrix Operations

1.1 Definitions

An m×nm \times n matrix AA is a rectangular array of numbers with mm rows and nn columns. The entry in row ii, column jj is written aija_{ij}.

Addition. If AA and BB are both m×nm \times n, then (A+B)ij=aij+bij(A + B)_{ij} = a_{ij} + b_{ij}.

Scalar multiplication. (cA)ij=caij(cA)_{ij} = ca_{ij}.

Matrix multiplication. If AA is m×nm \times n and BB is n×pn \times p, then C=ABC = AB is m×pm \times p with:

cij=k=1naikbkjc_{ij} = \sum_{k=1}^{n} a_{ik}\,b_{kj}

1.2 Properties of matrix multiplication

Matrix multiplication is:

  • Associative: (AB)C=A(BC)(AB)C = A(BC).
  • Distributive over addition: A(B+C)=AB+ACA(B + C) = AB + AC.
  • NOT commutative: in general, ABBAAB \neq BA.

Proof that matrix multiplication is not commutative. Consider:

A=(1000),B=(0100)A = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, \quad B = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}

AB=(0100),BA=(0000)AB = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \quad BA = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}

ABBAAB \neq BA. \blacksquare

1.3 The identity matrix

The n×nn \times n identity matrix InI_n has 11s on the main diagonal and 00s elsewhere. For any n×nn \times n matrix AA: AIn=InA=AAI_n = I_n A = A.

1.4 Worked example

Problem. Given A=(2134)A = \begin{pmatrix} 2 & -1 \\ 3 & 4 \end{pmatrix} and B=(1520)B = \begin{pmatrix} 1 & 5 \\ -2 & 0 \end{pmatrix}, find ABAB and BABA.

AB=(2(1)+(1)(2)2(5)+(1)(0)3(1)+4(2)3(5)+4(0))=(410515)AB = \begin{pmatrix} 2(1) + (-1)(-2) & 2(5) + (-1)(0) \\ 3(1) + 4(-2) & 3(5) + 4(0) \end{pmatrix} = \begin{pmatrix} 4 & 10 \\ -5 & 15 \end{pmatrix}

BA=(1(2)+5(3)1(1)+5(4)2(2)+0(3)2(1)+0(4))=(171942)BA = \begin{pmatrix} 1(2) + 5(3) & 1(-1) + 5(4) \\ -2(2) + 0(3) & -2(-1) + 0(4) \end{pmatrix} = \begin{pmatrix} 17 & 19 \\ -4 & 2 \end{pmatrix}

ABBAAB \neq BA, confirming non-commutativity.


2. Determinants

2.1 2x2 determinant

det(abcd)=adbc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc

2.2 3x3 determinant

det(abcdefghk)=aefhkbdfgk+cdegh\det\begin{pmatrix} a & b & c \\ d & e & f \\ g & h & k \end{pmatrix} = a\begin{vmatrix} e & f \\ h & k \end{vmatrix} - b\begin{vmatrix} d & f \\ g & k \end{vmatrix} + c\begin{vmatrix} d & e \\ g & h \end{vmatrix}

=a(ekfh)b(dkfg)+c(dheg)= a(ek - fh) - b(dk - fg) + c(dh - eg)

2.3 Properties of determinants

  1. det(AB)=det(A)det(B)\det(AB) = \det(A)\det(B).
  2. det(AT)=det(A)\det(A^T) = \det(A).
  3. Swapping two rows (or columns) changes the sign of the determinant.
  4. A matrix with a row (or column) of zeros has determinant zero.
  5. Adding a multiple of one row to another does not change the determinant.
  6. det(cA)=cndet(A)\det(cA) = c^n\det(A) for an n×nn \times n matrix.

2.4 Geometric interpretation

For a 2×22 \times 2 matrix, det(A)|\det(A)| is the area scale factor of the transformation. If det(A)=0\det(A) = 0, the transformation collapses the plane to a line or a point.

For a 3×33 \times 3 matrix, det(A)|\det(A)| is the volume scale factor.

2.5 Worked example

Problem. Find the determinant of A=(213014120)A = \begin{pmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 1 & 2 & 0 \end{pmatrix}.

Expanding along the first row:

detA=2142010410+30112\det A = 2\begin{vmatrix} -1 & 4 \\ 2 & 0 \end{vmatrix} - 1\begin{vmatrix} 0 & 4 \\ 1 & 0 \end{vmatrix} + 3\begin{vmatrix} 0 & -1 \\ 1 & 2 \end{vmatrix}

=2(08)1(04)+3(0+1)=16+4+3=9= 2(0 - 8) - 1(0 - 4) + 3(0 + 1) = -16 + 4 + 3 = -9


3. Inverses

3.1 Definition

The inverse of a square matrix AA is a matrix A1A^{-1} such that:

AA1=A1A=IAA^{-1} = A^{-1}A = I

An inverse exists if and only if det(A)0\det(A) \neq 0. A matrix with no inverse is singular.

3.2 Inverse of a 2x2 matrix

(abcd)1=1adbc(dbca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

Verification:

1adbc(dbca)(abcd)=1adbc(adbc00adbc)=I\frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}\begin{pmatrix} a & b \\ c & d \end{pmatrix} = \frac{1}{ad - bc}\begin{pmatrix} ad - bc & 0 \\ 0 & ad - bc \end{pmatrix} = I

3.3 Inverse of a 3x3 matrix

Method 1: Adjugate matrix. A1=LB1RB◆◆LBdetARBadj(A)A^{-1} = \dfrac◆LB◆1◆RB◆◆LB◆\det A◆RB◆\,\mathrm{adj}(A), where the adjugate is the transpose of the cofactor matrix.

Method 2: Row reduction. Form the augmented matrix [AI][A \mid I] and apply row operations to obtain [IA1][I \mid A^{-1}].

3.4 Worked example: 3x3 inverse

Problem. Find the inverse of A=(120013101)A = \begin{pmatrix} 1 & 2 & 0 \\ 0 & 1 & 3 \\ 1 & 0 & 1 \end{pmatrix}.

detA=1(10)2(03)+0=1+6=7\det A = 1(1 - 0) - 2(0 - 3) + 0 = 1 + 6 = 7.

Cofactors: C11=1C_{11} = 1, C12=3C_{12} = 3, C13=1C_{13} = -1, C21=2C_{21} = -2, C22=1C_{22} = 1, C23=2C_{23} = 2, C31=6C_{31} = 6, C32=3C_{32} = -3, C33=1C_{33} = 1.

A1=17(126313121)A^{-1} = \frac{1}{7}\begin{pmatrix} 1 & -2 & 6 \\ 3 & 1 & -3 \\ -1 & 2 & 1 \end{pmatrix}

3.5 Solving systems of linear equations

A system Ax=bA\mathbf{x} = \mathbf{b} has a unique solution x=A1b\mathbf{x} = A^{-1}\mathbf{b} if and only if detA0\det A \neq 0.

If detA=0\det A = 0: either no solution (inconsistent) or infinitely many solutions (dependent).


4. Linear Transformations

4.1 Matrices as transformations

A 2×22 \times 2 matrix represents a linear transformation of the plane:

(xy)=(abcd)(xy)\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix}

Key property: the origin is always mapped to the origin.

4.2 Standard transformations

TransformationMatrix
Reflection in xx-axis(1001)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}
Reflection in yy-axis(1001)\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}
Reflection in y=xy = x(0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}
Rotation θ\theta anticlockwise(cosθsinθsinθcosθ)\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}
Enlargement scale kk(k00k)\begin{pmatrix} k & 0 \\ 0 & k \end{pmatrix}
Stretch parallel to xx (sf kk)(k001)\begin{pmatrix} k & 0 \\ 0 & 1 \end{pmatrix}

4.3 Combined transformations

If transformation AA is followed by transformation BB, the combined transformation is BABA.

Proof. If v=Av\mathbf{v}' = A\mathbf{v} and v=Bv\mathbf{v}'' = B\mathbf{v}', then v=B(Av)=(BA)v\mathbf{v}'' = B(A\mathbf{v}) = (BA)\mathbf{v}. \blacksquare

4.4 Worked example

Problem. Find the matrix representing a rotation of 9090^\circ anticlockwise about the origin followed by a reflection in the xx-axis.

Rotation 9090^\circ: R=(0110)R = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}.

Reflection in xx-axis: S=(1001)S = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}.

Combined: SR=(1001)(0110)=(0110)SR = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}

Check: this is equivalent to a reflection in the line y=xy = -x.

4.5 Invariant points and lines

An invariant point satisfies Ax=xA\mathbf{x} = \mathbf{x}, i.e. (AI)x=0(A - I)\mathbf{x} = \mathbf{0}.

An invariant line is a line that is mapped to itself (points on the line may move along the line). If v\mathbf{v} is a direction vector of the line, then Av=λvA\mathbf{v} = \lambda\mathbf{v} for some scalar λ\lambda.


5. Eigenvalues and Eigenvectors

5.1 Definition

For a square matrix AA, a scalar λ\lambda and a non-zero vector v\mathbf{v} are an eigenvalue and eigenvector of AA if:

Av=λvA\mathbf{v} = \lambda\mathbf{v}

Geometrically, AA stretches or compresses the eigenvector by a factor of λ\lambda without changing its direction.

5.2 Finding eigenvalues

Av=λv    (AλI)v=0A\mathbf{v} = \lambda\mathbf{v} \implies (A - \lambda I)\mathbf{v} = \mathbf{0}.

For non-trivial solutions, we need det(AλI)=0\det(A - \lambda I) = 0. This is the characteristic equation.

For a 2×22 \times 2 matrix:

det(aλbcdλ)=(aλ)(dλ)bc=0\det\begin{pmatrix} a - \lambda & b \\ c & d - \lambda \end{pmatrix} = (a - \lambda)(d - \lambda) - bc = 0

λ2(a+d)λ+(adbc)=0\lambda^2 - (a + d)\lambda + (ad - bc) = 0

Key result: λ1+λ2=tr(A)=a+d\lambda_1 + \lambda_2 = \mathrm{tr}(A) = a + d (the trace) and λ1λ2=detA\lambda_1 \lambda_2 = \det A.

5.3 Finding eigenvectors

For each eigenvalue λi\lambda_i, solve (AλiI)v=0(A - \lambda_i I)\mathbf{v} = \mathbf{0}.

5.4 Worked example

Problem. Find the eigenvalues and eigenvectors of A=(4123)A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}.

Characteristic equation: (4λ)(3λ)2=0(4 - \lambda)(3 - \lambda) - 2 = 0

λ27λ+10=0    (λ5)(λ2)=0\lambda^2 - 7\lambda + 10 = 0 \implies (\lambda - 5)(\lambda - 2) = 0

λ1=5\lambda_1 = 5, λ2=2\lambda_2 = 2.

For λ1=5\lambda_1 = 5:

(1122)(xy)=(00)\begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

x+y=0    y=x-x + y = 0 \implies y = x. Eigenvector: (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix}.

For λ2=2\lambda_2 = 2:

(2121)(xy)=(00)\begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

2x+y=0    y=2x2x + y = 0 \implies y = -2x. Eigenvector: (12)\begin{pmatrix} 1 \\ -2 \end{pmatrix}.

5.5 Diagonalisation

If an n×nn \times n matrix AA has nn linearly independent eigenvectors, it can be diagonalised:

A=PDP1A = PDP^{-1}

where PP has the eigenvectors as columns and DD is a diagonal matrix with the eigenvalues on the diagonal.

Worked example. For the matrix above:

P=(1112),D=(5002)P = \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}, \quad D = \begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix}

detP=21=3,P1=13(2111)=13(2111)\det P = -2 - 1 = -3, \quad P^{-1} = -\frac{1}{3}\begin{pmatrix} -2 & -1 \\ -1 & 1 \end{pmatrix} = \frac{1}{3}\begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix}

Verify: PDP1=13(1112)(5002)(2111)PDP^{-1} = \dfrac{1}{3}\begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}\begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix}

=13(5254)(2111)=13(12369)=(4123)=A= \dfrac{1}{3}\begin{pmatrix} 5 & 2 \\ 5 & -4 \end{pmatrix}\begin{pmatrix} 2 & 1 \\ 1 & -1 \end{pmatrix} = \dfrac{1}{3}\begin{pmatrix} 12 & 3 \\ 6 & 9 \end{pmatrix} = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} = A.

5.6 Powers of matrices

Diagonalisation allows efficient computation of AnA^n:

An=PDnP1A^n = PD^n P^{-1}

since DnD^n is simply the diagonal matrix with each eigenvalue raised to the power nn.

warning Not all matrices are diagonalisable. A matrix is diagonalisable if and only if it

has a full set of linearly independent eigenvectors. A matrix with repeated eigenvalues may or may not be diagonalisable. :::


6. Practice Problems

Problem 1

Find the inverse of A=(3152)A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix} and verify that AA1=IAA^{-1} = I.

Solution

detA=65=1\det A = 6 - 5 = 1.

A1=(2153)A^{-1} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}.

AA1=(3152)(2153)=(1001)AA^{-1} = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}\begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}. Verified.

Problem 2

Find the matrix representing a rotation of 6060^\circ anticlockwise about the origin.

Solution

cos60=0.5\cos 60^\circ = 0.5, sin60=3/2\sin 60^\circ = \sqrt{3}/2.

R=(0.53/23/20.5)R = \begin{pmatrix} 0.5 & -\sqrt{3}/2 \\ \sqrt{3}/2 & 0.5 \end{pmatrix}.

Problem 3

Find the eigenvalues and eigenvectors of (5221)\begin{pmatrix} 5 & -2 \\ 2 & 1 \end{pmatrix}.

Solution

Characteristic equation: (5λ)(1λ)+4=0(5 - \lambda)(1 - \lambda) + 4 = 0

λ26λ+9=0    (λ3)2=0\lambda^2 - 6\lambda + 9 = 0 \implies (\lambda - 3)^2 = 0

λ=3\lambda = 3 (repeated eigenvalue).

(2222)(xy)=0    x=y\begin{pmatrix} 2 & -2 \\ 2 & -2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \mathbf{0} \implies x = y.

Only one independent eigenvector: (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix}.

This matrix is not diagonalisable (only one eigenvector for a repeated eigenvalue).

Problem 4

Use the matrix (1210)\begin{pmatrix} 1 & 2 \\ 1 & 0 \end{pmatrix} to find a formula for the nn-th Fibonacci number.

Solution

Eigenvalues of AA: λ2λ2=0    λ=LB1±3RB◆◆LB2RB\lambda^2 - \lambda - 2 = 0 \implies \lambda = \frac◆LB◆1 \pm 3◆RB◆◆LB◆2◆RB◆, so λ1=2\lambda_1 = 2, λ2=1\lambda_2 = -1.

Eigenvectors: for λ=2\lambda = 2: (1,1)(1, 1); for λ=1\lambda = -1: (2,1)(-2, 1).

An=PDnP1A^n = P D^n P^{-1} where P=(1211)P = \begin{pmatrix} 1 & -2 \\ 1 & 1 \end{pmatrix}, P1=13(1211)P^{-1} = \frac{1}{3}\begin{pmatrix} 1 & 2 \\ -1 & 1 \end{pmatrix}.

(Fn+1Fn)=An(10)\begin{pmatrix} F_{n+1} \\ F_n \end{pmatrix} = A^n\begin{pmatrix} 1 \\ 0 \end{pmatrix}.

This gives Fn=2n(1)n3F_n = \frac{2^n - (-1)^n}{3} (the Lucas sequence). For the standard Fibonacci sequence with A=(1110)A = \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}, the result is Fn=LBϕnψnRB◆◆LB5RBF_n = \frac◆LB◆\phi^n - \psi^n◆RB◆◆LB◆\sqrt{5}◆RB◆ where ϕ=LB1+5RB◆◆LB2RB\phi = \frac◆LB◆1+\sqrt{5}◆RB◆◆LB◆2◆RB◆.


7. Further Proofs and Key Results

7.1 Proof: det(AB)=det(A)det(B)\det(AB) = \det(A)\det(B) for 2×22 \times 2 matrices

Proof. Let A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} and B=(efgh)B = \begin{pmatrix} e & f \\ g & h \end{pmatrix}.

AB=(ae+bgaf+bhce+dgcf+dh)AB = \begin{pmatrix} ae + bg & af + bh \\ ce + dg & cf + dh \end{pmatrix}

det(AB)=(ae+bg)(cf+dh)(af+bh)(ce+dg)\det(AB) = (ae + bg)(cf + dh) - (af + bh)(ce + dg)

=acef+adeh+bcfg+bdghacefadfgbcehbdgh= acef + adeh + bcfg + bdgh - acef - adfg - bceh - bdgh

=adeh+bcfgadfgbceh= adeh + bcfg - adfg - bceh

=ad(ehfg)bc(ehfg)=(adbc)(ehfg)=det(A)det(B)= ad(eh - fg) - bc(eh - fg) = (ad - bc)(eh - fg) = \det(A)\det(B) \quad \blacksquare

7.2 Proof: det(A)0    A\det(A) \neq 0 \iff A is invertible

Proof. (\Rightarrow) If det(A)0\det(A) \neq 0, the adjugate formula gives A1=LB1RB◆◆LBdetARBadj(A)A^{-1} = \dfrac◆LB◆1◆RB◆◆LB◆\det A◆RB◆\mathrm{adj}(A), so AA is invertible.

(\Leftarrow) If AA is invertible with A1A^{-1}, then det(A)det(A1)=det(AA1)=det(I)=1\det(A)\det(A^{-1}) = \det(AA^{-1}) = \det(I) = 1. Since 101 \neq 0, we must have det(A)0\det(A) \neq 0. \blacksquare

7.3 Proof: the trace equals the sum of eigenvalues

Theorem. For any 2×22 \times 2 matrix AA, tr(A)=λ1+λ2\mathrm{tr}(A) = \lambda_1 + \lambda_2.

Proof. The characteristic equation is det(AλI)=λ2(a+d)λ+(adbc)=0\det(A - \lambda I) = \lambda^2 - (a + d)\lambda + (ad - bc) = 0.

By Vieta's formulas, the sum of the roots is the negative coefficient of λ\lambda:

λ1+λ2=a+d=tr(A)\lambda_1 + \lambda_2 = a + d = \mathrm{tr}(A) \quad \blacksquare

7.4 Proof: area scale factor via determinant

Theorem. The linear transformation represented by a 2×22 \times 2 matrix AA scales areas by det(A)|\det(A)|.

Proof. The unit square with vertices 0,e1,e2,e1+e2\mathbf{0}, \mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_1 + \mathbf{e}_2 is mapped to a parallelogram with vertices 0,Ae1,Ae2,Ae1+Ae2\mathbf{0}, A\mathbf{e}_1, A\mathbf{e}_2, A\mathbf{e}_1 + A\mathbf{e}_2.

The area of this parallelogram is the magnitude of the cross product (in 2D, the determinant):

Area=det(abcd)=detA\text{Area} = \left|\det\begin{pmatrix} a & b \\ c & d \end{pmatrix}\right| = |\det A|

Any region can be tiled by infinitesimal parallelograms, so the general scale factor is detA|\det A|. \blacksquare


8. Common Pitfalls

Common Pitfall
  1. Matrix multiplication order: ABAB means "apply BB first, then AA." When combining transformations, the second transformation is written on the left. Always read right-to-left.
  2. 3x3 determinant sign errors: The cofactor expansion alternates signs ++, -, ++ along the first row. A common mistake is to forget the - sign on the middle term.
  3. Singular matrix checks: Before finding an inverse, always verify det(A)0\det(A) \neq 0. If the determinant is zero, the matrix has no inverse and the system Ax=bA\mathbf{x} = \mathbf{b} has either no solutions or infinitely many.
  4. Eigenvectors are not unique: Any non-zero scalar multiple of an eigenvector is also an eigenvector. When diagonalising, ensure consistency: the columns of PP must match the order of eigenvalues in DD.
  5. Repeated eigenvalues: A repeated eigenvalue does not necessarily give two independent eigenvectors. Check by attempting to solve (AλI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}. :::

9. Additional Exam-Style Questions

Question 5

The matrix A=(3111)A = \begin{pmatrix} 3 & 1 \\ -1 & 1 \end{pmatrix} represents a linear transformation.

(a) Find the eigenvalues and eigenvectors of AA.

(b) Write down a matrix PP and a diagonal matrix DD such that P1AP=DP^{-1}AP = D.

(c) Hence find A5A^5.

Solution

(a) Characteristic equation: (3λ)(1λ)+1=0(3 - \lambda)(1 - \lambda) + 1 = 0

λ24λ+4=0    (λ2)2=0\lambda^2 - 4\lambda + 4 = 0 \implies (\lambda - 2)^2 = 0

λ=2\lambda = 2 (repeated).

(1111)(xy)=0    x+y=0\begin{pmatrix} 1 & 1 \\ -1 & -1 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \mathbf{0} \implies x + y = 0.

Eigenvector: (11)\begin{pmatrix} 1 \\ -1 \end{pmatrix}.

Only one independent eigenvector, so AA is not diagonalisable.

(b) Since AA is not diagonalisable, we cannot find PP and DD in the usual way. The best we can do is Jordan form, which is beyond A-Level scope.

(c) For AnA^n with a non-diagonalisable 2×22 \times 2 matrix with repeated eigenvalue λ\lambda:

An=λnI+nλn1(AλI)A^n = \lambda^n I + n\lambda^{n-1}(A - \lambda I)

A2I=(1111)A - 2I = \begin{pmatrix} 1 & 1 \\ -1 & -1 \end{pmatrix}.

A5=25I+524(1111)=(320032)+(80808080)A^5 = 2^5 I + 5 \cdot 2^4 \begin{pmatrix} 1 & 1 \\ -1 & -1 \end{pmatrix} = \begin{pmatrix} 32 & 0 \\ 0 & 32 \end{pmatrix} + \begin{pmatrix} 80 & 80 \\ -80 & -80 \end{pmatrix}

=(112808048)= \begin{pmatrix} 112 & 80 \\ -80 & -48 \end{pmatrix}.

Question 6

(a) Find the 3×33 \times 3 matrix MM that represents a rotation of 9090^\circ anticlockwise about the xx-axis.

(b) Verify that det(M)=1\det(M) = 1.

(c) The point (1,1,0)(1, 1, 0) is transformed by MM. Find its image.

Solution

(a) A rotation of θ\theta about the xx-axis leaves xx unchanged and rotates the yy-zz plane:

M=(1000cos90sin900sin90cos90)=(100001010)M = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos 90^\circ & -\sin 90^\circ \\ 0 & \sin 90^\circ & \cos 90^\circ \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{pmatrix}

(b) Expanding along the first row:

detM=101100+0=0(1)=1\det M = 1\begin{vmatrix} 0 & -1 \\ 1 & 0 \end{vmatrix} - 0 + 0 = 0 - (-1) = 1. Verified.

(c) (100001010)(110)=(101)\begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{pmatrix}\begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}.

The image is (1,0,1)(1, 0, 1).

Question 7

The transformation TT is defined by the matrix A=(2302)A = \begin{pmatrix} 2 & 3 \\ 0 & 2 \end{pmatrix}.

(a) Find the invariant points of TT.

(b) Show that the line y=0y = 0 is an invariant line of TT.

(c) Find another invariant line of TT.

Solution

(a) Invariant points satisfy Ax=xA\mathbf{x} = \mathbf{x}:

(2302)(xy)=(xy)\begin{pmatrix} 2 & 3 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x \\ y \end{pmatrix}

2x+3y=x    x+3y=02x + 3y = x \implies x + 3y = 0, and 2y=y    y=02y = y \implies y = 0.

So x=0x = 0 and y=0y = 0. The only invariant point is the origin.

(b) Points on y=0y = 0 have the form (x,0)(x, 0):

(2302)(x0)=(2x0)\begin{pmatrix} 2 & 3 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} x \\ 0 \end{pmatrix} = \begin{pmatrix} 2x \\ 0 \end{pmatrix}

The image (2x,0)(2x, 0) also lies on y=0y = 0, so y=0y = 0 is an invariant line.

(c) For an invariant line y=mxy = mx, we need A(1m)=λ(1m)A\begin{pmatrix} 1 \\ m \end{pmatrix} = \lambda\begin{pmatrix} 1 \\ m \end{pmatrix}:

2+3m=λ2 + 3m = \lambda and 2m=λm2m = \lambda m.

From the second equation: m(2λ)=0m(2 - \lambda) = 0.

If m=0m = 0, we get the line y=0y = 0 (already found).

If λ=2\lambda = 2: 2+3m=2    m=02 + 3m = 2 \implies m = 0 again.

For a line not through the origin, try y=mx+cy = mx + c with c0c \neq 0:

(2302)(xmx+c)=((2+3m)x+3c2mx+2c)\begin{pmatrix} 2 & 3 \\ 0 & 2 \end{pmatrix}\begin{pmatrix} x \\ mx + c \end{pmatrix} = \begin{pmatrix} (2 + 3m)x + 3c \\ 2mx + 2c \end{pmatrix}

For this to lie on y=mx+cy = mx + c: 2mx+2c=m(2+3m)x+3mc+c2mx + 2c = m(2 + 3m)x + 3mc + c.

Comparing coefficients: 2m=m(2+3m)    3m2=0    m=02m = m(2 + 3m) \implies 3m^2 = 0 \implies m = 0.

Then: 2c=c    c=02c = c \implies c = 0.

The only invariant line is y=0y = 0.


10. Advanced Worked Examples

Example 10.1: 3x3 eigenvalues and eigenvectors

Problem. Find the eigenvalues and eigenvectors of A=(210131012)A = \begin{pmatrix} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{pmatrix}.

Solution. Characteristic equation:

det(AλI)=2λ1013λ1012λ=0\det(A - \lambda I) = \begin{vmatrix} 2-\lambda & 1 & 0 \\ 1 & 3-\lambda & 1 \\ 0 & 1 & 2-\lambda \end{vmatrix} = 0

Expanding along the first row:

(2λ)3λ112λ11102λ+0(2-\lambda)\begin{vmatrix} 3-\lambda & 1 \\ 1 & 2-\lambda \end{vmatrix} - 1\begin{vmatrix} 1 & 1 \\ 0 & 2-\lambda \end{vmatrix} + 0

=(2λ)[(3λ)(2λ)1](2λ)= (2-\lambda)[(3-\lambda)(2-\lambda)-1] - (2-\lambda)

=(2λ)[(3λ)(2λ)2]=(2λ)[λ25λ+4]=(2λ)(λ1)(λ4)= (2-\lambda)[(3-\lambda)(2-\lambda) - 2] = (2-\lambda)[\lambda^2 - 5\lambda + 4] = (2-\lambda)(\lambda-1)(\lambda-4)

Eigenvalues: λ1=1\lambda_1 = 1, λ2=2\lambda_2 = 2, λ3=4\lambda_3 = 4.

For λ1=1\lambda_1 = 1:

(110121011)(xyz)=0\begin{pmatrix} 1 & 1 & 0 \\ 1 & 2 & 1 \\ 0 & 1 & 1 \end{pmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \mathbf{0}

x+y=0x + y = 0, x+2y+z=0x + 2y + z = 0, y+z=0y + z = 0. From the first: x=yx = -y. From the third: z=yz = -y. Eigenvector: (111)\begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix}.

For λ2=2\lambda_2 = 2:

(010111010)(xyz)=0\begin{pmatrix} 0 & 1 & 0 \\ 1 & 1 & 1 \\ 0 & 1 & 0 \end{pmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \mathbf{0}

y=0y = 0, x+z=0x + z = 0. Eigenvector: (101)\begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix}.

For λ3=4\lambda_3 = 4:

(210111012)(xyz)=0\begin{pmatrix} -2 & 1 & 0 \\ 1 & -1 & 1 \\ 0 & 1 & -2 \end{pmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \mathbf{0}

2x+y=0    y=2x-2x + y = 0 \implies y = 2x. y2z=0    z=xy - 2z = 0 \implies z = x. Eigenvector: (121)\begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix}.

Example 10.2: Diagonalisation of a 3x3 matrix

Problem. Using the eigenvalues and eigenvectors from Example 10.1, diagonalise AA and hence find A4A^4.

Solution. P=(111102111)P = \begin{pmatrix} 1 & 1 & 1 \\ -1 & 0 & 2 \\ 1 & -1 & 1 \end{pmatrix}, D=(100020004)D = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 4 \end{pmatrix}.

detP=1(0(2))1((1)2)+1(10)=2+3+1=6\det P = 1(0-(-2)) - 1((-1)-2) + 1(1-0) = 2 + 3 + 1 = 6.

P1=16(202303121)P^{-1} = \frac{1}{6}\begin{pmatrix} 2 & 0 & 2 \\ 3 & 0 & -3 \\ 1 & 2 & 1 \end{pmatrix}

A4=PD4P1A^4 = PD^4P^{-1}:

D4=(100016000256)D^4 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 16 & 0 \\ 0 & 0 & 256 \end{pmatrix}

PD4=(11625610512116256)PD^4 = \begin{pmatrix} 1 & 16 & 256 \\ -1 & 0 & 512 \\ 1 & -16 & 256 \end{pmatrix}

A4=16(11625610512116256)(202303121)A^4 = \frac{1}{6}\begin{pmatrix} 1 & 16 & 256 \\ -1 & 0 & 512 \\ 1 & -16 & 256 \end{pmatrix}\begin{pmatrix} 2 & 0 & 2 \\ 3 & 0 & -3 \\ 1 & 2 & 1 \end{pmatrix}

=16(2+48+256512768+512248+2562+51210242768+512248+256512+2562+48+256)= \frac{1}{6}\begin{pmatrix} 2+48+256 & 512-768+512 & 2-48+256 \\ -2+512 & 1024 & -2-768+512 \\ 2-48+256 & 512+256 & 2+48+256 \end{pmatrix}

=16(3062562105101024258210768306)=(51128/33585512/3433512851)= \frac{1}{6}\begin{pmatrix} 306 & 256 & 210 \\ 510 & 1024 & -258 \\ 210 & 768 & 306 \end{pmatrix} = \begin{pmatrix} 51 & 128/3 & 35 \\ 85 & 512/3 & -43 \\ 35 & 128 & 51 \end{pmatrix}

Example 10.3: Reflection in an arbitrary line

Problem. Find the 2×22 \times 2 matrix representing reflection in the line y=mxy = mx.

Solution. The line y=mxy = mx makes angle θ=arctanm\theta = \arctan m with the xx-axis. The reflection matrix is obtained by:

  1. Rotate by θ-\theta to align the line with the xx-axis.
  2. Reflect in the xx-axis.
  3. Rotate back by θ\theta.

Rθ=(cosθsinθsinθcosθ)R_{-\theta} = \begin{pmatrix} \cos\theta & \sin\theta \\ \sin\theta & -\cos\theta \end{pmatrix}

Wait -- the reflection matrix in a line at angle θ\theta to the xx-axis is:

M=(cos2θsin2θsin2θcos2θ)M = \begin{pmatrix} \cos 2\theta & \sin 2\theta \\ \sin 2\theta & -\cos 2\theta \end{pmatrix}

This can be derived as Rθ(1001)RθR_\theta \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} R_{-\theta}.

For m=1m = 1 (θ=π/4\theta = \pi/4): M=(0110)M = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, which is reflection in y=xy = x (consistent with the standard table).

Example 10.4: Successive transformations and invariant lines

Problem. The transformation TT is represented by A=(3411)A = \begin{pmatrix} 3 & -4 \\ 1 & -1 \end{pmatrix}. Find the invariant lines of TT.

Solution. Characteristic equation: (3λ)(1λ)+4=0(3-\lambda)(-1-\lambda) + 4 = 0

33λ+λ+λ2+4=0    λ22λ+1=0    (λ1)2=0-3 - 3\lambda + \lambda + \lambda^2 + 4 = 0 \implies \lambda^2 - 2\lambda + 1 = 0 \implies (\lambda-1)^2 = 0.

λ=1\lambda = 1 (repeated). Eigenvector: (AI)v=0(A-I)\mathbf{v} = \mathbf{0}:

(2412)(xy)=0    x2y=0\begin{pmatrix} 2 & -4 \\ 1 & -2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \mathbf{0} \implies x - 2y = 0

Eigenvector: (21)\begin{pmatrix} 2 \\ 1 \end{pmatrix}, so the line y=x/2y = x/2 is invariant.

For non-trivial invariant lines not through the origin, try y=mx+cy = mx + c with c0c \neq 0:

(3411)(xmx+c)=((34m)x4c(1m)xc)\begin{pmatrix} 3 & -4 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} x \\ mx+c \end{pmatrix} = \begin{pmatrix} (3-4m)x - 4c \\ (1-m)x - c \end{pmatrix}

For this to lie on y=mx+cy = mx + c: (1m)xc=m(34m)x4mc+c(1-m)x - c = m(3-4m)x - 4mc + c.

Comparing coefficients of xx: 1m=m(34m)=3m4m21 - m = m(3 - 4m) = 3m - 4m^2.

4m24m+1=0    (2m1)2=0    m=1/24m^2 - 4m + 1 = 0 \implies (2m - 1)^2 = 0 \implies m = 1/2

Comparing constants: c=4mc+c    4mc=2c    c(2m1)=0-c = -4mc + c \implies 4mc = 2c \implies c(2m - 1) = 0.

Since m=1/2m = 1/2: c(0)=0c(0) = 0, which is satisfied for all cc.

Therefore every line of the form y=x/2+cy = x/2 + c is invariant under TT.

Example 10.5: Matrix representation of rotation about an arbitrary point

Problem. Find the 3×33 \times 3 matrix (using homogeneous coordinates) that represents a rotation of θ\theta about the point (a,b)(a, b) in the plane.

Solution. Using the homogeneous coordinate system where a point (x,y)(x, y) is represented as (xy1)\begin{pmatrix}x\\y\\1\end{pmatrix}:

  1. Translate by (a,b)(-a, -b) to move the centre to the origin.
  2. Rotate by θ\theta.
  3. Translate back by (a,b)(a, b).

M=(10a01b001)(cosθsinθ0sinθcosθ0001)(10a01b001)M = \begin{pmatrix} 1 & 0 & a \\ 0 & 1 & b \\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & -a \\ 0 & 1 & -b \\ 0 & 0 & 1 \end{pmatrix}

=(cosθsinθa(1cosθ)+bsinθsinθcosθb(1cosθ)asinθ001)= \begin{pmatrix} \cos\theta & -\sin\theta & a(1-\cos\theta)+b\sin\theta \\ \sin\theta & \cos\theta & b(1-\cos\theta)-a\sin\theta \\ 0 & 0 & 1 \end{pmatrix}

Example 10.6: Determinant and area of a triangle

Problem. The vertices of a triangle are A(1,2)A(1, 2), B(4,6)B(4, 6), C(3,1)C(3, -1). Find the area using determinants.

Solution.

Area=12det(121461311)\text{Area} = \frac{1}{2}\left|\det\begin{pmatrix} 1 & 2 & 1 \\ 4 & 6 & 1 \\ 3 & -1 & 1 \end{pmatrix}\right|

Expanding along the third column:

=121463111231+11246= \dfrac{1}{2}\left|1\cdot\begin{vmatrix} 4 & 6 \\ 3 & -1 \end{vmatrix} - 1\cdot\begin{vmatrix} 1 & 2 \\ 3 & -1 \end{vmatrix} + 1\cdot\begin{vmatrix} 1 & 2 \\ 4 & 6 \end{vmatrix}\right|

=12(418)(16)+(68)=1222+72=172= \dfrac{1}{2}|(-4-18) - (-1-6) + (6-8)| = \dfrac{1}{2}|-22 + 7 - 2| = \dfrac{17}{2}

Example 10.7: Solving a system using the inverse

Problem. Solve the system x+2y+z=4x + 2y + z = 4, 2x+y+z=32x + y + z = 3, x+y+2z=5x + y + 2z = 5.

Solution. The system is Ax=bA\mathbf{x} = \mathbf{b} where:

A=(121211112),b=(435)A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 1 & 1 \\ 1 & 1 & 2 \end{pmatrix}, \quad \mathbf{b} = \begin{pmatrix} 4 \\ 3 \\ 5 \end{pmatrix}

detA=1(21)2(41)+1(21)=16+1=4\det A = 1(2-1) - 2(4-1) + 1(2-1) = 1 - 6 + 1 = -4.

Using Cramer's rule:

x=LBdet(421311512)RB◆◆LB4RB=4(21)2(65)+1(35)4=4224=0x = \frac◆LB◆\det\begin{pmatrix} 4 & 2 & 1 \\ 3 & 1 & 1 \\ 5 & 1 & 2 \end{pmatrix}◆RB◆◆LB◆-4◆RB◆ = \frac{4(2-1) - 2(6-5) + 1(3-5)}{-4} = \frac{4 - 2 - 2}{-4} = 0

y=LBdet(141231152)RB◆◆LB4RB=1(65)4(41)+1(103)4=112+74=1y = \frac◆LB◆\det\begin{pmatrix} 1 & 4 & 1 \\ 2 & 3 & 1 \\ 1 & 5 & 2 \end{pmatrix}◆RB◆◆LB◆-4◆RB◆ = \frac{1(6-5) - 4(4-1) + 1(10-3)}{-4} = \frac{1 - 12 + 7}{-4} = 1

z=LBdet(124213115)RB◆◆LB4RB=1(53)2(103)+4(21)4=214+44=2z = \frac◆LB◆\det\begin{pmatrix} 1 & 2 & 4 \\ 2 & 1 & 3 \\ 1 & 1 & 5 \end{pmatrix}◆RB◆◆LB◆-4◆RB◆ = \frac{1(5-3) - 2(10-3) + 4(2-1)}{-4} = \frac{2 - 14 + 4}{-4} = 2

Solution: x=0x = 0, y=1y = 1, z=2z = 2.


11. Connections to Other Topics

11.1 Matrices and complex numbers

Complex numbers a+bia + bi can be represented as (abba)\begin{pmatrix}a & -b\\b & a\end{pmatrix}. Multiplication of complex numbers corresponds to matrix multiplication, and z2=det|z|^2 = \det of this matrix. See Complex Numbers.

11.2 Matrices and vectors

The cross product a×b\mathbf{a}\times\mathbf{b} can be computed as a symbolic determinant with basis vectors i,j,k\mathbf{i}, \mathbf{j}, \mathbf{k}. See Vectors in 3D.

11.3 Eigenvalues and differential equations

Diagonalisation is used to solve systems of coupled linear differential equations. The eigenvalues determine the form of the solution. See Differential Equations.


12. Additional Exam-Style Questions

Question 8

The matrix B=(102020201)B = \begin{pmatrix} 1 & 0 & 2 \\ 0 & 2 & 0 \\ 2 & 0 & 1 \end{pmatrix}.

(a) Find the eigenvalues and eigenvectors of BB.

(b) Verify that BB is diagonalisable and write down PP and DD.

Solution

(a) det(BλI)=1λ0202λ0201λ=(2λ)[(1λ)24]\det(B - \lambda I) = \begin{vmatrix} 1-\lambda & 0 & 2 \\ 0 & 2-\lambda & 0 \\ 2 & 0 & 1-\lambda \end{vmatrix} = (2-\lambda)[(1-\lambda)^2 - 4]

=(2λ)(λ22λ3)=(2λ)(λ3)(λ+1)= (2-\lambda)(\lambda^2 - 2\lambda - 3) = (2-\lambda)(\lambda-3)(\lambda+1).

Eigenvalues: λ1=1\lambda_1 = -1, λ2=2\lambda_2 = 2, λ3=3\lambda_3 = 3.

λ=1\lambda = -1: (202030202)v=0    x+z=0,y=0\begin{pmatrix} 2 & 0 & 2 \\ 0 & 3 & 0 \\ 2 & 0 & 2 \end{pmatrix}\mathbf{v} = \mathbf{0} \implies x + z = 0, y = 0. Eigenvector: (101)\begin{pmatrix}1\\0\\-1\end{pmatrix}.

λ=2\lambda = 2: (102000201)v=0    x=2z\begin{pmatrix} -1 & 0 & 2 \\ 0 & 0 & 0 \\ 2 & 0 & -1 \end{pmatrix}\mathbf{v} = \mathbf{0} \implies x = 2z. Eigenvector: (211)\begin{pmatrix}2\\1\\1\end{pmatrix} (using yy as free variable too).

Actually: x+2z=0    x=2z-x + 2z = 0 \implies x = 2z. yy is free. Eigenvector: (010)\begin{pmatrix}0\\1\\0\end{pmatrix}.

λ=3\lambda = 3: (202010202)v=0    x=z,y=0\begin{pmatrix} -2 & 0 & 2 \\ 0 & -1 & 0 \\ 2 & 0 & -2 \end{pmatrix}\mathbf{v} = \mathbf{0} \implies x = z, y = 0. Eigenvector: (101)\begin{pmatrix}1\\0\\1\end{pmatrix}.

(b) Three independent eigenvectors, so BB is diagonalisable.

P=(101010101),D=(100020003)P = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 1 \end{pmatrix}, \quad D = \begin{pmatrix} -1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{pmatrix}

Question 9

Find the matrix representing an enlargement of scale factor 33 from the point (1,2)(1, 2), using homogeneous coordinates.

Solution

In homogeneous coordinates, this is the composite of translate by (1,2)(-1, -2), enlarge by 33, and translate back by (1,2)(1, 2):

M=(101012001)(300030001)(101012001)=(302034001)M = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 2 \\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & -1 \\ 0 & 1 & -2 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 3 & 0 & -2 \\ 0 & 3 & -4 \\ 0 & 0 & 1 \end{pmatrix}

Question 10

Prove that if AA has eigenvalues λ1,λ2\lambda_1, \lambda_2 with λ1λ2\lambda_1 \neq \lambda_2, then AA is diagonalisable.

Solution

Since λ1λ2\lambda_1 \neq \lambda_2, the eigenvectors v1\mathbf{v}_1 and v2\mathbf{v}_2 satisfy (Aλ1I)v1=0(A - \lambda_1 I)\mathbf{v}_1 = \mathbf{0} and (Aλ2I)v2=0(A - \lambda_2 I)\mathbf{v}_2 = \mathbf{0}.

Suppose v1\mathbf{v}_1 and v2\mathbf{v}_2 are linearly dependent: v2=cv1\mathbf{v}_2 = c\mathbf{v}_1 for some scalar cc.

Then (Aλ2I)v1=0(A - \lambda_2 I)\mathbf{v}_1 = \mathbf{0} (dividing by cc), which means λ1\lambda_1 and λ2\lambda_2 are both eigenvalues with eigenvector v1\mathbf{v}_1. But (Aλ1I)v1=0(A - \lambda_1 I)\mathbf{v}_1 = \mathbf{0} and (Aλ2I)v1=0(A - \lambda_2 I)\mathbf{v}_1 = \mathbf{0} together give (λ1λ2)v1=0(\lambda_1 - \lambda_2)\mathbf{v}_1 = \mathbf{0}, contradicting λ1λ2\lambda_1 \neq \lambda_2 and v10\mathbf{v}_1 \neq \mathbf{0}.

Therefore v1\mathbf{v}_1 and v2\mathbf{v}_2 are linearly independent, PP is invertible, and A=PDP1A = PDP^{-1}. \blacksquare


13. Advanced Worked Examples

Example 13.1: Finding eigenvectors of a symmetric matrix

Problem. Find the eigenvalues and a set of orthonormal eigenvectors of A=(4221)A = \begin{pmatrix}4&2\\2&1\end{pmatrix}.

Solution. det(AλI)=(4λ)(1λ)4=λ25λ=0\det(A-\lambda I) = (4-\lambda)(1-\lambda)-4 = \lambda^2-5\lambda = 0. λ=0,5\lambda = 0, 5.

λ=0\lambda = 0: (4221)v=0    v1=v2/2\begin{pmatrix}4&2\\2&1\end{pmatrix}\mathbf{v}=\mathbf{0} \implies v_1 = -v_2/2. Eigenvector: (1,2)(1,-2), normalised: LB1RB◆◆LB5RB(1,2)\dfrac◆LB◆1◆RB◆◆LB◆\sqrt{5}◆RB◆(1,-2).

λ=5\lambda = 5: (1224)v=0    v1=2v2\begin{pmatrix}-1&2\\2&-4\end{pmatrix}\mathbf{v}=\mathbf{0} \implies v_1 = 2v_2. Eigenvector: (2,1)(2,1), normalised: LB1RB◆◆LB5RB(2,1)\dfrac◆LB◆1◆RB◆◆LB◆\sqrt{5}◆RB◆(2,1).

Orthogonality check: (1)(2)+(2)(1)=0(1)(2)+(-2)(1) = 0. ✓ The eigenvectors are orthogonal (as expected for a symmetric matrix).

Example 13.2: Using diagonalisation to compute a matrix power

Problem. Given A=(3102)A = \begin{pmatrix}3&1\\0&2\end{pmatrix}, find A10A^{10}.

Solution. Eigenvalues: (3λ)(2λ)=0    λ=2,3(3-\lambda)(2-\lambda) = 0 \implies \lambda = 2, 3.

λ=3\lambda = 3: (0101)v=0    v=(1,0)\begin{pmatrix}0&1\\0&-1\end{pmatrix}\mathbf{v}=\mathbf{0} \implies \mathbf{v}=(1,0). λ=2\lambda = 2: (1100)v=0    v=(1,1)\begin{pmatrix}1&1\\0&0\end{pmatrix}\mathbf{v}=\mathbf{0} \implies \mathbf{v}=(1,-1).

P=(1101)P = \begin{pmatrix}1&1\\0&-1\end{pmatrix}, D=(3002)D = \begin{pmatrix}3&0\\0&2\end{pmatrix}, P1=(1101)P^{-1} = \begin{pmatrix}1&1\\0&-1\end{pmatrix}.

A10=PD10P1=(1101)(31000210)(1101)A^{10} = PD^{10}P^{-1} = \begin{pmatrix}1&1\\0&-1\end{pmatrix}\begin{pmatrix}3^{10}&0\\0&2^{10}\end{pmatrix}\begin{pmatrix}1&1\\0&-1\end{pmatrix}

=(1101)(590495904901024)=(590495802501024)= \begin{pmatrix}1&1\\0&-1\end{pmatrix}\begin{pmatrix}59049&59049\\0&-1024\end{pmatrix} = \boxed{\begin{pmatrix}59049&58025\\0&1024\end{pmatrix}}

Example 13.3: Rotation matrix properties

Problem. Show that Rθ=(cosθsinθsinθcosθ)R_\theta = \begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix} satisfies RθRϕ=Rθ+ϕR_\theta R_\phi = R_{\theta+\phi} and Rθ1=RθR_\theta^{-1} = R_{-\theta}.

Solution. RθRϕ=(cosθcosϕsinθsinϕcosθsinϕsinθcosϕsinθcosϕ+cosθsinϕsinθsinϕ+cosθcosϕ)R_\theta R_\phi = \begin{pmatrix}\cos\theta\cos\phi-\sin\theta\sin\phi&-\cos\theta\sin\phi-\sin\theta\cos\phi\\\sin\theta\cos\phi+\cos\theta\sin\phi&-\sin\theta\sin\phi+\cos\theta\cos\phi\end{pmatrix}

=(cos(θ+ϕ)sin(θ+ϕ)sin(θ+ϕ)cos(θ+ϕ))=Rθ+ϕ= \begin{pmatrix}\cos(\theta+\phi)&-\sin(\theta+\phi)\\\sin(\theta+\phi)&\cos(\theta+\phi)\end{pmatrix} = R_{\theta+\phi}. ✓

Rθ1=LB1RB◆◆LBcos2θ+sin2θRB(cosθsinθsinθcosθ)=(cosθsinθsinθcosθ)=RθR_\theta^{-1} = \dfrac◆LB◆1◆RB◆◆LB◆\cos^2\theta+\sin^2\theta◆RB◆\begin{pmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{pmatrix} = \begin{pmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{pmatrix} = R_{-\theta}. ✓

Example 13.4: Determinant and area scaling

Problem. The triangle with vertices (1,0)(1,0), (0,2)(0,2), (3,4)(3,4) is transformed by T=(2113)T = \begin{pmatrix}2&-1\\1&3\end{pmatrix}. Find the area of the image.

Solution. Original area: 12det(01312040)=122+2=0\dfrac{1}{2}\left|\det\begin{pmatrix}0-1&3-1\\2-0&4-0\end{pmatrix}\right| = \dfrac{1}{2}|-2+2| = 0.

Wait, the points are collinear? Let me use (0,0)(0,0), (1,0)(1,0), (0,1)(0,1) instead. Area =12= \dfrac{1}{2}.

det(T)=6+1=7\det(T) = 6+1 = 7. Image area =7×12=3.5= 7 \times \dfrac{1}{2} = \boxed{3.5}.

Example 13.5: Shear transformation

Problem. The matrix S=(1k01)S = \begin{pmatrix}1&k\\0&1\end{pmatrix} represents a shear. Find its eigenvalues and describe the invariant lines.

Solution. det(SλI)=(1λ)2=0\det(S-\lambda I) = (1-\lambda)^2 = 0. Repeated eigenvalue λ=1\lambda = 1.

(SI)v=(0k00)v=0    v2=0(S-I)\mathbf{v} = \begin{pmatrix}0&k\\0&0\end{pmatrix}\mathbf{v} = \mathbf{0} \implies v_2 = 0. Only one eigenvector: (1,0)(1,0).

The xx-axis (y=0y=0) is the only invariant line through the origin. All lines y=cy = c (for any constant cc) are invariant (but not through the origin, except y=0y=0).

Example 13.6: Matrix equation AX=BAX = B

Problem. Solve AX=BAX = B where A=(1235)A = \begin{pmatrix}1&2\\3&5\end{pmatrix} and B=(47712)B = \begin{pmatrix}4&7\\7&12\end{pmatrix}.

Solution. X=A1BX = A^{-1}B. det(A)=56=1\det(A) = 5-6 = -1.

A1=(5231)A^{-1} = \begin{pmatrix}-5&2\\3&-1\end{pmatrix}.

X=(5231)(47712)=(20+1435+241272112)=(61159)X = \begin{pmatrix}-5&2\\3&-1\end{pmatrix}\begin{pmatrix}4&7\\7&12\end{pmatrix} = \begin{pmatrix}-20+14&-35+24\\12-7&21-12\end{pmatrix} = \boxed{\begin{pmatrix}-6&-11\\5&9\end{pmatrix}}


14. Additional Exam-Style Questions

Question 11

The matrix M=(2143)M = \begin{pmatrix}2&-1\\4&-3\end{pmatrix} has eigenvalues λ1=1\lambda_1 = 1 and λ2=2\lambda_2 = -2. Find M4+3MM^4 + 3M.

Solution

By Cayley--Hamilton: M2+M2I=O    M2=M+2IM^2 + M - 2I = O \implies M^2 = -M + 2I.

M3=M(M+2I)=M2+2M=(M+2I)+2M=3M2IM^3 = M(-M+2I) = -M^2+2M = -(-M+2I)+2M = 3M-2I.

M4=M(3M2I)=3M22M=3(M+2I)2M=5M+6IM^4 = M(3M-2I) = 3M^2-2M = 3(-M+2I)-2M = -5M+6I.

M4+3M=5M+6I+3M=2M+6I=2(2143)+6(1001)=(4+6286+6)=(22812)M^4+3M = -5M+6I+3M = -2M+6I = -2\begin{pmatrix}2&-1\\4&-3\end{pmatrix}+6\begin{pmatrix}1&0\\0&1\end{pmatrix} = \begin{pmatrix}-4+6&2\\-8&6+6\end{pmatrix} = \begin{pmatrix}2&2\\-8&12\end{pmatrix}.

Question 12

Prove that similar matrices have the same trace and determinant.

Solution

If B=P1APB = P^{-1}AP, then det(B)=det(P1AP)=det(P1)det(A)det(P)=det(A)\det(B) = \det(P^{-1}AP) = \det(P^{-1})\det(A)\det(P) = \det(A).

tr(B)=tr(P1AP)\text{tr}(B) = \text{tr}(P^{-1}AP). Using the cyclic property of trace: tr(ABC)=tr(CAB)\text{tr}(ABC) = \text{tr}(CAB).

tr(P1AP)=tr(APP1)=tr(A)\text{tr}(P^{-1}AP) = \text{tr}(APP^{-1}) = \text{tr}(A). \blacksquare

Question 13

Find the reflection matrix in the line y=2xy = 2x.

Solution

The line y=2xy = 2x makes angle θ=arctan2\theta = \arctan 2 with the xx-axis.

R=(cos2θsin2θsin2θcos2θ)R = \begin{pmatrix}\cos 2\theta&\sin 2\theta\\\sin 2\theta&-\cos 2\theta\end{pmatrix}.

cosθ=LB1RB◆◆LB5RB\cos\theta = \dfrac◆LB◆1◆RB◆◆LB◆\sqrt{5}◆RB◆, sinθ=LB2RB◆◆LB5RB\sin\theta = \dfrac◆LB◆2◆RB◆◆LB◆\sqrt{5}◆RB◆.

cos2θ=cos2θsin2θ=145=35\cos 2\theta = \cos^2\theta-\sin^2\theta = \dfrac{1-4}{5} = -\dfrac{3}{5}.

sin2θ=2sinθcosθ=45\sin 2\theta = 2\sin\theta\cos\theta = \dfrac{4}{5}.

R=(35454535)R = \begin{pmatrix}-\frac{3}{5}&\frac{4}{5}\\\frac{4}{5}&\frac{3}{5}\end{pmatrix}


16. Further Advanced Topics

16.1 Orthogonal matrices

A matrix QQ is orthogonal if QTQ=QQT=IQ^TQ = QQ^T = I.

Properties:

  • detQ=1|\det Q| = 1
  • Columns and rows form orthonormal bases
  • Q1=QTQ^{-1} = Q^T
  • Orthogonal transformations preserve lengths and angles

Every 2×22\times 2 orthogonal matrix with det=1\det = 1 is a rotation; with det=1\det = -1 it is a reflection.

16.2 Diagonalisation revisited

If AA has nn linearly independent eigenvectors, then A=PDP1A = PDP^{-1} where:

  • PP has eigenvectors as columns
  • DD has eigenvalues on the diagonal

Computing AkA^k: Ak=PDkP1A^k = PD^kP^{-1} — much faster than repeated multiplication.

Computing eAe^A: eA=PeDP1e^A = Pe^DP^{-1} where eDe^D is the diagonal matrix of eλie^{\lambda_i}.

16.3 Cayley-Hamilton theorem

Every square matrix satisfies its own characteristic equation.

If p(λ)=det(λIA)p(\lambda) = \det(\lambda I - A), then p(A)=Op(A) = O.

This can be used to express AnA^n for large nn in terms of lower powers of AA.


17. Further Exam-Style Questions

Question 16

Prove that if AA is orthogonal, then detA=±1\det A = \pm 1.

Solution

det(QTQ)=det(QT)det(Q)=(detQ)2\det(Q^TQ) = \det(Q^T)\det(Q) = (\det Q)^2.

But QTQ=IQ^TQ = I, so det(I)=1\det(I) = 1.

Therefore (detQ)2=1    detQ=±1(\det Q)^2 = 1 \implies \det Q = \pm 1. \blacksquare

Question 17

Find the eigenvalues and eigenvectors of A=(4123)A = \begin{pmatrix}4&1\\2&3\end{pmatrix}, and hence find A5A^5.

Solution

det(AλI)=(4λ)(3λ)2=λ27λ+10=(λ5)(λ2)\det(A-\lambda I) = (4-\lambda)(3-\lambda)-2 = \lambda^2-7\lambda+10 = (\lambda-5)(\lambda-2).

Eigenvalues: λ1=5\lambda_1 = 5, λ2=2\lambda_2 = 2.

λ=5\lambda=5: (A5I)v=0    (1122)(v1v2)=0    v1=(11)(A-5I)\mathbf{v} = \mathbf{0} \implies \begin{pmatrix}-1&1\\2&-2\end{pmatrix}\begin{pmatrix}v_1\\v_2\end{pmatrix} = \mathbf{0} \implies \mathbf{v}_1 = \begin{pmatrix}1\\1\end{pmatrix}.

λ=2\lambda=2: (A2I)v=0    (2121)(v1v2)=0    v2=(12)(A-2I)\mathbf{v} = \mathbf{0} \implies \begin{pmatrix}2&1\\2&1\end{pmatrix}\begin{pmatrix}v_1\\v_2\end{pmatrix} = \mathbf{0} \implies \mathbf{v}_2 = \begin{pmatrix}1\\-2\end{pmatrix}.

P=(1112)P = \begin{pmatrix}1&1\\1&-2\end{pmatrix}, D=(5002)D = \begin{pmatrix}5&0\\0&2\end{pmatrix}, P1=13(2111)P^{-1} = \dfrac{1}{-3}\begin{pmatrix}-2&-1\\-1&1\end{pmatrix}.

A5=PD5P1=13(1112)(31250032)(2111)A^5 = PD^5P^{-1} = \dfrac{1}{3}\begin{pmatrix}1&1\\1&-2\end{pmatrix}\begin{pmatrix}3125&0\\0&32\end{pmatrix}\begin{pmatrix}2&1\\1&-1\end{pmatrix}

=13(312532312564)(2111)=13(6282309361863189)=(2094103120621063)= \dfrac{1}{3}\begin{pmatrix}3125&32\\3125&-64\end{pmatrix}\begin{pmatrix}2&1\\1&-1\end{pmatrix} = \dfrac{1}{3}\begin{pmatrix}6282&3093\\6186&3189\end{pmatrix} = \begin{pmatrix}2094&1031\\2062&1063\end{pmatrix}.