IB Mathematics AI – Topic 1

Number and Algebra: Matrices (HL Only)

Matrix Basics and Operations

Definition & Notation

Definition: A matrix is a rectangular array of numbers arranged in rows and columns, enclosed in brackets.

General Form:

\[ 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} \]

Order/Dimension:

An \(m \times n\) matrix has m rows and n columns

Element \(a_{ij}\) is in row i, column j

Addition & Subtraction:

Only matrices of the same order can be added or subtracted

\[ A \pm B = (a_{ij}) \pm (b_{ij}) = (a_{ij} \pm b_{ij}) \]

Add or subtract corresponding elements

Scalar Multiplication:

\[ kA = k \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} = \begin{pmatrix} ka_{11} & ka_{12} \\ ka_{21} & ka_{22} \end{pmatrix} \]

Multiply every element by the scalar k

⚠️ Common Pitfalls & Tips:

  • Cannot add/subtract matrices of different orders
  • Matrix addition is commutative: \(A + B = B + A\)
  • Use GDC for quick calculations and checking

Matrix Multiplication

Conditions:

For \(A_{m \times n}\) and \(B_{p \times q}\), multiplication \(AB\) is only possible if \(n = p\)

The resulting matrix will be of order \(m \times q\)

Formula:

Element in row i, column j of \(AB\) is:

\[ (AB)_{ij} = \sum_{k=1}^{n} a_{ik}b_{kj} \]

Example (2×2 matrices):

\[ \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} ae+bg & af+bh \\ ce+dg & cf+dh \end{pmatrix} \]

Properties:

  • NOT commutative: \(AB \neq BA\) (usually)
  • Associative: \((AB)C = A(BC)\)
  • Distributive: \(A(B+C) = AB + AC\)

⚠️ Common Pitfalls & Tips:

  • CRITICAL: Check dimensions before multiplying
  • Number of columns in first = number of rows in second
  • \(AB \neq BA\) – order matters!
  • Use GDC for multiplication – it's fast and accurate

📝 Worked Example 1: Matrix Operations

Question: Given \(A = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix}\) and \(B = \begin{pmatrix} 5 & -1 \\ 0 & 2 \end{pmatrix}\)

(a) Find \(2A - B\)

(b) Find \(AB\)

Solution:

(a) Calculate \(2A - B\):

First find \(2A\):

\[ 2A = 2\begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} = \begin{pmatrix} 4 & 6 \\ 2 & 8 \end{pmatrix} \]

Now subtract B:

\[ 2A - B = \begin{pmatrix} 4 & 6 \\ 2 & 8 \end{pmatrix} - \begin{pmatrix} 5 & -1 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} -1 & 7 \\ 2 & 6 \end{pmatrix} \]

(b) Calculate \(AB\):

Top-left: \(2(5) + 3(0) = 10\)

Top-right: \(2(-1) + 3(2) = -2 + 6 = 4\)

Bottom-left: \(1(5) + 4(0) = 5\)

Bottom-right: \(1(-1) + 4(2) = -1 + 8 = 7\)

\[ AB = \begin{pmatrix} 10 & 4 \\ 5 & 7 \end{pmatrix} \]

Identity, Determinant, and Inverse

Identity Matrix

Definition: The identity matrix \(I\) is a square matrix with 1s on the main diagonal and 0s elsewhere.

Examples:

\[ I_2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad I_3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \]

Property:

\[ AI = IA = A \]

Identity matrix is the multiplicative identity

Determinant

For 2×2 Matrix:

\[ \det(A) = |A| = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc \]

Properties:

  • If \(\det(A) = 0\), matrix is singular (no inverse)
  • If \(\det(A) \neq 0\), matrix is non-singular (inverse exists)
  • \(\det(AB) = \det(A) \cdot \det(B)\)
  • \(\det(kA) = k^n\det(A)\) for \(n \times n\) matrix

Inverse Matrix

Definition: The inverse of matrix A, denoted \(A^{-1}\), satisfies:

\[ AA^{-1} = A^{-1}A = I \]

Formula for 2×2 Matrix:

If \(A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\) and \(\det(A) \neq 0\), then:

\[ A^{-1} = \frac{1}{\det(A)} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} = \frac{1}{ad-bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \]

Steps:

  1. Calculate determinant: \(ad - bc\)
  2. Swap diagonal elements: \(a \leftrightarrow d\)
  3. Change signs of off-diagonal elements: \(b \to -b\), \(c \to -c\)
  4. Multiply by \(\frac{1}{\det(A)}\)

