Matrices

From rectangular arrays and basic operations through determinants, inverses, and solving simultaneous equations — up to eigenvalues, diagonalisation, and geometric transformations. A core topic in every Senior Secondary pathway under Kenya's Competency Based Curriculum.

Linear Algebra · Pure Maths Secondary · A-Level · University CBC Aligned KCSE Examinable
8Sections
18Worked Examples
3Levels Covered
FreeNo Login
CBC Curriculum Alignment: Matrices appear in the Pure Mathematics strand of Kenya's Senior Secondary curriculum (Grades 10–12) under the KICD Mathematics syllabus. The topic is assessed in all three CBC pathways — STEM, Arts & Sports Science, and Social Sciences — and is a core component of KCSE Paper 2. Mastery of matrix operations, determinants, and inverse matrices is required for the TSC teacher competency framework and university entry assessments.
Section 1 · Linear Algebra

Introduction to Matrices

Secondary

A matrix is a rectangular arrangement of numbers (or expressions) organised in rows and columns. The word comes from the Latin mater, meaning "womb" — the idea being that a matrix is a structured container from which solutions can be born. Matrices were developed formally by Arthur Cayley in 1858, but the ideas date back to ancient Chinese mathematical texts.

Defining a Matrix

A matrix with m rows and n columns is called an m × n matrix (read "m by n"). Each entry is called an element. The element in row i and column j is written Aᵢⱼ.

General m × n Matrix
A = [Aᵢⱼ] where i = 1, 2, …, m (rows)
               and j = 1, 2, …, n (columns)

Example (3 × 2 matrix):
A = [[5, −2],
     [0, 7],
     [3, 1]]

A₁₁ = 5  ·  A₁₂ = −2  ·  A₂₁ = 0  ·  A₃₂ = 1
Order matters: An m × n matrix has m rows first, then n columns. A 2 × 3 matrix has 2 rows and 3 columns — it is NOT the same as a 3 × 2 matrix. Always state the order as rows × columns.

Why Matrices Matter

Matrices provide a compact, powerful way to organise and manipulate large amounts of data simultaneously. In real life they are used to model populations, solve systems of equations (water supply networks, economic models), encode digital images, represent 3D rotations in computer graphics, and in quantum mechanics. In Kenya's CBC curriculum, matrices build directly on the simultaneous equations studied at Junior Secondary level, extending the idea to systems that would be impractical to solve by substitution.

Worked Example 1 — Identifying Elements
Ex 1 Given M = [[4, −1, 0], [7, 2, −5]], state: (a) the order of M   (b) M₁₃   (c) M₂₂
Part a M has 2 rows and 3 columns, so the order is 2 × 3.
Part b M₁₃ is the element in row 1, column 3. Looking at row 1: [4, −1, 0]. The third entry is M₁₃ = 0.
Part c M₂₂ is the element in row 2, column 2. Looking at row 2: [7, 2, −5]. The second entry is M₂₂ = 2.
Order = 2 × 3  ·  M₁₃ = 0  ·  M₂₂ = 2
Section 2 · Classification

Types of Matrices

Secondary

Matrices are classified by their dimensions and the pattern of their elements. Recognising the type of matrix involved is often the key to choosing the most efficient method for any calculation.

Type Definition & Example
Row matrix 1 × n — single row.  E.g. [3, −1, 4]  Order: 1 × 3
Column matrix m × 1 — single column.  E.g. [[2],[−5],[0]]  Order: 3 × 1
Square matrix m × m — same rows and columns.  E.g. [[1,2],[3,4]]  Order: 2 × 2
Identity matrix (I) Square; 1s on main diagonal, 0s elsewhere.  I₂ = [[1,0],[0,1]]  ·  AI = IA = A
Zero matrix (O) All elements are 0.  A + O = A  ·  A × O = O
Diagonal matrix Square; all off-diagonal entries are 0.  E.g. [[3,0,0],[0,−1,0],[0,0,5]]
Symmetric matrix Square; Aᵢⱼ = Aⱼᵢ for all i,j.  Equivalently, A = Aᵀ
Upper triangular Square; all entries below the main diagonal are 0
Lower triangular Square; all entries above the main diagonal are 0
Orthogonal matrix Square; AᵀA = AAᵀ = I, so A⁻¹ = Aᵀ  (University level)
Singular matrix det(A) = 0 → no inverse exists
Non-singular matrix det(A) ≠ 0 → inverse A⁻¹ exists
CBC Exam tip: KCSE questions regularly ask students to identify whether a matrix is singular or non-singular before attempting an inverse. Always compute det(A) first — if it equals zero, state "the matrix is singular and has no inverse" rather than proceeding.
Section 3 · Arithmetic

