Skip to main content

Matrices and Transformations

Matrices and Transformations

A matrix is a rectangular array of numbers arranged in rows and columns. Matrices provide a powerful framework for solving systems of linear equations, representing geometric transformations, modelling Markov processes, and much more. This topic is central to the IB Mathematics AA course at both SL and HL, with eigenvalues and diagonalisation appearing exclusively at HL.


1. Matrix Fundamentals

Definition and Notation

An m×nm \times n matrix AA is a rectangular array of real numbers with mm rows and nn columns:

A = \begin`\{pmatrix}` a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_`\{mn}` \end`\{pmatrix}`

The entry in row ii and column jj is denoted aija_{ij}. The set of all m×nm \times n real matrices is written {M}m×n({R})\mathcal{'\{'}M{'\}'}_{m \times n}(\mathbb{'\{'}R{'\}'}).

A column vector in {R}n\mathbb{'\{'}R{'\}'}^n is an n×1n \times 1 matrix, and a row vector is a 1×n1 \times n matrix. When the dimensions are equal (m=nm = n), the matrix is called square.

Matrix Addition and Scalar Multiplication

Addition. If A,B{M}m×n({R})A, B \in \mathcal{'\{'}M{'\}'}_{m \times n}(\mathbb{'\{'}R{'\}'}), then A+BA + B is defined entry-wise:

(A + B)_`\{ij}` = a_`\{ij}` + b_`\{ij}`

Scalar multiplication. For k{R}k \in \mathbb{'\{'}R{'\}'} and A{M}m×n({R})A \in \mathcal{'\{'}M{'\}'}_{m \times n}(\mathbb{'\{'}R{'\}'}):

(kA)_`\{ij}` = k \cdot a_`\{ij}`

These operations satisfy the following axioms (making {M}m×n({R})\mathcal{'\{'}M{'\}'}_{m \times n}(\mathbb{'\{'}R{'\}'}) a vector space over {R}\mathbb{'\{'}R{'\}'}):

  • A+B=B+AA + B = B + A (commutativity)
  • (A+B)+C=A+(B+C)(A + B) + C = A + (B + C) (associativity)
  • A+O=AA + O = A, where OO is the m×nm \times n zero matrix
  • k(A+B)=kA+kBk(A + B) = kA + kB (distributivity over matrix addition)
  • (k+l)A=kA+lA(k + l)A = kA + lA (distributivity over scalar addition)
  • k(lA)=(kl)Ak(lA) = (kl)A (associativity of scalar multiplication)

Matrix Multiplication

If AA is m×pm \times p and BB is p×np \times n, then the product C=ABC = AB is an m×nm \times n matrix whose entries are:

c_`\{ij}` = \sum_{k=1}^{p} a_`\{ik}` b_`\{kj}`

This is the dot product of the ii-th row of AA with the jj-th column of BB. The inner dimensions must agree: an m×pm \times p matrix can multiply a p×np \times n matrix, producing an m×nm \times n matrix.

Critical properties:

  • Matrix multiplication is associative: (AB)C=A(BC)(AB)C = A(BC) when the products are defined.
  • Matrix multiplication is distributive over addition: A(B+C)=AB+ACA(B + C) = AB + AC.
  • Matrix multiplication is NOT commutative in general: ABBAAB \neq BA.
  • The existence of ABAB does not imply the existence of BABA.
  • AB=OAB = O does NOT imply A=OA = O or B=OB = O (there are non-trivial zero divisors).
warning

A common error is assuming AB=BAAB = BA. Always check the order of multiplication. In geometric transformations, applying AA then BB corresponds to the product BABA (right-to-left reading).

Special Matrices

Identity matrix. The n×nn \times n identity matrix InI_n has 11 on the main diagonal and 00 elsewhere:

I_n = \begin`\{pmatrix}` 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 \end`\{pmatrix}`

For any m×nm \times n matrix AA: ImA=AIn=AI_m A = A I_n = A.

Zero matrix. The m×nm \times n zero matrix OmnO_{mn} has all entries equal to zero. For any compatible matrix AA: OA=AO=OOA = AO = O.

Diagonal matrix. A square matrix DD is diagonal if dij=0d_{ij} = 0 for all iji \neq j. We write D=diag(d1,d2,,dn)D = \mathrm{diag}(d_1, d_2, \ldots, d_n).

Transpose of a Matrix

The transpose of A{M}m×n({R})A \in \mathcal{'\{'}M{'\}'}_{m \times n}(\mathbb{'\{'}R{'\}'}), written ATA^T, is the n×mn \times m matrix obtained by interchanging rows and columns:

(A^T)_`\{ij}` = a_`\{ji}`

Properties of the transpose:

  • (AT)T=A(A^T)^T = A
  • (A+B)T=AT+BT(A + B)^T = A^T + B^T
  • (kA)T=kAT(kA)^T = kA^T
  • (AB)T=BTAT(AB)^T = B^T A^T (note the reversal)

Symmetric and Skew-Symmetric Matrices

A square matrix AA is symmetric if AT=AA^T = A, i.e. aij=ajia_{ij} = a_{ji} for all i,ji, j.

A square matrix AA is skew-symmetric (or anti-symmetric) if AT=AA^T = -A, i.e. aij=ajia_{ij} = -a_{ji}. This implies aii=0a_{ii} = 0 for all diagonal entries.

Every square matrix AA can be uniquely decomposed as:

A=12(A+AT)+12(AAT)A = \frac{1}{2}(A + A^T) + \frac{1}{2}(A - A^T)

where 12(A+AT)\frac{1}{2}(A + A^T) is symmetric and 12(AAT)\frac{1}{2}(A - A^T) is skew-symmetric.

Worked Example: Symmetric and Skew-Symmetric Decomposition

Decompose A=(3512)A = \begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} into symmetric and skew-symmetric parts.

AT=(3152)A^T = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}

Symmetric part:

S=12(A+AT)=12(6664)=(3332)S = \frac{1}{2}(A + A^T) = \frac{1}{2}\begin{pmatrix} 6 & 6 \\ 6 & 4 \end{pmatrix} = \begin{pmatrix} 3 & 3 \\ 3 & 2 \end{pmatrix}

Skew-symmetric part:

K=12(AAT)=12(0440)=(0220)K = \frac{1}{2}(A - A^T) = \frac{1}{2}\begin{pmatrix} 0 & 4 \\ -4 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 2 \\ -2 & 0 \end{pmatrix}

Check: S+K=(3512)=AS + K = \begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} = A.


2. Determinants

2x2 Determinant

For a 2×22 \times 2 matrix:

A = \begin`\{pmatrix}` a & b \\ c & d \end`\{pmatrix}`

the determinant is:

det(A)=A=adbc\det(A) = |A| = ad - bc

The determinant is a scalar that encodes important information about the matrix, including whether it is invertible and how it scales area (or volume).

3x3 Determinant -- Cofactor Expansion

For a 3×33 \times 3 matrix:

A = \begin`\{pmatrix}` a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end`\{pmatrix}`

the determinant can be computed by cofactor expansion along any row or column. Expanding along row 1:

det(A)=a11C11+a12C12+a13C13\det(A) = a_{11} C_{11} + a_{12} C_{12} + a_{13} C_{13}

where the cofactor Cij=(1)i+jMijC_{ij} = (-1)^{i+j} M_{ij}, and MijM_{ij} is the minor (determinant of the 2×22 \times 2 submatrix obtained by deleting row ii and column jj).

Explicitly:

det(A)=a11(a22a33a23a32)a12(a21a33a23a31)+a13(a21a32a22a31)\det(A) = a_{11}(a_{22}a_{33} - a_{23}a_{32}) - a_{12}(a_{21}a_{33} - a_{23}a_{31}) + a_{13}(a_{21}a_{32} - a_{22}a_{31})

Rule of Sarrus (mnemonic for 3×33 \times 3 only): Copy the first two columns to the right of the matrix. Sum the products of the three downward diagonals, then subtract the products of the three upward diagonals. This is NOT valid for matrices larger than 3×33 \times 3.

Properties of Determinants

