← All notesMaths AI · Matrices and eigenvalues⬇ Download PDF
IB DP Maths AI · Topic 1 Number and algebra · AHL 1.14, 1.15 · ~6 min read

Matrices and eigenvalues

HL matrices for Maths AI: order, addition and multiplication, the identity and zero matrices, determinants and inverses, solving systems with AX = B, and eigenvalues, eigenvectors, the characteristic polynomial, diagonalisation and powers of a matrix.

Matrix orderAdding & multiplying matricesIdentity matrixDeterminantInverse matrixSolving AX = BEigenvaluesEigenvectors
RSby Riyaz Sir
mentorriyaz.in
No tag = SL and HLHL ONLY HL students onlyFORMULA BOOKLET given in the examM1A1 how marks are awardedhighlight = comes up again and againTest yourself at the end

In 30 seconds

  • A matrix of order m × n has m rows and n columns. You can multiply AB only if the number of columns of A equals the number of rows of B, and in general AB ≠ BA.
  • For A = (a b; c d): det A = ad − bc and A−1 = 1ad − bc(d −b; −c a). A has an inverse only if det A ≠ 0.
  • Systems of equations: write them as AX = B, then X = A−1B.
  • Eigenvalues λ solve det(A − λI) = 0; an eigenvector v satisfies Av = λv, so A only stretches it. Then An = PDnP−1.
  • This note is HL only and unchanged for 2029.

By the end you can

  • Add, subtract and multiply matrices, and use the identity and zero matrices. HL
  • Find determinants and inverses: 2 × 2 by hand, larger with the GDC. HL
  • Solve systems of linear equations with inverse matrices. HL
  • Find eigenvalues and eigenvectors of 2 × 2 matrices from the characteristic polynomial. HL
  • Diagonalise a 2 × 2 matrix and use it to find powers and long-term behaviour. HL

1Matrix algebra HL

  • Adding: add matching entries; the orders must be the same. Multiplying by a number: multiply every entry.
  • Multiplying matrices: each entry of AB is (row of A) · (column of B): multiply in pairs and add.
Worked example

A = (2 1; 3 4) and B = (1 0; −1 2). Find AB.

  1. first row: (2)(1) + (1)(−1) = 1, (2)(0) + (1)(2) = 2 M1
  2. second row: (3)(1) + (4)(−1) = −1, (3)(0) + (4)(2) = 8 A1
  3. AB = (1 2; −1 8) A1
Common mistakeAssuming AB = BA. Here BA = (2 1; 4 7), which is different. Order matters for matrices.
  • Identity I = (1 0; 0 1): AI = IA = A. Zero matrix O: every entry 0.
  • Notation in these notes: (a b; c d) means the 2 × 2 matrix with first row a, b and second row c, d.

2Determinants and inverses HL

det A = ǀAǀ = ad − bc, A−1 = 1ad − bc(d −b; −c a), ad ≠ bc FORMULA BOOKLET
for A = (a b; c d)
Worked example

Find det A and A−1 for A = (2 1; 3 4).

  1. det A = 8 − 3 = 5 A1
  2. A−1 = 15(4 −1; −3 2) M1A1
  • det = 0 means no inverse (a "singular" matrix). Geometrically, the matrix squashes the plane onto a line. ǀdet Aǀ is the area scale factor (see Radians, vectors and matrix transformations).
Worked example

Use an inverse matrix to solve 2x + y = 5 and 3x + 4y = 10.

  1. (2 1; 3 4)(x; y) = (5; 10) M1
  2. (x; y) = 15(4 −1; −3 2)(5; 10) = 15(10; 5) M1
  3. x = 2, y = 1 A1
GDC (calculator) methodFor 3 × 3 systems, enter A and B in the matrix editor and compute A−1B. Write "X = A−1B" and the matrices you used, then the answer.

3Eigenvalues and eigenvectors HL

xyM(1, 1) = (5, 5)M(1, −2) = (2, −4)M(1, 0) = (4, 2): turnedM = (4 1; 2 3)λ = 5 and λ = 2stay on their lines
Most vectors are turned by M (green). Eigenvectors (red, blue) stay on their own line and are only stretched.
det(A − λI) = 0
the characteristic polynomial; for 2 × 2: λ2 − (a + d)λ + (ad − bc) = 0
Worked example

Find the eigenvalues and eigenvectors of M = (4 1; 2 3).

  1. det(M − λI) = (4 − λ)(3 − λ) − 2 = λ2 − 7λ + 10 = 0 M1
  2. λ = 5 or λ = 2 A1
  3. λ = 5: −x + y = 0 ⇒ v = (1; 1); λ = 2: 2x + y = 0 ⇒ v = (1; −2) M1A1
Exam tipCheck an eigenvector by multiplying: M(1; 1) = (5; 5) = 5(1; 1) ✓. Any non-zero multiple of an eigenvector is also an eigenvector.
  • Shortcut for 2 × 2: the eigenvalues add to a + d (the trace) and multiply to det A. Here 5 + 2 = 7 and 5 × 2 = 10 ✓.

4Diagonalisation and powers HL

A = PDP−1, An = PDnP−1 FORMULA BOOKLET
P has eigenvectors as columns; D has eigenvalues on the diagonal
Worked example

Write M = (4 1; 2 3) as PDP−1 and find M3.

  1. P = (1 1; 1 −2), D = (5 0; 0 2) A1
  2. M3 = P(125 0; 0 8)P−1 M1
  3. M3 = (86 39; 78 47) A1
  • Long-term behaviour: for large n, the largest eigenvalue dominates. If it is 1 (as in transition matrices, see Estimation, Poisson, hypothesis tests and Markov chains), the system settles to a steady state along that eigenvector.
Common mistakePutting the eigenvalues in D in a different order from the eigenvector columns in P. Column 1 of P must go with the first diagonal entry of D.
Linking questionMatrices describe transformations of the plane (Radians, vectors and matrix transformations), store networks as adjacency matrices (Graph theory), model Markov chains, and solve coupled differential equations (Differential equations and phase portraits).
Idea for your IA / explorationUse a transition matrix and its eigenvectors to model something real (brand loyalty, weather, or animals moving between habitats) and predict the long-term state, or explore how image compression uses matrices.

Test yourself — cover the answers first

Quick check

  1. HL What is the order of a matrix with 2 rows and 3 columns?
  2. HL Can a 2 × 3 matrix multiply a 2 × 3 matrix?
  3. HL Find det (5 2; 3 1).
  4. HL Which matrices have no inverse?
  5. HL If Av = 3v, what is the eigenvalue?

Exam-style

  1. HL A = (k 2; 3 1) has no inverse. Find k.
  2. HL Find the eigenvalues of (1 2; 2 1) and an eigenvector for each.
Show answers
  1. 2 × 3
  2. no: 3 columns ≠ 2 rows
  3. −1
  4. those with determinant 0
  5. 3
  6. det A = k − 6 = 0
    k = 6
  7. λ2 − 2λ − 3 = 0 ⇒ λ = 3 or −1
    λ = 3: (1; 1); λ = −1: (1; −1)
Stuck on a question?

Send it to me on WhatsApp. I read every message.

Want regular help? Send this to your parent →
Share with a friendAsk Riyaz Sir

Independent notes written by Riyaz Sir. Not produced, endorsed or approved by the International Baccalaureate Organization. Syllabus codes refer to the IB DP subject guides.