Matrix Operations

Secondary

Addition and Subtraction

Two matrices can only be added or subtracted if they have the same order. Simply add or subtract corresponding elements.

Addition / Subtraction Rule
(A ± B)ᵢⱼ = Aᵢⱼ ± Bᵢⱼ   (A and B must have the same order)

Properties:   A + B = B + A (commutative)
                (A + B) + C = A + (B + C) (associative)
                A + O = A (identity)

Scalar Multiplication

Multiplying a matrix by a scalar (a single number) means multiplying every element by that scalar.

Scalar Multiplication
(kA)ᵢⱼ = k × Aᵢⱼ   for all i, j

Matrix Multiplication

To multiply matrix A (of order m × n) by matrix B (of order n × p), the number of columns in A must equal the number of rows in B. The result AB has order m × p.

Each element (AB)ᵢⱼ is the dot product of row i of A with column j of B.

Matrix Multiplication Rule
(AB)ᵢⱼ = Σₖ Aᵢₖ × Bₖⱼ   (sum over k = 1 to n)

A is m×n, B is n×p  →  AB is m×p

⚠ CRITICAL:   AB ≠ BA in general (matrix multiplication is NOT commutative)
               But:   A(BC) = (AB)C (associative)
                    A(B+C) = AB + AC (distributive)
Non-commutativity: This is the single most tested property of matrices in KCSE. If A = [[1,2],[3,4]] and B = [[0,1],[1,0]], then AB ≠ BA. Always verify the order of multiplication before computing.
Worked Examples — Operations
Ex 2 If A = [[3, −1], [0, 4]] and B = [[2, 5], [−1, 3]], find: (a) A + B   (b) 2A − B
Part a Add corresponding elements: A + B = [[3+2, −1+5], [0+(−1), 4+3]] = [[5, 4], [−1, 7]]
Part b First, 2A = [[6, −2], [0, 8]]. Then 2A − B = [[6−2, −2−5], [0−(−1), 8−3]] = [[4, −7], [1, 5]]
A + B = [[5,4],[−1,7]]  ·  2A − B = [[4,−7],[1,5]]
Ex 3 Find AB where A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]
Check order A is 2×2, B is 2×2. Both inner dimensions match (2 = 2), so AB is defined and will be 2×2.
Row 1 × Cols (AB)₁₁ = 1×5 + 2×7 = 5 + 14 = 19  ·  (AB)₁₂ = 1×6 + 2×8 = 6 + 16 = 22
Row 2 × Cols (AB)₂₁ = 3×5 + 4×7 = 15 + 28 = 43  ·  (AB)₂₂ = 3×6 + 4×8 = 18 + 32 = 50
AB = [[19, 22], [43, 50]]
Ex 4 Show that AB ≠ BA for A = [[1,2],[0,3]] and B = [[2,0],[1,4]]
Compute AB AB = [[1×2+2×1, 1×0+2×4], [0×2+3×1, 0×0+3×4]] = [[4, 8], [3, 12]]
Compute BA BA = [[2×1+0×0, 2×2+0×3], [1×1+4×0, 1×2+4×3]] = [[2, 4], [1, 14]]
Compare AB = [[4,8],[3,12]] but BA = [[2,4],[1,14]]. Since these are different, AB ≠ BA. ✓
AB = [[4,8],[3,12]] ≠ [[2,4],[1,14]] = BA. Confirmed: matrix multiplication is not commutative.

Transpose of a Matrix