Let AA and BB be n×nn \times n matrices and k{R}k \in \mathbb{'\{'}R{'\}'}.

  1. det(AT)=det(A)\det(A^T) = \det(A)
  2. det(AB)=det(A)det(B)\det(AB) = \det(A) \cdot \det(B)
  3. det(kA)=kndet(A)\det(kA) = k^n \det(A) (multiply each of the nn rows by kk)
  4. Swapping two rows (or columns) changes the sign: det(A)=det(A)\det(A') = -\det(A)
  5. Multiplying a single row (or column) by kk multiplies the determinant by kk
  6. Adding a multiple of one row to another leaves the determinant unchanged
  7. If AA has a row (or column) of zeros, then det(A)=0\det(A) = 0
  8. If AA has two identical rows (or columns), then det(A)=0\det(A) = 0
  9. If AA is triangular (upper or lower), then det(A)\det(A) is the product of the diagonal entries
  10. AA is invertible if and only if det(A)0\det(A) \neq 0

Geometric Interpretation

For a 2×22 \times 2 matrix AA representing a linear transformation of the plane:

  • det(A)|\det(A)| equals the area scale factor: the ratio of the area of the image of a region to the area of the original region.
  • If det(A)>0\det(A) \gt 0, the transformation preserves orientation.
  • If det(A)<0\det(A) \lt 0, the transformation reverses orientation (e.g. a reflection).
  • If det(A)=0\det(A) = 0, the transformation collapses the plane onto a line or a point (not invertible).

For a 3×33 \times 3 matrix, det(A)|\det(A)| is the volume scale factor for the corresponding transformation of {R}3\mathbb{'\{'}R{'\}'}^3.

Worked Example: 3x3 Determinant

Find the determinant of:

A=(102311201)A = \begin{pmatrix} 1 & 0 & 2 \\ 3 & 1 & -1 \\ 2 & 0 & 1 \end{pmatrix}

Expanding along column 2 (which has many zeros):

det(A)=0C12+1C22+0C32=C22\det(A) = 0 \cdot C_{12} + 1 \cdot C_{22} + 0 \cdot C_{32} = C_{22}

C22=(1)2+21221=1(1)2(2)=3C_{22} = (-1)^{2+2}\begin{vmatrix} 1 & 2 \\ 2 & 1 \end{vmatrix} = 1(1) - 2(2) = -3

So det(A)=3\det(A) = -3.


3. Matrix Inverses

Definition

An n×nn \times n matrix AA is invertible (or non-singular) if there exists an n×nn \times n matrix A1A^{-1} such that:

AA1=A1A=InAA^{-1} = A^{-1}A = I_n

The inverse is unique when it exists. A square matrix is invertible if and only if det(A)0\det(A) \neq 0.

2x2 Inverse Formula

For A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} with det(A)=adbc0\det(A) = ad - bc \neq 0:

A^{-1} = \frac{1}{ad - bc} \begin`\{pmatrix}` d & -b \\ -c & a \end`\{pmatrix}`

This is obtained by swapping the diagonal entries, negating the off-diagonal entries, and dividing by the determinant. The matrix of cofactors (with the sign change) is called the adjugate or adjoint of AA.

3x3 Inverse -- Adjugate Method

For a 3×33 \times 3 matrix AA, the inverse is given by:

A1=1det(A)adj(A)A^{-1} = \frac{1}{\det(A)} \mathrm{adj}(A)

where adj(A)\mathrm{adj}(A) is the adjugate (transpose of the cofactor matrix).

The cofactor matrix Cof(A)\mathrm{Cof}(A) has entries Cij=(1)i+jMijC_{ij} = (-1)^{i+j} M_{ij}. The adjugate is:

adj(A)=(Cof(A))T\mathrm{adj}(A) = (\mathrm{Cof}(A))^T

Procedure:

  1. Compute each of the nine minors MijM_{ij} (determinants of the nine 2×22 \times 2 submatrices).
  2. Apply the sign pattern (1)i+j(-1)^{i+j} to obtain the cofactors CijC_{ij}.
  3. Form the cofactor matrix and take its transpose to get adj(A)\mathrm{adj}(A).
  4. Divide every entry by det(A)\det(A).
Worked Example: 3x3 Inverse

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

Step 1: Compute det(A)\det(A), expanding along row 1:

det(A)=2110110111+0=2(1)1(1)=3\det(A) = 2\begin{vmatrix} 1 & 1 \\ 0 & 1 \end{vmatrix} - 1\begin{vmatrix} 0 & 1 \\ 1 & 1 \end{vmatrix} + 0 = 2(1) - 1(-1) = 3

Step 2: Compute cofactors:

C11=+1101=1C_{11} = +\begin{vmatrix} 1 & 1 \\ 0 & 1 \end{vmatrix} = 1, C12=0111=1C_{12} = -\begin{vmatrix} 0 & 1 \\ 1 & 1 \end{vmatrix} = 1, C13=+0110=1C_{13} = +\begin{vmatrix} 0 & 1 \\ 1 & 0 \end{vmatrix} = -1

C21=1001=1C_{21} = -\begin{vmatrix} 1 & 0 \\ 0 & 1 \end{vmatrix} = -1, C22=+2011=2C_{22} = +\begin{vmatrix} 2 & 0 \\ 1 & 1 \end{vmatrix} = 2, C23=2110=1C_{23} = -\begin{vmatrix} 2 & 1 \\ 1 & 0 \end{vmatrix} = 1

C31=+1011=1C_{31} = +\begin{vmatrix} 1 & 0 \\ 1 & 1 \end{vmatrix} = 1, C32=2001=2C_{32} = -\begin{vmatrix} 2 & 0 \\ 0 & 1 \end{vmatrix} = -2, C33=+2101=2C_{33} = +\begin{vmatrix} 2 & 1 \\ 0 & 1 \end{vmatrix} = 2

Cofactor matrix: (111121122)\begin{pmatrix} 1 & 1 & -1 \\ -1 & 2 & 1 \\ 1 & -2 & 2 \end{pmatrix}

Step 3: Transpose: adj(A)=(111122112)\mathrm{adj}(A) = \begin{pmatrix} 1 & -1 & 1 \\ 1 & 2 & -2 \\ -1 & 1 & 2 \end{pmatrix}

Step 4: Divide by det(A)=3\det(A) = 3:

A1=13(111122112)A^{-1} = \frac{1}{3}\begin{pmatrix} 1 & -1 & 1 \\ 1 & 2 & -2 \\ -1 & 1 & 2 \end{pmatrix}

Properties of the Inverse

  • (A1)1=A(A^{-1})^{-1} = A
  • (AB)1=B1A1(AB)^{-1} = B^{-1}A^{-1} (order reverses)
  • (AT)1=(A1)T(A^T)^{-1} = (A^{-1})^T
  • det(A1)=1det(A)\det(A^{-1}) = \dfrac{1}{\det(A)}

Solving Systems of Linear Equations

A system of nn linear equations in nn unknowns can be written in matrix form as A{x}={b}A\mathbf{'\{'}x{'\}'} = \mathbf{'\{'}b{'\}'}, where AA is the coefficient matrix, {x}\mathbf{'\{'}x{'\}'} is the column vector of unknowns, and {b}\mathbf{'\{'}b{'\}'} is the column vector of constants.

If AA is invertible, the unique solution is:

{x}=A1{b}\mathbf{'\{'}x{'\}'} = A^{-1}\mathbf{'\{'}b{'\}'}

For a 2×22 \times 2 system:

\begin`\{pmatrix}` a & b \\ c & d \end`\{pmatrix}` \begin`\{pmatrix}` x \\ y \end`\{pmatrix}` = \begin`\{pmatrix}` e \\ f \end`\{pmatrix}`

the solution is:

\begin`\{pmatrix}` x \\ y \end`\{pmatrix}` = \frac{1}{ad - bc} \begin`\{pmatrix}` d & -b \\ -c & a \end`\{pmatrix}` \begin`\{pmatrix}` e \\ f \end`\{pmatrix}` = \frac{1}{ad - bc} \begin`\{pmatrix}` de - bf \\ -ce + af \end`\{pmatrix}`
Examples
Expand

Solve the system:

2x+3y=82x + 3y = 8 and xy=1x - y = 1

In matrix form: (2311)(xy)=(81)\begin{pmatrix} 2 & 3 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 8 \\ 1 \end{pmatrix}

det(A)=(2)(1)(3)(1)=5\det(A) = (2)(-1) - (3)(1) = -5

A1=15(1312)=(0.20.60.20.4)A^{-1} = \dfrac{1}{-5}\begin{pmatrix} -1 & -3 \\ -1 & 2 \end{pmatrix} = \begin{pmatrix} 0.2 & 0.6 \\ 0.2 & -0.4 \end{pmatrix}