Properties:

  • \((A^{-1})^{-1} = A\)
  • \((AB)^{-1} = B^{-1}A^{-1}\) (reverse order!)
  • \((A^T)^{-1} = (A^{-1})^T\)

⚠️ Common Pitfalls & Tips:

  • Always check determinant first – if zero, no inverse exists
  • Remember to swap diagonal elements in 2×2 inverse
  • Use GDC for matrices larger than 2×2
  • \((AB)^{-1} = B^{-1}A^{-1}\) NOT \(A^{-1}B^{-1}\)

📝 Worked Example 2: Finding Inverse

Question: Find the inverse of \(A = \begin{pmatrix} 3 & 5 \\ 2 & 4 \end{pmatrix}\)

Solution:

Step 1: Calculate determinant

\[ \det(A) = (3)(4) - (5)(2) = 12 - 10 = 2 \]

Since \(\det(A) = 2 \neq 0\), inverse exists

Step 2: Apply inverse formula

Swap diagonal: \(3 \leftrightarrow 4\)

Change signs of off-diagonal: \(5 \to -5\), \(2 \to -2\)

\[ A^{-1} = \frac{1}{2} \begin{pmatrix} 4 & -5 \\ -2 & 3 \end{pmatrix} = \begin{pmatrix} 2 & -2.5 \\ -1 & 1.5 \end{pmatrix} \]

Step 3: Verify (optional)

\[ AA^{-1} = \begin{pmatrix} 3 & 5 \\ 2 & 4 \end{pmatrix} \begin{pmatrix} 2 & -2.5 \\ -1 & 1.5 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \checkmark \]

Systems of Linear Equations

Matrix Method for Solving Systems

Standard Form:

A system of linear equations can be written as:

\[ AX = B \]

where A is coefficient matrix, X is variable matrix, B is constant matrix

Example System:

\(\begin{cases} 3x + 2y = 7 \\ x - y = 1 \end{cases}\) becomes \(\begin{pmatrix} 3 & 2 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 7 \\ 1 \end{pmatrix}\)

Solution Method:

If \(\det(A) \neq 0\), unique solution exists:

\[ X = A^{-1}B \]

Steps:

  1. Write system in matrix form \(AX = B\)
  2. Find \(A^{-1}\) (check \(\det(A) \neq 0\))
  3. Calculate \(X = A^{-1}B\)
  4. Interpret results

Types of Solutions:

  • Unique solution: \(\det(A) \neq 0\)
  • No solution or infinite solutions: \(\det(A) = 0\)

⚠️ Common Pitfalls & Tips:

  • Use GDC for systems with 3+ variables
  • Order matters: \(X = A^{-1}B\) NOT \(BA^{-1}\)
  • Always verify solution by substitution
  • Check determinant before attempting to find inverse

📝 Worked Example 3: Solving System of Equations

Question: Solve the system: \(\begin{cases} 2x + 3y = 8 \\ x + 4y = 9 \end{cases}\)

Solution:

Step 1: Write in matrix form

\[ \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 8 \\ 9 \end{pmatrix} \]

So \(A = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix}\), \(X = \begin{pmatrix} x \\ y \end{pmatrix}\), \(B = \begin{pmatrix} 8 \\ 9 \end{pmatrix}\)

Step 2: Find \(A^{-1}\)

Determinant: \(\det(A) = 2(4) - 3(1) = 8 - 3 = 5\)

\[ A^{-1} = \frac{1}{5} \begin{pmatrix} 4 & -3 \\ -1 & 2 \end{pmatrix} = \begin{pmatrix} 0.8 & -0.6 \\ -0.2 & 0.4 \end{pmatrix} \]

Step 3: Calculate \(X = A^{-1}B\)

\[ X = \begin{pmatrix} 0.8 & -0.6 \\ -0.2 & 0.4 \end{pmatrix} \begin{pmatrix} 8 \\ 9 \end{pmatrix} = \begin{pmatrix} 6.4 - 5.4 \\ -1.6 + 3.6 \end{pmatrix} = \begin{pmatrix} 1 \\ 2 \end{pmatrix} \]

Answer: x = 1, y = 2

Verification:

Check: \(2(1) + 3(2) = 2 + 6 = 8\) ✓

Check: \(1 + 4(2) = 1 + 8 = 9\) ✓

Eigenvalues and Eigenvectors (HL Only)

Definition & Concepts