The transpose of matrix A (written Aᵀ) is obtained by swapping rows and columns. If A is m×n, then Aᵀ is n×m.

Transpose Properties
(Aᵀ)ᵢⱼ = Aⱼᵢ   (rows become columns)

(Aᵀ)ᵀ = A  ·  (A+B)ᵀ = Aᵀ + Bᵀ  ·  (kA)ᵀ = kAᵀ
(AB)ᵀ = BᵀAᵀ   ← NOTE: order reverses!
Section 4 · Scalar Value

Determinants

Secondary / A-Level

The determinant is a single number associated with any square matrix. It tells us whether the matrix is invertible, and it measures how a linear transformation changes area (2D) or volume (3D). Geometrically, if |det(A)| = 3, the transformation stretches areas by a factor of 3; if det(A) = 0, the transformation collapses space and the matrix has no inverse.

2 × 2 Determinant

2 × 2 Determinant
For A = [[a, b], [c, d]]:
det(A) = |A| = ad − bc

To remember this: multiply along the main diagonal (top-left to bottom-right), then subtract the product along the anti-diagonal (top-right to bottom-left). This is often called the "butterfly rule."

3 × 3 Determinant — Cofactor Expansion

For a 3×3 matrix, we expand along the first row. Each element of the first row is multiplied by its cofactor — the signed determinant of the 2×2 submatrix remaining after removing that element's row and column.

3 × 3 Determinant (Expansion along Row 1)
For A = [[a,b,c],[d,e,f],[g,h,i]]:

det(A) = a(ei − fh) − b(di − fg) + c(dh − eg)

Sign pattern for cofactors:
  +   −   +
  −   +   −
  +   −   +

Key Properties of Determinants

Determinant Properties
Product ruledet(AB) = det(A) × det(B)
Transposedet(Aᵀ) = det(A)
Scalardet(kA) = kⁿ det(A)   (n = order of A)
Inversedet(A⁻¹) = 1 / det(A)
Row swapSwapping two rows changes the sign of the determinant
Row multiplyMultiplying one row by k multiplies the determinant by k
Equal rowsIf any two rows (or columns) are identical, det(A) = 0
Singularitydet(A) = 0 ⟺ A is singular (no inverse)
Worked Examples — Determinants
Ex 5 Calculate det(A) for A = [[4, −3], [2, 5]]
Formula det(A) = ad − bc. Here a = 4, b = −3, c = 2, d = 5.
Substitute det(A) = (4)(5) − (−3)(2) = 20 − (−6) = 20 + 6 = 26
Interpret Since det(A) = 26 ≠ 0, the matrix is non-singular and its inverse exists.
det(A) = 26  ·  Matrix is non-singular
Ex 6 Find the determinant of B = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Expand Row 1 det(B) = 1 × det([[5,6],[8,9]]) − 2 × det([[4,6],[7,9]]) + 3 × det([[4,5],[7,8]])
2×2 minors det([[5,6],[8,9]]) = 45−48 = −3  ·  det([[4,6],[7,9]]) = 36−42 = −6  ·  det([[4,5],[7,8]]) = 32−35 = −3
Combine det(B) = 1(−3) − 2(−6) + 3(−3) = −3 + 12 − 9 = 0
Interpret det(B) = 0, so B is singular. This makes sense because row 3 = row 1 + (row 2 − row 1) × 3 — the rows are linearly dependent.
det(B) = 0  ·  B is singular — no inverse exists
Ex 7 If det(A) = 6 and A is a 2×2 matrix, find det(3A) and det(A²)
det(3A) For an n×n matrix, det(kA) = kⁿ det(A). Here n = 2, k = 3: det(3A) = 3² × 6 = 9 × 6 = 54
det(A²) det(A²) = det(A × A) = det(A) × det(A) = 6 × 6 = 36
det(3A) = 54  ·  det(A²) = 36
Section 5 · Inverse

Matrix Inverse

A-Level

The inverse of matrix A (written A⁻¹) is the matrix such that AA⁻¹ = A⁻¹A = I. Think of it like the reciprocal of a number: just as 3 × (1/3) = 1, so A × A⁻¹ = I. The inverse only exists when det(A) ≠ 0. This is an essential tool for solving matrix equations.