(xy)=(0.20.60.20.4)(81)=(2.21.2)\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0.2 & 0.6 \\ 0.2 & -0.4 \end{pmatrix} \begin{pmatrix} 8 \\ 1 \end{pmatrix} = \begin{pmatrix} 2.2 \\ 1.2 \end{pmatrix}

So x=115x = \frac{11}{5} and y=65y = \frac{6}{5}.


4. 2D Geometric Transformations

Every linear transformation T:{R}2{R}2T: \mathbb{'\{'}R{'\}'}^2 \to \mathbb{'\{'}R{'\}'}^2 can be represented by a 2×22 \times 2 matrix MM such that T({v})=M{v}T(\mathbf{'\{'}v{'\}'}) = M\mathbf{'\{'}v{'\}'}. The images of the standard basis vectors (10)\begin{pmatrix} 1 \\ 0 \end{pmatrix} and (01)\begin{pmatrix} 0 \\ 1 \end{pmatrix} form the columns of MM.

Reflections

A reflection maps every point to its mirror image across a specified line. The determinant of any reflection matrix is 1-1 (orientation is reversed).

Reflection in the xx-axis:

R_x = \begin`\{pmatrix}` 1 & 0 \\ 0 & -1 \end`\{pmatrix}`

Reflection in the yy-axis:

R_y = \begin`\{pmatrix}` -1 & 0 \\ 0 & 1 \end`\{pmatrix}`

Reflection in the line y=xy = x:

R_{y=x} = \begin`\{pmatrix}` 0 & 1 \\ 1 & 0 \end`\{pmatrix}`

Reflection in the line y=xy = -x:

R_{y=-x} = \begin`\{pmatrix}` 0 & -1 \\ -1 & 0 \end`\{pmatrix}`

Reflection in the line y=(tanθ)xy = (\tan\theta)\,x (a line through the origin making angle θ\theta with the positive xx-axis):

R_\theta = \begin`\{pmatrix}` \cos 2\theta & \sin 2\theta \\ \sin 2\theta & -\cos 2\theta \end`\{pmatrix}`

Rotations

An anticlockwise rotation about the origin through an angle θ\theta is represented by:

R_\theta = \begin`\{pmatrix}` \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end`\{pmatrix}`

Key properties of rotation matrices:

  • det(Rθ)=cos2θ+sin2θ=1\det(R_\theta) = \cos^2\theta + \sin^2\theta = 1 (area-preserving, orientation-preserving)
  • Rθ1=Rθ=RθTR_\theta^{-1} = R_{-\theta} = R_\theta^T (rotation matrices are orthogonal)
  • RαRβ=Rα+βR_\alpha R_\beta = R_{\alpha + \beta} (composition of rotations adds angles)

Common rotations:

AngleMatrix
9090^\circ(0110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}
180180^\circ(1001)\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}
270270^\circ(0110)\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}
6060^\circ(12323212)\begin{pmatrix} \frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & \frac{1}{2} \end{pmatrix}
4545^\circ(22222222)\begin{pmatrix} \frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} \end{pmatrix}

Enlargements (Dilations)

An enlargement with scale factor kk about the origin scales all distances by k|k| and, if k<0k \lt 0, also rotates by 180180^\circ.

E_k = \begin`\{pmatrix}` k & 0 \\ 0 & k \end`\{pmatrix}`
  • det(Ek)=k2\det(E_k) = k^2, so the area scale factor is k2k^2.
  • For k=1k = 1, this is the identity transformation.
  • For k=1k = -1, this is equivalent to a rotation of 180180^\circ about the origin.

Stretches. A stretch parallel to the xx-axis with scale factor kk:

S_x = \begin`\{pmatrix}` k & 0 \\ 0 & 1 \end`\{pmatrix}`

A stretch parallel to the yy-axis with scale factor kk:

S_y = \begin`\{pmatrix}` 1 & 0 \\ 0 & k \end`\{pmatrix}`

For a stretch parallel to the xx-axis, det(Sx)=k\det(S_x) = k, so the area scale factor is k|k|. If 0<k<10 \lt k \lt 1, the figure is compressed; if k>1k \gt 1, it is expanded.

Shears. A horizontal shear with shear factor kk fixes every point on the xx-axis and shifts other points horizontally in proportion to their yy-coordinate:

H_x = \begin`\{pmatrix}` 1 & k \\ 0 & 1 \end`\{pmatrix}`

A vertical shear with shear factor kk:

H_y = \begin`\{pmatrix}` 1 & 0 \\ k & 1 \end`\{pmatrix}`

For any shear matrix, det=1\det = 1, so area is preserved. The xx-axis (for HxH_x) or yy-axis (for HyH_y) is point-wise invariant.

Composite Transformations

If transformation AA is applied first, followed by transformation BB, the composite transformation is represented by the product BABA (note the order: right to left).

{v}=B(A{v})=(BA){v}\mathbf{'\{'}v{'\}'}' = B(A\mathbf{'\{'}v{'\}'}) = (BA)\mathbf{'\{'}v{'\}'}

Example. A rotation of 9090^\circ anticlockwise followed by a reflection in the xx-axis:

\begin`\{pmatrix}` 1 & 0 \\ 0 & -1 \end`\{pmatrix}` \begin`\{pmatrix}` 0 & -1 \\ 1 & 0 \end`\{pmatrix}` = \begin`\{pmatrix}` 0 & -1 \\ -1 & 0 \end`\{pmatrix}`

This is equivalent to a single reflection in the line y=xy = -x.

Worked Example: Composite Transformation

Find the image of the point (2,3)(2, 3) under a rotation of 9090^\circ anticlockwise about the origin followed by a reflection in the line y=xy = x.

Rotation matrix:

R90=(0110)R_{90} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}

Reflection in y=xy = x:

Ry=x=(0110)R_{y=x} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}

Composite (reflection applied after rotation):

M=Ry=xR90=(0110)(0110)=(1001)M = R_{y=x} \cdot R_{90} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

This is a reflection in the xx-axis! Apply to (2,3)(2, 3):

(1001)(23)=(23)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}\begin{pmatrix} 2 \\ 3 \end{pmatrix} = \begin{pmatrix} 2 \\ -3 \end{pmatrix}

The image is (2,3)(2, -3).

Inverse of a composite. Since (BA)1=A1B1(BA)^{-1} = A^{-1}B^{-1}, to undo a composite transformation, the individual inverses are applied in reverse order.

Invariant Points and Invariant Lines

An invariant point under transformation MM is a point {v}\mathbf{'\{'}v{'\}'} such that M{v}={v}M\mathbf{'\{'}v{'\}'} = \mathbf{'\{'}v{'\}'}, i.e. (MI){v}={0}(M - I)\mathbf{'\{'}v{'\}'} = \mathbf{'\{'}0{'\}'}. The set of invariant points forms the null space of MIM - I.

For any 2×22 \times 2 transformation matrix, the origin is always invariant.

An invariant line is a line that is mapped onto itself (though individual points on the line may move along it). A line through the origin with direction vector {d}\mathbf{'\{'}d{'\}'} is invariant if M{d}=λ{d}M\mathbf{'\{'}d{'\}'} = \lambda \mathbf{'\{'}d{'\}'} for some scalar λ\lambda, which means {d}\mathbf{'\{'}d{'\}'} is an eigenvector of MM.

A line is point-wise invariant (every point is fixed) if and only if every point on it is an invariant point, meaning the line lies entirely in the null space of MIM - I.

Not all invariant lines are point-wise invariant. For example, a stretch parallel to the xx-axis (k001)\begin{pmatrix} k & 0 \\ 0 & 1 \end{pmatrix} leaves the xx-axis point-wise invariant and also leaves the yy-axis invariant as a line (each point (0,y)(0, y) maps to itself), but it leaves every line parallel to the xx-axis invariant as a line (points slide along it), not point-wise.

For a reflection, the mirror line is point-wise invariant and the line perpendicular to it through the origin is invariant as a set (points are reflected across the mirror line but remain on the perpendicular line).

Area Scale Factor

For any 2×22 \times 2 matrix MM representing a linear transformation of the plane, the area scale factor is det(M)|\det(M)|. This means:

  • If det(M)=1|\det(M)| = 1, the transformation preserves area (e.g. rotations, reflections).
  • If det(M)=k2|\det(M)| = k^2, the area of any region is multiplied by k2k^2 (e.g. enlargement by scale factor kk).
  • If det(M)=0\det(M) = 0, the transformation is singular and collapses the plane to a line or point.