Definition: For a square matrix A, if there exists a non-zero vector \(\vec{v}\) and scalar \(\lambda\) such that \(A\vec{v} = \lambda\vec{v}\), then \(\lambda\) is an eigenvalue and \(\vec{v}\) is the corresponding eigenvector.

Characteristic Equation:

To find eigenvalues, solve:

\[ \det(A - \lambda I) = 0 \]

For 2×2 Matrix:

If \(A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\), then:

\[ \det\begin{pmatrix} a-\lambda & b \\ c & d-\lambda \end{pmatrix} = 0 \]

\[ (a-\lambda)(d-\lambda) - bc = 0 \]

\[ \lambda^2 - (a+d)\lambda + (ad-bc) = 0 \]

Finding Eigenvectors:

For each eigenvalue \(\lambda\), solve:

\[ (A - \lambda I)\vec{v} = \vec{0} \]

Properties:

  • Sum of eigenvalues = trace of matrix (sum of diagonal elements)
  • Product of eigenvalues = determinant of matrix
  • Eigenvectors corresponding to different eigenvalues are linearly independent

⚠️ Common Pitfalls & Tips:

  • Always use GDC for eigenvalue/eigenvector calculations
  • Eigenvectors are not unique (any scalar multiple works)
  • Eigenvalues can be repeated
  • Some matrices don't have real eigenvalues

📝 Worked Example 4: Finding Eigenvalues

Question: Find the eigenvalues of \(A = \begin{pmatrix} 5 & 2 \\ 2 & 2 \end{pmatrix}\)

Solution:

Step 1: Set up characteristic equation

\[ \det(A - \lambda I) = 0 \]

\[ \det\begin{pmatrix} 5-\lambda & 2 \\ 2 & 2-\lambda \end{pmatrix} = 0 \]

Step 2: Expand determinant

\[ (5-\lambda)(2-\lambda) - 2(2) = 0 \]

\[ 10 - 5\lambda - 2\lambda + \lambda^2 - 4 = 0 \]

\[ \lambda^2 - 7\lambda + 6 = 0 \]

Step 3: Solve quadratic

\[ (\lambda - 6)(\lambda - 1) = 0 \]

\[ \lambda_1 = 6, \quad \lambda_2 = 1 \]

Answer: Eigenvalues are λ = 6 and λ = 1

Verification:

Sum: \(6 + 1 = 7 = 5 + 2\) (trace) ✓

Product: \(6 \times 1 = 6 = 5(2) - 2(2)\) (determinant) ✓

📊 Quick Reference Summary

Operations

  • Addition: same order only
  • Multiplication: NOT commutative
  • Use GDC for speed

Determinant & Inverse (2×2)

  • \(\det(A) = ad - bc\)
  • \(A^{-1} = \frac{1}{\det(A)}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}\)

Systems

  • \(AX = B\)
  • \(X = A^{-1}B\)
  • Check \(\det(A) \neq 0\)

Eigenvalues

  • \(\det(A - \lambda I) = 0\)
  • Use GDC
  • Sum = trace, Product = det

✍️ IB Exam Strategy

  1. Always use GDC for calculations – it's faster and more accurate
  2. Show GDC work: Write "Using GDC" and show inputs
  3. Check dimensions before multiplying matrices
  4. For inverse: Always verify \(\det(A) \neq 0\) first
  5. Systems: Use matrix method \(X = A^{-1}B\)
  6. Eigenvalues: Use GDC and verify using trace/determinant
  7. Round appropriately: 3 s.f. unless otherwise stated

🚫 Top Mistakes to Avoid

  1. Trying to add/multiply matrices with incompatible dimensions
  2. Assuming \(AB = BA\) (matrix multiplication is NOT commutative)
  3. Forgetting to check determinant before finding inverse
  4. Not swapping diagonal elements when finding 2×2 inverse
  5. Writing \(X = BA^{-1}\) instead of \(X = A^{-1}B\)
  6. Forgetting that \((AB)^{-1} = B^{-1}A^{-1}\) (reversed order)
  7. Not using GDC for large calculations
  8. Mixing up rows and columns in matrix multiplication

🖩 Using GDC for Matrices

Essential GDC Functions:

  • Matrix entry: MATRIX → EDIT to input matrices
  • Operations: MATRIX → MATH for addition, multiplication
  • Determinant: det([A])
  • Inverse: [A]^(-1)
  • Solving systems: [A]^(-1) × [B]
  • Eigenvalues: Most calculators have built-in eigenvalue function