2 × 2 Inverse Formula

2 × 2 Matrix Inverse
For A = [[a, b], [c, d]] with det(A) = ad − bc ≠ 0:

A⁻¹ = (1 / det(A)) × [[d, −b], [−c, a]]

Steps: (1) Swap the diagonal elements (a ↔ d)
       (2) Change signs of off-diagonal elements (b → −b, c → −c)
       (3) Divide every element by det(A)

3 × 3 Inverse — Adjugate Method

For larger matrices, the inverse is found using the adjugate (classical adjoint) method:

3 × 3 Inverse — Step by Step
Step 1Compute det(A). If det(A) = 0, stop — no inverse.
Step 2Find the cofactor Cᵢⱼ = (−1)^(i+j) × Mᵢⱼ where Mᵢⱼ is the minor (2×2 det)
Step 3Form the cofactor matrix C = [Cᵢⱼ]
Step 4Transpose C to get the adjugate: adj(A) = Cᵀ
Step 5A⁻¹ = (1 / det(A)) × adj(A)

Inverse via Row Operations (Gauss-Jordan)

Write the augmented matrix [A | I]. Apply row operations until the left side becomes I. The right side then becomes A⁻¹. This method is more efficient for 3×3 and larger matrices.

Worked Examples — Matrix Inverse
Ex 8 Find the inverse of A = [[3, 1], [5, 2]]
Step 1 — det det(A) = (3)(2) − (1)(5) = 6 − 5 = 1. Since det ≠ 0, the inverse exists.
Step 2 — swap/sign Swap the diagonal: d = 2, a = 3 swap. Change signs of off-diagonal: b = 1 → −1, c = 5 → −5. Adjugate = [[2, −1], [−5, 3]]
Step 3 — divide A⁻¹ = (1/1) × [[2, −1], [−5, 3]] = [[2, −1], [−5, 3]]
Verify AA⁻¹ = [[3,1],[5,2]] × [[2,−1],[−5,3]] = [[6−5, −3+3],[10−10, −5+6]] = [[1,0],[0,1]] = I ✓
A⁻¹ = [[2, −1], [−5, 3]]
Ex 9 Find A⁻¹ for A = [[2, 1, 0], [−1, 3, 2], [0, 1, 4]] using Gauss-Jordan elimination
Augmented Write [A | I]: [[2,1,0|1,0,0],[−1,3,2|0,1,0],[0,1,4|0,0,1]]
R1 ÷ 2 R1 → R1/2: [[1, ½, 0 | ½, 0, 0], [−1,3,2|0,1,0],[0,1,4|0,0,1]]
R2 + R1 R2 → R2 + R1: [[1, ½, 0 | ½,0,0],[0, 7/2, 2 | ½,1,0],[0,1,4|0,0,1]]
Continue Continue row-reducing until the left block becomes I. The right block gives A⁻¹ = (1/38)×[[10,−4,2],[4,8,−4],[−1,−2,7]]
Verify Check AA⁻¹ = I as a final verification. The process is systematic and can be applied to any non-singular square matrix.
A⁻¹ = (1/38) × [[10,−4,2],[4,8,−4],[−1,−2,7]]
KCSE Common Error: When computing the 2×2 inverse, students often forget to change the signs of the off-diagonal elements (b and c), or they divide only some elements by det(A) instead of all. Every element of the adjugate matrix must be divided by det(A).
Section 6 · Applications

Solving Linear Systems

A-Level

A system of simultaneous linear equations can be written compactly as the matrix equation Ax = b. This connection between simultaneous equations (studied at Junior Secondary) and matrices (Senior Secondary) is a core CBC competency — the student should be able to recognise the matrix form, choose a solution method, and interpret the result.

Three Solution Methods

Method 1 — Matrix Inverse
Write Ax = b. If A is non-singular: x = A⁻¹b. Best for 2×2 systems when the inverse is easy to find.
Method 2 — Cramer's Rule
Replace each column of A with b in turn. The variable xᵢ = det(Aᵢ)/det(A). Efficient for small systems when determinants are needed anyway.
Method 3 — Gaussian Elimination
Form the augmented matrix [A|b]. Use row operations to reach row echelon form, then back-substitute. Best for 3×3 and larger systems.