This extends to 3×33 \times 3 matrices where det(M)|\det(M)| is the volume scale factor.


5. Eigenvalues and Eigenvectors (AHL)

Motivation

When a linear transformation acts on a vector, the vector is generally rotated and scaled. Certain special vectors, called eigenvectors, are only scaled (stretched or compressed) by the transformation, not rotated. The factor by which an eigenvector is scaled is the corresponding eigenvalue.

Formal Definition

Let AA be an n×nn \times n matrix. A scalar λ\lambda is an eigenvalue of AA if there exists a non-zero vector {v}\mathbf{'\{'}v{'\}'} (the corresponding eigenvector) such that:

A{v}=λ{v}A\mathbf{'\{'}v{'\}'} = \lambda \mathbf{'\{'}v{'\}'}

Equivalently: (AλI){v}={0}(A - \lambda I)\mathbf{'\{'}v{'\}'} = \mathbf{'\{'}0{'\}'}.

For a non-trivial solution {v}{0}\mathbf{'\{'}v{'\}'} \neq \mathbf{'\{'}0{'\}'} to exist, we require:

det(AλI)=0\det(A - \lambda I) = 0

Characteristic Equation

The equation det(AλI)=0\det(A - \lambda I) = 0 is the characteristic equation of AA. For a 2×22 \times 2 matrix A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}:

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

Expanding:

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

Notice that a+d=tr(A)a + d = \mathrm{tr}(A) (the trace of AA) and adbc=det(A)ad - bc = \det(A). Therefore:

λ2tr(A)λ+det(A)=0\lambda^2 - \mathrm{tr}(A)\lambda + \det(A) = 0

For a 3×33 \times 3 matrix, the characteristic equation is a cubic:

det(AλI)=λ3+tr(A)λ2Sλ+det(A)=0\det(A - \lambda I) = -\lambda^3 + \mathrm{tr}(A)\lambda^2 - S\lambda + \det(A) = 0

where SS is the sum of the principal 2×22 \times 2 minors (the sum of the determinants of the matrices obtained by deleting each row and the corresponding column).

Fundamental properties of eigenvalues:

  • The sum of the eigenvalues equals the trace: λ1+λ2++λn=tr(A)\lambda_1 + \lambda_2 + \cdots + \lambda_n = \mathrm{tr}(A).
  • The product of the eigenvalues equals the determinant: λ1λ2λn=det(A)\lambda_1 \lambda_2 \cdots \lambda_n = \det(A).
  • A matrix is invertible if and only if none of its eigenvalues is zero.
  • The eigenvalues of AkA^k are λ1k,λ2k,,λnk\lambda_1^k, \lambda_2^k, \ldots, \lambda_n^k.

Finding Eigenvectors

Once an eigenvalue λ\lambda is known, the corresponding eigenvectors are found by solving:

(AλI){v}={0}(A - \lambda I)\mathbf{'\{'}v{'\}'} = \mathbf{'\{'}0{'\}'}

This is a homogeneous system. Since det(AλI)=0\det(A - \lambda I) = 0, the rows of AλIA - \lambda I are linearly dependent, and the system has infinitely many solutions forming a one-dimensional subspace (a line through the origin) for each distinct eigenvalue.

Important: Eigenvectors are determined only up to a non-zero scalar multiple. Any non-zero multiple of an eigenvector is also an eigenvector for the same eigenvalue.

Repeated Eigenvalues

When the characteristic equation has a repeated root (a repeated eigenvalue), the matrix may or may not be diagonalisable.

  • Geometric multiplicity \leq algebraic multiplicity. The algebraic multiplicity of an eigenvalue is its multiplicity as a root of the characteristic equation. The geometric multiplicity is the dimension of the corresponding eigenspace (the number of linearly independent eigenvectors for that eigenvalue).
  • A matrix is diagonalisable if and only if the geometric multiplicity of each eigenvalue equals its algebraic multiplicity.
  • If the geometric multiplicity is strictly less than the algebraic multiplicity, the matrix is defective and cannot be diagonalised.

For a 2×22 \times 2 matrix with a repeated eigenvalue λ\lambda:

  • If A=λIA = \lambda I, then every non-zero vector is an eigenvector (geometric multiplicity =2= 2), and AA is diagonalisable (it is already diagonal).
  • If AλIA \neq \lambda I but has a repeated eigenvalue, the geometric multiplicity is typically 11, and AA is not diagonalisable.

3x3 Eigenvalue Problems

For a 3×33 \times 3 matrix, the characteristic equation is a cubic polynomial in λ\lambda. The cubic can have three distinct real roots, one repeated and one distinct real root, or one real root and two complex conjugate roots. Since the IB course works over {R}\mathbb{'\{'}R{'\}'}, only real eigenvalues and eigenvectors are considered.

Examples
Expand

Find the eigenvalues and eigenvectors of

A=(200031002)A = \begin{pmatrix} 2 & 0 & 0 \\ 0 & 3 & 1 \\ 0 & 0 & 2 \end{pmatrix}

Characteristic equation:

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

Expanding along the first column:

(2λ)3λ102λ=(2λ)(3λ)(2λ)=0(2 - \lambda)\begin{vmatrix} 3 - \lambda & 1 \\ 0 & 2 - \lambda \end{vmatrix} = (2 - \lambda)(3 - \lambda)(2 - \lambda) = 0

(2λ)2(3λ)=0(2 - \lambda)^2(3 - \lambda) = 0

λ1=3\lambda_1 = 3 (algebraic multiplicity 1), λ2=2\lambda_2 = 2 (algebraic multiplicity 2)

Eigenvector for λ1=3\lambda_1 = 3:

(100001001)(v1v2v3)=(000)\begin{pmatrix} -1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & -1 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}

v1=0-v_1 = 0, v3=0v_3 = 0, v2v_2 is free. Eigenvector: (010)\begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}.

Eigenvector for λ2=2\lambda_2 = 2:

(000011000)(v1v2v3)=(000)\begin{pmatrix} 0 & 0 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}

v2+v3=0v_2 + v_3 = 0, v3=v2v_3 = -v_2, and v1v_1 is free. Two linearly independent eigenvectors: (100)\begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} and (011)\begin{pmatrix} 0 \\ 1 \\ -1 \end{pmatrix}.

Since the geometric multiplicity of λ2=2\lambda_2 = 2 equals its algebraic multiplicity (both =2= 2), the matrix is diagonalisable. The total number of linearly independent eigenvectors is 33.

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

Characteristic equation:

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

λ27λ+10=0\lambda^2 - 7\lambda + 10 = 0

(λ5)(λ2)=0(\lambda - 5)(\lambda - 2) = 0

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

Eigenvector for λ1=5\lambda_1 = 5:

(451235)(v1v2)=(00)\begin{pmatrix} 4 - 5 & 1 \\ 2 & 3 - 5 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

(1122)(v1v2)=(00)\begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

From the first row: v1+v2=0-v_1 + v_2 = 0, so v1=v2v_1 = v_2. The eigenvector is (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix} (up to scalar multiples).

Eigenvector for λ2=2\lambda_2 = 2:

(421232)(v1v2)=(00)\begin{pmatrix} 4 - 2 & 1 \\ 2 & 3 - 2 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

(2121)(v1v2)=(00)\begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

From the first row: 2v1+v2=02v_1 + v_2 = 0, so v2=2v1v_2 = -2v_1. The eigenvector is (12)\begin{pmatrix} 1 \\ -2 \end{pmatrix}.

Diagonalisation

An n×nn \times n matrix AA is diagonalisable if there exists an invertible matrix PP and a diagonal matrix DD such that:

A=PDP1A = PDP^{-1}

The columns of PP are the eigenvectors of AA, and the diagonal entries of DD are the corresponding eigenvalues.

Theorem. An n×nn \times n matrix is diagonalisable if and only if it has nn linearly independent eigenvectors. This is guaranteed when AA has nn distinct eigenvalues.

Procedure for diagonalising a 2×22 \times 2 matrix:

  1. Find the eigenvalues by solving det(AλI)=0\det(A - \lambda I) = 0.
  2. Find a corresponding eigenvector for each eigenvalue.
  3. Form P=({v}1{v}2)P = \begin{pmatrix} \mathbf{'\{'}v{'\}'}_1 & \mathbf{'\{'}v{'\}'}_2 \end{pmatrix} (eigenvectors as columns).
  4. Form D=(λ100λ2)D = \begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix}.
  5. Verify: A=PDP1A = PDP^{-1}, or equivalently, P1AP=DP^{-1}AP = D.