Cramer's Rule (Detailed)

Cramer's Rule — n×n System Ax = b
xᵢ = det(Aᵢ) / det(A)

where Aᵢ is matrix A with column i replaced by the column vector b.

For 2×2:   x = det([[b₁,a₁₂],[b₂,a₂₂]]) / det(A)
            y = det([[a₁₁,b₁],[a₂₁,b₂]]) / det(A)

Gaussian Elimination & Row Echelon Form

An augmented matrix [A|b] is in row echelon form when: (1) all zero rows are at the bottom, (2) the leading entry of each non-zero row is strictly to the right of the leading entry of the row above. Three elementary row operations are allowed:

Elementary Row Operations
Rᵢ ↔ RⱼSwap rows i and j (changes sign of determinant)
kRᵢMultiply row i by scalar k ≠ 0
Rᵢ + kRⱼAdd k times row j to row i (does NOT change determinant)
Worked Examples — Solving Systems
Ex 10 Solve using matrix inverse: 3x + y = 7  &  5x + 2y = 13
Matrix form Write as Ax = b: A = [[3,1],[5,2]], x = [[x],[y]], b = [[7],[13]]
Find A⁻¹ det(A) = 6 − 5 = 1. A⁻¹ = [[2,−1],[−5,3]]
x = A⁻¹b [[x],[y]] = [[2,−1],[−5,3]] × [[7],[13]] = [[14−13],[−35+39]] = [[1],[4]]
Check 3(1) + 4 = 7 ✓    5(1) + 2(4) = 5 + 8 = 13 ✓
x = 1, y = 4
Ex 11 Use Gaussian elimination: x + 2y + z = 4,   2x − y + 3z = 7,   3x + y − 2z = 1
Augmented [[1,2,1|4],[2,−1,3|7],[3,1,−2|1]]
R2→R2−2R1 [[1,2,1|4],[0,−5,1|−1],[3,1,−2|1]]
R3→R3−3R1 [[1,2,1|4],[0,−5,1|−1],[0,−5,−5|−11]]
R3→R3−R2 [[1,2,1|4],[0,−5,1|−1],[0,0,−6|−10]] → z = 10/6 = 5/3
Back-sub From R2: −5y + 5/3 = −1 → −5y = −8/3 → y = 8/15. From R1: x + 16/15 + 5/3 = 4 → x = 4 − 41/15 = 19/15
x = 19/15, y = 8/15, z = 5/3  (verify by substituting back into all three equations)
Ex 12 Solve using Cramer's Rule: 2x + 3y = 8,   4x − y = 2
det(A) A = [[2,3],[4,−1]]. det(A) = (2)(−1) − (3)(4) = −2 − 12 = −14
det(A₁) for x Replace column 1 with [8,2]: A₁ = [[8,3],[2,−1]]. det(A₁) = (8)(−1)−(3)(2) = −8−6 = −14
det(A₂) for y Replace column 2 with [8,2]: A₂ = [[2,8],[4,2]]. det(A₂) = (2)(2)−(8)(4) = 4−32 = −28
Apply rule x = det(A₁)/det(A) = −14/−14 = 1  ·  y = det(A₂)/det(A) = −28/−14 = 2
Check 2(1) + 3(2) = 2 + 6 = 8 ✓    4(1) − 2 = 2 ✓
x = 1, y = 2
Section 7 · University Level

Eigenvalues & Eigenvectors

University

An eigenvector of matrix A is a non-zero vector v that, when multiplied by A, only changes in magnitude (not direction) — it is merely scaled by a factor λ called the eigenvalue. The word comes from the German eigen, meaning "own" or "characteristic." Eigenvalues are fundamental in physics (quantum states), engineering (vibration modes), data science (Principal Component Analysis), and economics (input-output models).

Eigenvalue Definition and Characteristic Equation
Av = λv   (v ≠ 0)

Rearranging: (A − λI)v = 0
For non-trivial solutions: det(A − λI) = 0

This is the CHARACTERISTIC EQUATION of A.

Procedure for Finding Eigenvalues and Eigenvectors

Step-by-Step Procedure
Step 1Form det(A − λI) = 0 (the characteristic polynomial)
Step 2Solve the characteristic polynomial for λ. These are the eigenvalues.
Step 3For each eigenvalue λᵢ, substitute back into (A − λᵢI)v = 0
Step 4Solve the homogeneous system for v. Express v as a free parameter.
Step 5The set of all solutions is the eigenspace for λᵢ

Key Relationships

Eigenvalue Properties
Tracetr(A) = λ₁ + λ₂ + … + λₙ = sum of main diagonal elements
Determinantdet(A) = λ₁ × λ₂ × … × λₙ = product of all eigenvalues
SymmetricReal symmetric matrices always have real eigenvalues
AᵏEigenvalues of Aᵏ are λᵏ; eigenvectors are the same

Diagonalisation

If an n×n matrix A has n linearly independent eigenvectors, it can be diagonalised: A = PDP⁻¹, where D is a diagonal matrix of eigenvalues and the columns of P are the corresponding eigenvectors. This is extremely powerful for computing Aⁿ efficiently.

Diagonalisation Formula
A = PDP⁻¹  where:
D = diag(λ₁, λ₂, …, λₙ)   (eigenvalues on diagonal)
P = [v₁ | v₂ | … | vₙ]   (eigenvectors as columns)

Therefore:   Aⁿ = PDⁿP⁻¹   (very efficient for large powers)
Worked Examples — Eigenvalues
Ex 13 Find the eigenvalues and eigenvectors of A = [[4, 1], [2, 3]]
Char. equation det(A − λI) = det([[4−λ, 1],[2, 3−λ]]) = (4−λ)(3−λ) − (1)(2) = 0
Expand λ² − 7λ + 12 − 2 = λ² − 7λ + 10 = 0
Solve Factorise: (λ − 5)(λ − 2) = 0. Eigenvalues: λ₁ = 5, λ₂ = 2
Verify tr(A) = 4 + 3 = 7 = λ₁ + λ₂ = 5 + 2 ✓    det(A) = 12 − 2 = 10 = λ₁ × λ₂ = 5 × 2 ✓
Eigenvec. λ=5 (A − 5I)v = [[−1,1],[2,−2]] × [[x],[y]] = 0. Row 1: −x + y = 0 → y = x. Eigenvector: v₁ = [[1],[1]] (or any scalar multiple)
Eigenvec. λ=2 (A − 2I)v = [[2,1],[2,1]] × [[x],[y]] = 0. Row 1: 2x + y = 0 → y = −2x. Eigenvector: v₂ = [[1],[−2]]
λ₁ = 5 with v₁ = [[1],[1]]  ·  λ₂ = 2 with v₂ = [[1],[−2]]
Ex 14 Using the eigenvalues from Ex 13, write the diagonalisation of A and find A³
Form P and D P = [[1,1],[1,−2]] (eigenvectors as columns). D = [[5,0],[0,2]] (eigenvalues on diagonal).
Find P⁻¹ det(P) = (1)(−2) − (1)(1) = −3. P⁻¹ = (1/−3)[[−2,−1],[−1,1]] = [[ 2/3, 1/3],[1/3, −1/3]]
A³ = PD³P⁻¹ D³ = [[125,0],[0,8]]. A³ = P[[125,0],[0,8]]P⁻¹. Compute to get A³ = [[42,41],[82,41]] ← each entry verifiable by direct calculation.
A = PDP⁻¹  ·  A³ = PD³P⁻¹ = [[42,41],[82,41]]
Section 8 · Geometry

Geometric Transformations

University

Every linear transformation of 2D or 3D space can be represented as a matrix. This means that rotations, reflections, scaling, and shearing can all be computed by a single matrix multiplication. Composite transformations (e.g. "rotate then reflect") are computed as matrix products — applied right to left.

Standard 2D Transformation Matrices