Matrix Powers via Diagonalisation

One of the most powerful applications of diagonalisation is computing large matrix powers. If A=PDP1A = PDP^{-1}, then:

Ak=PDkP1A^k = PD^k P^{-1}

where Dk=(λ1k00λ2k)D^k = \begin{pmatrix} \lambda_1^k & 0 \\ 0 & \lambda_2^k \end{pmatrix} for a 2×22 \times 2 case.

This transforms the problem of computing AkA^k (which would require k1k-1 matrix multiplications) into computing three matrix products, which is dramatically more efficient.

Examples
Expand

Find A5A^5 where A=(4123)A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}

From the previous example: λ1=5\lambda_1 = 5, λ2=2\lambda_2 = 2, {v}1=(11)\mathbf{'\{'}v{'\}'}_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}, {v}2=(12)\mathbf{'\{'}v{'\}'}_2 = \begin{pmatrix} 1 \\ -2 \end{pmatrix}.

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

det(P)=21=3\det(P) = -2 - 1 = -3

P1=13(2111)=(23131313)P^{-1} = \frac{1}{-3}\begin{pmatrix} -2 & -1 \\ -1 & 1 \end{pmatrix} = \begin{pmatrix} \frac{2}{3} & \frac{1}{3} \\ \frac{1}{3} & -\frac{1}{3} \end{pmatrix}

D5=(31250032)D^5 = \begin{pmatrix} 3125 & 0 \\ 0 & 32 \end{pmatrix}

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

=(312532312564)(23131313)= \begin{pmatrix} 3125 & 32 \\ 3125 & -64 \end{pmatrix} \begin{pmatrix} \frac{2}{3} & \frac{1}{3} \\ \frac{1}{3} & -\frac{1}{3} \end{pmatrix}

=(62823309336186331893)=(2094103120621063)= \begin{pmatrix} \frac{6282}{3} & \frac{3093}{3} \\ \frac{6186}{3} & \frac{3189}{3} \end{pmatrix} = \begin{pmatrix} 2094 & 1031 \\ 2062 & 1063 \end{pmatrix}


6. Applications

Gaussian Elimination

Gaussian elimination is a systematic method for solving systems of linear equations by reducing the augmented matrix to row echelon form (REF) or reduced row echelon form (RREF).

Elementary row operations:

  1. Swap two rows (RiRjR_i \leftrightarrow R_j).
  2. Multiply a row by a non-zero scalar (RikRiR_i \to kR_i).
  3. Add a multiple of one row to another (RiRi+kRjR_i \to R_i + kR_j).

Algorithm (for an n×nn \times n system):

  1. Form the augmented matrix [A{b}][A \mid \mathbf{'\{'}b{'\}'}].
  2. Use row operations to create zeros below each pivot (forward elimination).
  3. Back-substitute to find the solution.

Existence and uniqueness:

  • If rank(A)=rank([A{b}])=n\mathrm{rank}(A) = \mathrm{rank}([A \mid \mathbf{'\{'}b{'\}'}]) = n: unique solution.
  • If rank(A)=rank([A{b}])<n\mathrm{rank}(A) = \mathrm{rank}([A \mid \mathbf{'\{'}b{'\}'}]) \lt n: infinitely many solutions.
  • If rank(A)<rank([A{b}])\mathrm{rank}(A) \lt \mathrm{rank}([A \mid \mathbf{'\{'}b{'\}'}]): no solution (inconsistent system).
Examples
Expand

Solve the system:

x+2y+z=5x + 2y + z = 5, 2x+5y+3z=132x + 5y + 3z = 13, x+3y+3z=10x + 3y + 3z = 10

Augmented matrix:

(12152531313310)\begin{pmatrix} 1 & 2 & 1 & \mid & 5 \\ 2 & 5 & 3 & \mid & 13 \\ 1 & 3 & 3 & \mid & 10 \end{pmatrix}

R2R22R1R_2 \to R_2 - 2R_1, R3R3R1R_3 \to R_3 - R_1:

(121501130125)\begin{pmatrix} 1 & 2 & 1 & \mid & 5 \\ 0 & 1 & 1 & \mid & 3 \\ 0 & 1 & 2 & \mid & 5 \end{pmatrix}

R3R3R2R_3 \to R_3 - R_2:

(121501130012)\begin{pmatrix} 1 & 2 & 1 & \mid & 5 \\ 0 & 1 & 1 & \mid & 3 \\ 0 & 0 & 1 & \mid & 2 \end{pmatrix}

Back-substitution: z=2z = 2, y+z=3y=1y + z = 3 \Rightarrow y = 1, x+2(1)+2=5x=1x + 2(1) + 2 = 5 \Rightarrow x = 1.

Solution: (x,y,z)=(1,1,2)(x, y, z) = (1, 1, 2).

Cramer's Rule

Cramer's rule provides an explicit formula for the solution of a system A{x}={b}A\mathbf{'\{'}x{'\}'} = \mathbf{'\{'}b{'\}'} when AA is an n×nn \times n invertible matrix.

For a 2×22 \times 2 system:

x = \frac{\begin`\{vmatrix}` e & b \\ f & d \end`\{vmatrix}`}{\det(A)}, \qquad y = \frac{\begin`\{vmatrix}` a & e \\ c & f \end`\{vmatrix}`}{\det(A)}

where the numerator for xx replaces the first column of AA with {b}\mathbf{'\{'}b{'\}'}, and the numerator for yy replaces the second column.

General formula (Cramer's Rule): For each variable xix_i:

xi=det(Ai)det(A)x_i = \frac{\det(A_i)}{\det(A)}

where AiA_i is the matrix AA with column ii replaced by the vector {b}\mathbf{'\{'}b{'\}'}.

warning

Cramer's rule is computationally expensive for large systems (O(n!)O(n!) for the determinant computation compared to O(n3)O(n^3) for Gaussian elimination), but it is theoretically important and frequently appears in examination questions for 2×22 \times 2 and 3×33 \times 3 systems.

Hill Cipher

The Hill cipher is a classical polygraphic substitution cipher that uses matrix multiplication to encrypt blocks of text. It demonstrates a direct application of matrices in cryptography.

Encryption procedure:

  1. Convert each letter to a number: A=0A = 0, B=1B = 1, \ldots, Z=25Z = 25.
  2. Group the plaintext into blocks of size nn (matching the dimension of the key matrix).
  3. Multiply each block (as a column vector) by the n×nn \times n key matrix KK modulo 26.
  4. Convert the resulting numbers back to letters.

Decryption: Apply the inverse of the key matrix modulo 26:

{p}=K1{c}(mod26)\mathbf{'\{'}p{'\}'} = K^{-1}\mathbf{'\{'}c{'\}'} \pmod{26}

The key matrix KK must be invertible modulo 26, which requires det(K)\det(K) to be coprime to 26 (i.e. gcd(det(K),26)=1\gcd(\det(K), 26) = 1).

Examples
Expand

Encrypt "HELP" using the key matrix

K=(3512)K = \begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix}

Convert to numbers: H=7H = 7, E=4E = 4, L=11L = 11, P=15P = 15.

Block 1: (74)\begin{pmatrix} 7 \\ 4 \end{pmatrix}, Block 2: (1115)\begin{pmatrix} 11 \\ 15 \end{pmatrix}

Block 1: (3512)(74)=(21+207+8)=(4115)\begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} \begin{pmatrix} 7 \\ 4 \end{pmatrix} = \begin{pmatrix} 21 + 20 \\ 7 + 8 \end{pmatrix} = \begin{pmatrix} 41 \\ 15 \end{pmatrix}

Modulo 26: (1515)\begin{pmatrix} 15 \\ 15 \end{pmatrix}, which gives "PP".

Block 2: (3512)(1115)=(33+7511+30)=(10841)\begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} \begin{pmatrix} 11 \\ 15 \end{pmatrix} = \begin{pmatrix} 33 + 75 \\ 11 + 30 \end{pmatrix} = \begin{pmatrix} 108 \\ 41 \end{pmatrix}