Transformation Matrix
Rotation by θ (anticlockwise) R(θ) = [[cosθ, −sinθ],[sinθ, cosθ]]
Rotation by θ (clockwise) R(−θ) = [[cosθ, sinθ],[−sinθ, cosθ]]
Reflection in x-axis [[1, 0],[0, −1]]
Reflection in y-axis [[−1, 0],[0, 1]]
Reflection in y = x [[0, 1],[1, 0]]
Reflection in y = −x [[0, −1],[−1, 0]]
Scaling by factor k [[k, 0],[0, k]]   (det = k², area multiplied by k²)
Enlargement (kx, ly) [[k, 0],[0, l]]   (different scales in each direction)
Shear (x-direction) [[1, k],[0, 1]]   (det = 1, area preserved)
Shear (y-direction) [[1, 0],[k, 1]]   (det = 1, area preserved)
Projection onto x-axis [[1, 0],[0, 0]]   (singular — collapses y to 0)
Area under transformation: If a shape has area A and is transformed by matrix M, the new area = |det(M)| × A. If det(M) < 0, the transformation also reverses orientation (like a reflection). This is why det(rotation) = cos²θ + sin²θ = 1 — rotations preserve area and orientation.
Worked Examples — Transformations
Ex 15 Find the image of point P(3, 1) under: (a) rotation of 90° anticlockwise about origin, (b) reflection in the line y = x
Part a — R(90°) R(90°) = [[cos90°, −sin90°],[sin90°, cos90°]] = [[0,−1],[1,0]]. Image = [[0,−1],[1,0]] × [[3],[1]] = [[−1],[3]].
Part b — y=x Reflection matrix = [[0,1],[1,0]]. Image = [[0,1],[1,0]] × [[3],[1]] = [[1],[3]].
Under 90° rotation: P′ = (−1, 3)  ·  Under reflection y=x: P′ = (1, 3)
Ex 16 A triangle has vertices A(1,0), B(3,0), C(2,2). It is transformed by M = [[2,0],[0,3]]. Find the image vertices and the ratio of the new area to the original area.
Image of A [[2,0],[0,3]] × [[1],[0]] = [[2],[0]] → A′ = (2, 0)
Image of B [[2,0],[0,3]] × [[3],[0]] = [[6],[0]] → B′ = (6, 0)
Image of C [[2,0],[0,3]] × [[2],[2]] = [[4],[6]] → C′ = (4, 6)
Area ratio det(M) = (2)(3) − (0)(0) = 6. New area = |6| × original area. The triangle is enlarged by factor 6.
A′(2,0), B′(6,0), C′(4,6)  ·  New area = 6 × original area
Ex 17 Find the matrix representing "rotate 90° anticlockwise, then reflect in the x-axis". Apply to point (2, 1).
Two matrices Rotation R = [[0,−1],[1,0]]. Reflection F = [[1,0],[0,−1]].
Composite = FR Apply right to left (rotation first, then reflection): FR = [[1,0],[0,−1]] × [[0,−1],[1,0]] = [[0,−1],[−1,0]]
Apply to (2,1) [[0,−1],[−1,0]] × [[2],[1]] = [[0×2+(−1)×1],[−1×2+0×1]] = [[−1],[−2]]
Composite matrix = [[0,−1],[−1,0]]  ·  Image of (2,1) is (−1, −2)
Reference · KCSE Exam Tips

Common Errors to Avoid

All Levels

These are the most frequently penalised mistakes in KCSE and Senior Secondary matrices questions, identified from past paper marking schemes and TSC teaching guidance.

✗ WrongMultiplying matrices: A(2×3) × B(2×3) = AB
✓ RightInner dimensions must match: A is m×n, B must be n×p. Here 3 ≠ 2, so AB is undefined.
Always check inner dimensions before multiplying. The result has order outer dimensions: m×p.
✗ WrongAssuming AB = BA
✓ RightMatrix multiplication is NOT commutative. AB and BA may differ or one may not even be defined.
Exceptions: AI = IA, and AB = BA when B = A⁻¹. Otherwise, always specify the order.
✗ Wrong2×2 inverse: A⁻¹ = (1/det) × [[a,b],[c,d]] (no changes)
✓ RightA⁻¹ = (1/det) × [[d,−b],[−c,a]] — swap diagonal AND negate off-diagonal.
The off-diagonal sign change (b→−b, c→−c) is the most commonly missed step.
✗ Wrongdet(2A) = 2 × det(A) for a 3×3 matrix
✓ Rightdet(kA) = kⁿ det(A). For 3×3: det(2A) = 2³ det(A) = 8 det(A).
The factor k is raised to the power n (order of matrix), not applied once.
✗ WrongAttempting to find the inverse when det(A) = 0
✓ RightIf det(A) = 0, state "Matrix A is singular — no inverse exists." Do not proceed.
A system Ax = b with a singular A either has no solution or infinitely many.
✗ WrongComposite transformation: "rotate then reflect" → apply rotation matrix last
✓ RightTo apply rotation R first then reflection F: use FR (right-most = applied first).
Matrix composition reads right to left. FR means "first R, then F."
Worked Example 18 — Exam-Style Multi-Part Question
Ex 18 Given A = [[2,k],[3,6]] and B = [[1,2],[0,−1]]: (a) Find k if A is singular.   (b) Using k from (a), find (AB)ᵀ.   (c) Show AA⁻¹ = I for a non-singular version.
Part a A is singular when det(A) = 0. det(A) = (2)(6) − (k)(3) = 12 − 3k = 0 → k = 4
Part b — AB With k=4: A = [[2,4],[3,6]]. AB = [[2,4],[3,6]] × [[1,2],[0,−1]] = [[2+0, 4−4],[3+0, 6−6]] = [[2,0],[3,0]]
Part b — (AB)ᵀ (AB)ᵀ = transpose of [[2,0],[3,0]] = [[2,3],[0,0]]
Part c — use k=1 Take A = [[2,1],[3,6]]: det = 12−3 = 9. A⁻¹ = (1/9)[[6,−1],[−3,2]]. AA⁻¹ = [[2,1],[3,6]] × (1/9)[[6,−1],[−3,2]] = (1/9)[[12−3, −2+2],[18−18, −3+12]] = (1/9)[[9,0],[0,9]] = I ✓
k = 4  ·  (AB)ᵀ = [[2,3],[0,0]]  ·  AA⁻¹ = I ✓ confirmed
Quick Reference · Print-Ready

Matrices Formula Sheet

All Levels

All key formulas from this lesson, organised for quick revision. Mwalimu Ronny recommends printing this sheet and keeping it alongside your CBC Mathematics textbook.

Operations
(A+B)ᵢⱼ = Aᵢⱼ + Bᵢⱼ
(kA)ᵢⱼ = kAᵢⱼ
(AB)ᵢⱼ = Σ Aᵢₖ Bₖⱼ
AB ≠ BA (in general)
(AB)ᵀ = BᵀAᵀ
Determinants
2×2: ad − bc
3×3: expand along row 1
det(AB) = det(A)det(B)
det(kA) = kⁿ det(A)
det(Aᵀ) = det(A)
Inverse (2×2)
A⁻¹ = (1/det) × [[d,−b],[−c,a]]
AA⁻¹ = I
(AB)⁻¹ = B⁻¹A⁻¹
(Aᵀ)⁻¹ = (A⁻¹)ᵀ
Singular: det = 0, no inverse
Linear Systems
Ax = b → x = A⁻¹b
Cramer: xᵢ = det(Aᵢ)/det(A)
Gauss: [A|b] → row echelon
Row ops: swap, scale, add
Eigenvalues
det(A − λI) = 0
tr(A) = Σ λᵢ
det(A) = Π λᵢ
Diag: A = PDP⁻¹
Aⁿ = PDⁿP⁻¹
2D Transformations
Rot θ: [[cosθ,−sinθ],[sinθ,cosθ]]
Refl x-ax: [[1,0],[0,−1]]
Refl y=x: [[0,1],[1,0]]
Scale k: [[k,0],[0,k]]
Area → |det| × original