Modulo 26: 108mod26=4108 \bmod 26 = 4, 41mod26=1541 \bmod 26 = 15, giving (415)\begin{pmatrix} 4 \\ 15 \end{pmatrix}, which is "EP".

Ciphertext: "PPEP"

Computer Graphics

Matrices are fundamental to 2D and 3D computer graphics. Every transformation of a geometric object (viewing, rotation, scaling, projection) is represented by matrix multiplication.

Homogeneous coordinates. To represent translations (which are not linear transformations) as matrix multiplications, 2D points (x,y)(x, y) are extended to homogeneous coordinates (x,y,1)(x, y, 1). A translation by (tx,ty)(t_x, t_y) is then:

T = \begin`\{pmatrix}` 1 & 0 & t_x \\ 0 & 1 & t_y \\ 0 & 0 & 1 \end`\{pmatrix}`

Rotation and scaling in homogeneous coordinates use 3×33 \times 3 matrices with the bottom row (0,0,1)(0, 0, 1).

Transformation pipeline. A typical graphics pipeline applies a sequence of transformations: model transform (place object in world space), view transform (position camera), projection transform (3D to 2D), and viewport transform (map to screen coordinates). Each stage is a matrix multiplication.

Composition advantage. Instead of applying nn separate transformations to each of mm vertices, the transformations are composed into a single matrix M=TnT2T1M = T_n \cdots T_2 T_1, and each vertex is transformed with a single multiplication M{v}M\mathbf{'\{'}v{'\}'}. This reduces the cost from O(nm)O(nm) to O(n3+m)O(n^3 + m) matrix operations.

Markov Chains

A Markov chain is a stochastic process where the probability of transitioning to any future state depends only on the current state, not on the sequence of events that preceded it (the Markov property).

Transition matrix. A transition matrix PP is a square matrix where:

  • pij0p_{ij} \geq 0 for all i,ji, j (entries are probabilities)
  • Each row sums to 11: jpij=1\sum_j p_{ij} = 1 for all ii

The entry pijp_{ij} represents the probability of moving from state ii to state jj in one step.

State evolution. If {s}(k)\mathbf{'\{'}s{'\}'}^{(k)} is the state probability vector at step kk, then:

{s}(k)={s}(0)Pk\mathbf{'\{'}s{'\}'}^{(k)} = \mathbf{'\{'}s{'\}'}^{(0)} P^k

Steady state. A steady-state (stationary) vector {s}\mathbf{'\{'}s{'\}'} satisfies {s}P={s}\mathbf{'\{'}s{'\}'}P = \mathbf{'\{'}s{'\}'}, or equivalently, {s}(PI)={0}\mathbf{'\{'}s{'\}'}(P - I) = \mathbf{'\{'}0{'\}'}. This means {s}\mathbf{'\{'}s{'\}'} is a left eigenvector of PP with eigenvalue 11.

For a regular Markov chain (one where some power of PP has all positive entries), the steady-state distribution exists, is unique, and is independent of the initial state. The eigenvalue 11 is always the largest eigenvalue of a stochastic matrix (by the Perron-Frobenius theorem).

Examples
Expand

A weather model has two states: Sunny (S) and Rainy (R). If it is sunny today, the probability of sun tomorrow is 0.70.7 and rain is 0.30.3. If it is rainy today, the probability of sun tomorrow is 0.40.4 and rain is 0.60.6.

Transition matrix:

P=(0.70.30.40.6)P = \begin{pmatrix} 0.7 & 0.3 \\ 0.4 & 0.6 \end{pmatrix}

Find the steady-state vector {s}=(sr)\mathbf{'\{'}s{'\}'} = \begin{pmatrix} s & r \end{pmatrix}:

{s}P={s}\mathbf{'\{'}s{'\}'}P = \mathbf{'\{'}s{'\}'} gives 0.7s+0.4r=s0.7s + 0.4r = s and 0.3s+0.6r=r0.3s + 0.6r = r.

From the first equation: 0.3s+0.4r=0-0.3s + 0.4r = 0, so 3s=4r3s = 4r.

Since s+r=1s + r = 1: s+34s=1s + \frac{3}{4}s = 1, giving s=47s = \frac{4}{7} and r=37r = \frac{3}{7}.

Steady state: {s}=(4737)\mathbf{'\{'}s{'\}'} = \begin{pmatrix} \frac{4}{7} & \frac{3}{7} \end{pmatrix}.

In the long run, the weather is sunny 4757.1%\frac{4}{7} \approx 57.1\% of the time.

Eigenvalue verification. The eigenvalues of PP are found from:

det(PλI)=(0.7λ)(0.6λ)0.12=λ21.3λ+0.3=0\det(P - \lambda I) = (0.7 - \lambda)(0.6 - \lambda) - 0.12 = \lambda^2 - 1.3\lambda + 0.3 = 0

(λ1)(λ0.3)=0(\lambda - 1)(\lambda - 0.3) = 0

λ1=1\lambda_1 = 1, λ2=0.3\lambda_2 = 0.3. Since λ2<1|\lambda_2| \lt 1, as kk \to \infty the term λ2k0\lambda_2^k \to 0 and the system converges to the eigenvector for λ1=1\lambda_1 = 1.

danger

Common Pitfalls

  • Confusing matrix multiplication order: Matrix multiplication is NOT commutative: AB is generally not equal to BA. When applying a transformation matrix to a point, the ORDER matters. For combined transformations, the matrix closest to the point is applied FIRST: if transformation B follows transformation A, the combined matrix is BA (not AB).

  • Forgetting that the determinant of a singular matrix is zero: A singular matrix has determinant zero and NO inverse. If asked to find the inverse of a 2x2 matrix, always check that the determinant is non-zero first. A zero determinant means the transformation collapses space (maps the plane onto a line), which is why no inverse exists.

  • Misidentifying the type of transformation from its matrix: A reflection in the y-axis has matrix [[-1, 0], [0, 1]] (negative in top-left). A reflection in the x-axis has matrix [[1, 0], [0, -1]] (negative in bottom-right). Students frequently confuse these two. Also, a rotation of 90 degrees anticlockwise gives [[0, -1], [1, 0]], which students often mix up with the clockwise rotation.

  • Arithmetic errors when calculating determinants and inverses: For a 2x2 matrix [[a, b], [c, d]], the determinant is ad - bc (not ad + bc). The inverse is (1/det) * [[d, -b], [-c, a]] (note the swap of a and d and the negative signs). A single sign error invalidates the entire calculation. Always double-check by multiplying the matrix by its inverse to get the identity.

Orthogonal Matrices

A square matrix QQ is orthogonal if QTQ=QQT=IQ^T Q = Q Q^T = I, which means Q1=QTQ^{-1} = Q^T.

Equivalent characterisations:

  • The columns of QQ form an orthonormal set (each column has unit length, and distinct columns are perpendicular).
  • The rows of QQ form an orthonormal set.
  • det(Q)=±1\det(Q) = \pm 1 (since det(QT)det(Q)=det(I)=1\det(Q^T)\det(Q) = \det(I) = 1 and det(QT)=det(Q)\det(Q^T) = \det(Q)).

Rotation matrices and reflection matrices in {R}2\mathbb{'\{'}R{'\}'}^2 are orthogonal:

  • Rotations have det=+1\det = +1 and are called proper orthogonal (special orthogonal).
  • Reflections have det=1\det = -1.

Preservation of the inner product. If QQ is orthogonal, then for any vectors {u},{v}\mathbf{'\{'}u{'\}'}, \mathbf{'\{'}v{'\}'}:

(Q{u})(Q{v})={u}{v}(Q\mathbf{'\{'}u{'\}'}) \cdot (Q\mathbf{'\{'}v{'\}'}) = \mathbf{'\{'}u{'\}'} \cdot \mathbf{'\{'}v{'\}'}

In particular, Q{v}={v}|Q\mathbf{'\{'}v{'\}'}| = |\mathbf{'\{'}v{'\}'}| and the angle between vectors is preserved.

Orthogonal diagonalisation (spectral theorem). A real symmetric matrix AA can always be orthogonally diagonalised: A=QDQTA = QDQ^T where QQ is orthogonal and DD is diagonal. This is a stronger form of diagonalisation that is guaranteed for all symmetric matrices (even those with repeated eigenvalues), since symmetric matrices always have nn linearly independent eigenvectors that can be chosen orthonormal.


Summary of Key Results

| Concept | Formula / Result | | :------------------------------ | :------------------------------------------------------------------------------------------ | ------- | --- | | 2×22 \times 2 determinant | det(abcd)=adbc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc | | | | 2×22 \times 2 inverse | A1=1det(A)(dbca)A^{-1} = \dfrac{1}{\det(A)}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} | | | | 3×33 \times 3 inverse | A1=1det(A)adj(A)A^{-1} = \dfrac{1}{\det(A)}\mathrm{adj}(A) | | | | Characteristic equation (2x2) | λ2tr(A)λ+det(A)=0\lambda^2 - \mathrm{tr}(A)\lambda + \det(A) = 0 | | | | Diagonalisation | A=PDP1A = PDP^{-1}, where D=diag(λ1,,λn)D = \mathrm{diag}(\lambda_1, \ldots, \lambda_n) | | | | Matrix powers | Ak=PDkP1A^k = PD^kP^{-1} | | | | Area scale factor | det(M) | \det(M) | | | Rotation by θ\theta | (cosθsinθsinθcosθ)\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} | | | | Reflection in y=xtanθy = x\tan\theta | (cos2θsin2θsin2θcos2θ)\begin{pmatrix} \cos 2\theta & \sin 2\theta \\ \sin 2\theta & -\cos 2\theta \end{pmatrix} | | | | Cramer's rule | xi=det(Ai)/det(A)x_i = \det(A_i)/\det(A) | | | | Steady state of Markov chain | {s}P={s}\mathbf{'\{'}s{'\}'}P = \mathbf{'\{'}s{'\}'}, si=1\sum s_i = 1 | | |

Worked Example: Finding Eigenvalues and Eigenvectors

Find the eigenvalues and eigenvectors of A=(5335)A = \begin{pmatrix} 5 & 3 \\ 3 & 5 \end{pmatrix}.

Characteristic equation:

det(AλI)=(5λ)29=λ210λ+16=0\det(A - \lambda I) = (5 - \lambda)^2 - 9 = \lambda^2 - 10\lambda + 16 = 0

(λ2)(λ8)=0(\lambda - 2)(\lambda - 8) = 0

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

Eigenvector for λ1=2\lambda_1 = 2:

(3333)(v1v2)=(00)    v1=v2\begin{pmatrix} 3 & 3 \\ 3 & 3 \end{pmatrix}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies v_1 = -v_2

Eigenvector: (11)\begin{pmatrix} 1 \\ -1 \end{pmatrix} (or any scalar multiple).

Eigenvector for λ2=8\lambda_2 = 8:

(3333)(v1v2)=(00)    v1=v2\begin{pmatrix} -3 & 3 \\ 3 & -3 \end{pmatrix}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies v_1 = v_2

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

The eigenvectors are perpendicular (as expected for a symmetric matrix).


Problem Set

Problem 1

Given A=(2143)A = \begin{pmatrix} 2 & -1 \\ 4 & 3 \end{pmatrix} and B=(1520)B = \begin{pmatrix} 1 & 5 \\ -2 & 0 \end{pmatrix}, find ABAB and BABA. Comment on whether AB=BAAB = BA.

Solution

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

BA=(1(2)+5(4)1(1)+5(3)2(2)+0(4)2(1)+0(3))=(221442)BA = \begin{pmatrix} 1(2) + 5(4) & 1(-1) + 5(3) \\ -2(2) + 0(4) & -2(-1) + 0(3) \end{pmatrix} = \begin{pmatrix} 22 & 14 \\ -4 & 2 \end{pmatrix}

ABBAAB \neq BA, confirming that matrix multiplication is not commutative.

If you get this wrong, revise: Matrix Multiplication properties.

Problem 2

Find the determinant and inverse of A=(5321)A = \begin{pmatrix} 5 & 3 \\ 2 & 1 \end{pmatrix}.

Solution

det(A)=5(1)3(2)=56=1\det(A) = 5(1) - 3(2) = 5 - 6 = -1

Since det(A)0\det(A) \neq 0, the inverse exists:

A1=11(1325)=(1325)A^{-1} = \frac{1}{-1}\begin{pmatrix} 1 & -3 \\ -2 & 5 \end{pmatrix} = \begin{pmatrix} -1 & 3 \\ 2 & -5 \end{pmatrix}

Verification: AA1=(5321)(1325)=(5+615152+265)=(1001)AA^{-1} = \begin{pmatrix} 5 & 3 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} -1 & 3 \\ 2 & -5 \end{pmatrix} = \begin{pmatrix} -5+6 & 15-15 \\ -2+2 & 6-5 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}

If you get this wrong, revise: 2x2 Determinant and Inverse sections.

Problem 3

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

Solution

Expanding along row 2 (which contains a zero):

det(A)=0C21+(1)C22+2C23\det(A) = 0 \cdot C_{21} + (-1) \cdot C_{22} + 2 \cdot C_{23}

C22=(1)2+22111=21=3C_{22} = (-1)^{2+2}\begin{vmatrix} 2 & 1 \\ 1 & -1 \end{vmatrix} = -2 - 1 = -3

C23=(1)2+32314=(83)=5C_{23} = (-1)^{2+3}\begin{vmatrix} 2 & 3 \\ 1 & 4 \end{vmatrix} = -(8 - 3) = -5

det(A)=0+(1)(3)+2(5)=310=7\det(A) = 0 + (-1)(-3) + 2(-5) = 3 - 10 = -7

If you get this wrong, revise: 3x3 Determinant -- Cofactor Expansion.

Problem 4

Find the matrix representing an anticlockwise rotation by 6060^\circ about the origin, and use it to find the image of the point (1,3)(1, \sqrt{3}).

Solution

R60=(cos60sin60sin60cos60)=(12323212)R_{60} = \begin{pmatrix} \cos 60^\circ & -\sin 60^\circ \\ \sin 60^\circ & \cos 60^\circ \end{pmatrix} = \begin{pmatrix} \frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & \frac{1}{2} \end{pmatrix}

(12323212)(13)=(123232+32)=(13)\begin{pmatrix} \frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & \frac{1}{2} \end{pmatrix}\begin{pmatrix} 1 \\ \sqrt{3} \end{pmatrix} = \begin{pmatrix} \frac{1}{2} - \frac{3}{2} \\ \frac{\sqrt{3}}{2} + \frac{\sqrt{3}}{2} \end{pmatrix} = \begin{pmatrix} -1 \\ \sqrt{3} \end{pmatrix}

The image is (1,3)(-1, \sqrt{3}).

If you get this wrong, revise: Rotations section.

Problem 5

A reflection in the yy-axis is followed by an enlargement with scale factor 33 about the origin. Find the single matrix that represents this composite transformation. What is the area scale factor?

Solution

Reflection in the yy-axis: Ry=(1001)R_y = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}

Enlargement with scale factor 33: E3=(3003)E_3 = \begin{pmatrix} 3 & 0 \\ 0 & 3 \end{pmatrix}

Composite (enlargement applied after reflection):

M=E3Ry=(3003)(1001)=(3003)M = E_3 \cdot R_y = \begin{pmatrix} 3 & 0 \\ 0 & 3 \end{pmatrix}\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} -3 & 0 \\ 0 & 3 \end{pmatrix}

Area scale factor: det(M)=3×30=9|\det(M)| = |-3 \times 3 - 0| = 9.

If you get this wrong, revise: Composite Transformations and Area Scale Factor.

Problem 6

Solve the system of equations using matrices:

3x+2yz=53x + 2y - z = 5 xy+2z=1x - y + 2z = 1 2x+y+z=42x + y + z = 4

Solution

Coefficient matrix: A=(321112211)A = \begin{pmatrix} 3 & 2 & -1 \\ 1 & -1 & 2 \\ 2 & 1 & 1 \end{pmatrix}

Constants: {b}=(514)\mathbf{'\{'}b{'\}'} = \begin{pmatrix} 5 \\ 1 \\ 4 \end{pmatrix}

det(A)=3(12)2(14)+(1)(1+2)=9+63=6\det(A) = 3(-1 - 2) - 2(1 - 4) + (-1)(1 + 2) = -9 + 6 - 3 = -6

By Cramer's rule:

x=det(521112411)6=5(12)2(18)+(1)(1+4)6=15+1456=66=1x = \frac{\det\begin{pmatrix} 5 & 2 & -1 \\ 1 & -1 & 2 \\ 4 & 1 & 1 \end{pmatrix}}{-6} = \frac{5(-1-2) - 2(1-8) + (-1)(1+4)}{-6} = \frac{-15+14-5}{-6} = \frac{-6}{-6} = 1

y=det(351112241)6=3(18)5(14)+(1)(42)6=21+1526=86=43y = \frac{\det\begin{pmatrix} 3 & 5 & -1 \\ 1 & 1 & 2 \\ 2 & 4 & 1 \end{pmatrix}}{-6} = \frac{3(1-8) - 5(1-4) + (-1)(4-2)}{-6} = \frac{-21+15-2}{-6} = \frac{-8}{-6} = \frac{4}{3}

z=det(325111214)6=3(41)2(42)+5(1+2)6=154+156=46=23z = \frac{\det\begin{pmatrix} 3 & 2 & 5 \\ 1 & -1 & 1 \\ 2 & 1 & 4 \end{pmatrix}}{-6} = \frac{3(-4-1) - 2(4-2) + 5(1+2)}{-6} = \frac{-15-4+15}{-6} = \frac{-4}{-6} = \frac{2}{3}

Solution: x=1x = 1, y=43y = \frac{4}{3}, z=23z = \frac{2}{3}.

If you get this wrong, revise: Cramer's Rule section.

Problem 7

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

Solution

Characteristic equation:

det(AλI)=(3λ)(λ)(2)(1)=λ23λ+2=0\det(A - \lambda I) = (3 - \lambda)(-\lambda) - (-2)(1) = \lambda^2 - 3\lambda + 2 = 0

(λ1)(λ2)=0(\lambda - 1)(\lambda - 2) = 0

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

Eigenvector for λ1=1\lambda_1 = 1:

(2211)(v1v2)=(00)    v1=v2\begin{pmatrix} 2 & -2 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies v_1 = v_2

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

Eigenvector for λ2=2\lambda_2 = 2:

(1212)(v1v2)=(00)    v1=2v2\begin{pmatrix} 1 & -2 \\ 1 & -2 \end{pmatrix}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies v_1 = 2v_2

Eigenvector: (21)\begin{pmatrix} 2 \\ 1 \end{pmatrix}.

If you get this wrong, revise: Eigenvalues and Eigenvectors section.

Problem 8

A stretch parallel to the xx-axis with scale factor 22 is followed by a stretch parallel to the yy-axis with scale factor 33. Find the single matrix and describe its effect on the unit square.

Solution

M=(1003)(2001)=(2003)M = \begin{pmatrix} 1 & 0 \\ 0 & 3 \end{pmatrix}\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}

The unit square (area = 1) is mapped to a rectangle with vertices (0,0)(0,0), (2,0)(2,0), (2,3)(2,3), (0,3)(0,3). The new area is 66.

Area scale factor: det(M)=6|\det(M)| = 6.

If you get this wrong, revise: Enlargements and Stretches section.

Problem 9

Find the invariant points and invariant lines of the transformation represented by M=(2102)M = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix}.

Solution

Invariant points: Solve (MI){x}={0}(M - I)\mathbf{'\{'}x{'\}'} = \mathbf{'\{'}0{'\}'}:

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

From row 2: y=0y = 0. From row 1: x+0=0x + 0 = 0, so x=0x = 0.

The only invariant point is the origin (0,0)(0, 0).

Invariant lines: For an invariant line through the origin, the direction vector must be an eigenvector. Eigenvalues satisfy (2λ)2=0(2-\lambda)^2 = 0, so λ=2\lambda = 2 (repeated).

For λ=2\lambda = 2: (0100)(v1v2)=(00)\begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}, giving v2=0v_2 = 0. The only eigenvector direction is (10)\begin{pmatrix} 1 \\ 0 \end{pmatrix}.

The xx-axis (y=0y = 0) is the only invariant line through the origin.

If you get this wrong, revise: Invariant Points and Lines section.

Problem 10

The transition matrix for a two-state Markov chain is P=(0.60.30.40.7)P = \begin{pmatrix} 0.6 & 0.3 \\ 0.4 & 0.7 \end{pmatrix}. Find the steady-state distribution.

Solution

Solve {s}P={s}\mathbf{'\{'}s{'\}'}P = \mathbf{'\{'}s{'\}'} where {s}=(s1s2)\mathbf{'\{'}s{'\}'} = \begin{pmatrix} s_1 & s_2 \end{pmatrix} with s1+s2=1s_1 + s_2 = 1.

From {s}P={s}\mathbf{'\{'}s{'\}'}P = \mathbf{'\{'}s{'\}'}:

0.6s1+0.4s2=s1    0.4s1+0.4s2=0    s1=s20.6s_1 + 0.4s_2 = s_1 \implies -0.4s_1 + 0.4s_2 = 0 \implies s_1 = s_2

With s1+s2=1s_1 + s_2 = 1: s1=0.5s_1 = 0.5, s2=0.5s_2 = 0.5.

Steady state: (0.50.5)\begin{pmatrix} 0.5 & 0.5 \end{pmatrix}.

If you get this wrong, revise: Markov Chains section.

Problem 11

Encrypt the word "CAT" using the Hill cipher with key matrix K=(2111)K = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}, padding with "X" if needed.

Solution

C = 2, A = 0, T = 19. Pad to make even length: "CATX" where X = 23.

Block 1: (20)\begin{pmatrix} 2 \\ 0 \end{pmatrix}, Block 2: (1923)\begin{pmatrix} 19 \\ 23 \end{pmatrix}

Block 1:

(2111)(20)=(42)(42)(mod26)\begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 2 \\ 0 \end{pmatrix} = \begin{pmatrix} 4 \\ 2 \end{pmatrix} \equiv \begin{pmatrix} 4 \\ 2 \end{pmatrix} \pmod{26}

Giving "EC".

Block 2:

(2111)(1923)=(6142)(916)(mod26)\begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 19 \\ 23 \end{pmatrix} = \begin{pmatrix} 61 \\ 42 \end{pmatrix} \equiv \begin{pmatrix} 9 \\ 16 \end{pmatrix} \pmod{26}

61mod26=961 \bmod 26 = 9 (J), 42mod26=1642 \bmod 26 = 16 (Q). Giving "JQ".

Ciphertext: "ECJQ".

If you get this wrong, revise: Hill Cipher section.

Problem 12

Diagonalise the matrix A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} and use the diagonalisation to find A4A^4.

Solution

Eigenvalues:

det(AλI)=(2λ)21=λ24λ+3=0\det(A - \lambda I) = (2-\lambda)^2 - 1 = \lambda^2 - 4\lambda + 3 = 0

(λ1)(λ3)=0    λ1=1,λ2=3(\lambda - 1)(\lambda - 3) = 0 \implies \lambda_1 = 1, \lambda_2 = 3

Eigenvectors:

λ1=1\lambda_1 = 1: (1111)(v1v2)={0}    v1=v2\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \mathbf{'\{'}0{'\}'} \implies v_1 = -v_2, so {v}1=(11)\mathbf{'\{'}v{'\}'}_1 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}.

λ2=3\lambda_2 = 3: (1111)(v1v2)={0}    v1=v2\begin{pmatrix} -1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \mathbf{'\{'}0{'\}'} \implies v_1 = v_2, so {v}2=(11)\mathbf{'\{'}v{'\}'}_2 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}.

Diagonalisation:

P=(1111),D=(1003)P = \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix}, \quad D = \begin{pmatrix} 1 & 0 \\ 0 & 3 \end{pmatrix}

det(P)=2,P1=12(1111)\det(P) = 2, \quad P^{-1} = \frac{1}{2}\begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix}

Compute A4A^4:

D4=(10081)D^4 = \begin{pmatrix} 1 & 0 \\ 0 & 81 \end{pmatrix}

A4=PD4P1=(1111)(10081)12(1111)A^4 = PD^4 P^{-1} = \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 0 & 81 \end{pmatrix}\frac{1}{2}\begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix}

=12(181181)(1111)=12(82808082)=(41404041)= \frac{1}{2}\begin{pmatrix} 1 & 81 \\ -1 & 81 \end{pmatrix}\begin{pmatrix} 1 & -1 \\ 1 & 1 \end{pmatrix} = \frac{1}{2}\begin{pmatrix} 82 & 80 \\ 80 & 82 \end{pmatrix} = \begin{pmatrix} 41 & 40 \\ 40 & 41 \end{pmatrix}

If you get this wrong, revise: Diagonalisation and Matrix Powers sections.