MathMastery.Beta
Learning Resources

Matrices

Interactive curriculum lessons, worked examples, and geometric problem-solving techniques designed to help Kenyan students master CBC, KPSEA, KCSE, and IGCSE mathematics.

Grade 09 Pathway: N/A

First Principles

(a) Concrete Scenario: The Duka Stock Sheet

Imagine Mama Sarah runs two general stores (dukas)—one in Nairobi and one in Nakuru. She sells two main items: Bags of Maize Flour (Unga) and Jerrycans of Cooking Oil.

Instead of writing long sentences, she arranges her weekly sales in a neat grid:

\(\text{Week 1} = \begin{bmatrix} 40 & 25 \\ 15 & 30 \end{bmatrix} \begin{matrix} \text{Unga} \\ \text{Oil} \end{matrix}\)

When Week 2 ends, she has a second grid. To calculate her total bi-weekly sales, she simply adds the numbers in the matching store and item slots! This rectangular table of numbers is called a matrix.

Interactive Matrix Addition Lab

Change any value in Matrix \(A\) or Matrix \(B\) to watch how corresponding elements instantly sum in Matrix \(C\).

Matrix A
+
Matrix B
=
Sum (A + B)
(b) Geometric & Structural Insight: Dimensions Matter

A matrix is defined by its order (or dimensions): \(m \times n\), meaning \(m\) rows (horizontal) and \(n\) columns (vertical). Just as you cannot stack an egg crate holding 6 eggs onto a 12-egg crate without spilling, you cannot add or subtract two matrices unless their dimensions are identical.

(c) Algebraic Rule: Element-by-Element Operation

Given matrices \(A = [a_{ij}]\) and \(B = [b_{ij}]\) of dimension \(m \times n\), their sum \(C = A + B\) and difference \(D = A - B\) are formed by operating on corresponding elements:

\[c_{ij} = a_{ij} + b_{ij} \quad \text{and} \quad d_{ij} = a_{ij} - b_{ij}\]

Key Formulas

1. Order (Dimensions) of a Matrix

\[A_{m \times n} = \begin{bmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{bmatrix}\]

Always state Rows first, then Columns (\(R \times C\)).

2. Matrix Addition & Subtraction

\[\begin{bmatrix} a & b \\ c & d \end{bmatrix} + \begin{bmatrix} e & f \\ g & h \end{bmatrix} = \begin{bmatrix} a+e & b+f \\ c+g & d+h \end{bmatrix}\]\[\begin{bmatrix} a & b \\ c & d \end{bmatrix} - \begin{bmatrix} e & f \\ g & h \end{bmatrix} = \begin{bmatrix} a-e & b-f \\ c-g & d-h \end{bmatrix}\]

Condition: Dimensions of both matrices must be strictly equal.

3. Determinant of a \(2 \times 2\) Matrix

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

Product of main diagonal minus product of anti-diagonal.

Worked Examples

Level 1: Easy

Example 1: Direct Matrix Addition

Calculate \(A + B\) given:

\[A = \begin{bmatrix} 5 & -2 \\ 3 & 7 \end{bmatrix}, \quad B = \begin{bmatrix} 4 & 6 \\ -1 & 2 \end{bmatrix}\]
Step-by-step Solution:
  1. Check dimensions: Both \(A\) and \(B\) are \(2 \times 2\). Addition is valid.
  2. Add corresponding elements: \[A + B = \begin{bmatrix} 5 + 4 & -2 + 6 \\ 3 + (-1) & 7 + 2 \end{bmatrix}\]
  3. Simplify each entry: \[A + B = \begin{bmatrix} 9 & 4 \\ 2 & 9 \end{bmatrix}\]
Level 2: Medium

Example 2: Subtraction with Negatives

If \(P = \begin{bmatrix} 10 & 3 \\ -4 & 8 \end{bmatrix}\) and \(Q = \begin{bmatrix} 6 & -5 \\ 2 & 11 \end{bmatrix}\), find \(P - Q\).

Step-by-step Solution:
  1. Subtract each element of \(Q\) from the corresponding element in \(P\): \[P - Q = \begin{bmatrix} 10 - 6 & 3 - (-5) \\ -4 - 2 & 8 - 11 \end{bmatrix}\]
  2. Apply integer rules (e.g., \(3 - (-5) = 3 + 5 = 8\)): \[P - Q = \begin{bmatrix} 4 & 8 \\ -6 & -3 \end{bmatrix}\]
Level 3: Hard

Example 3: Solving a Matrix Equation

Find the matrix \(X\) that satisfies the equation:

\[X + \begin{bmatrix} 3 & -1 \\ 4 & 7 \end{bmatrix} = \begin{bmatrix} 8 & 5 \\ 1 & 2 \end{bmatrix}\]
Step-by-step Solution:
  1. Isolate \(X\) by subtracting the known matrix from both sides: \[X = \begin{bmatrix} 8 & 5 \\ 1 & 2 \end{bmatrix} - \begin{bmatrix} 3 & -1 \\ 4 & 7 \end{bmatrix}\]
  2. Compute each element: \(x_{11} = 8 - 3 = 5\), \(x_{12} = 5 - (-1) = 6\), \(x_{21} = 1 - 4 = -3\), \(x_{22} = 2 - 7 = -5\).
  3. Conclusion: \[X = \begin{bmatrix} 5 & 6 \\ -3 & -5 \end{bmatrix}\]

Common Mistakes

Misconception 1: Adding Incompatible Matrix Dimensions

The Mistake: Trying to add \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} + \begin{bmatrix} 5 & 6 \end{bmatrix}\).

Why it feels right: Learners want to add the top row numbers together and leave the remaining numbers as they are.

The Correction: Matrix addition is strictly defined only when both matrices have the identical order (\(m \times n\)). If sizes differ, the sum is undefined.

Misconception 2: Double Negative Confusion in Subtraction

The Mistake: When calculating \(\begin{bmatrix} 4 \end{bmatrix} - \begin{bmatrix} -7 \end{bmatrix}\), writing \(-3\) or \(3\).

Why it feels right: Seeing minus signs makes learners instinctively subtract \(4 - 7\).

The Correction: Always write out the double sign: \(4 - (-7) = 4 + 7 = 11\).

Misconception 3: Confusing Determinant with Subtraction

The Mistake: Calculating \(\det(A)\) by doing \(a_{11} - a_{22}\) instead of \((ad) - (bc)\).

The Correction: The determinant of \(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\) is the difference of diagonal products: \(ad - bc\).

Real World

1. Agri-Business Supply Logistics in Kenya

A cooperative in Eldoret tracks milk distribution (in thousands of liters) to two creameries (Brookside & KCC) over two weeks:

Week 1 (in thousands):\[W_1 = \begin{bmatrix} 18 & 12 \\ 14 & 9 \end{bmatrix} \begin{matrix} \text{Grade A} \\ \text{Grade B} \end{matrix}\]
Week 2 (in thousands):\[W_2 = \begin{bmatrix} 22 & 15 \\ 16 & 11 \end{bmatrix} \begin{matrix} \text{Grade A} \\ \text{Grade B} \end{matrix}\]

Total supply over the fortnight is given by \(W_1 + W_2 = \begin{bmatrix} 40 & 27 \\ 30 & 20 \end{bmatrix}\). This helps the SACCO manage payout allocations instantly!

2. Computer Graphics & Screen Pixels

Every digital image on a smartphone or computer screen is a matrix of pixel values (Red, Green, Blue). Applying a filter or adjusting brightness is done by adding or subtracting constant values across the image matrix!

Practice

Two market stalls record their morning sales of bags of maize and beans in matrix \(M = \begin{bmatrix} 12 & 7 \\ 15 & 9 \end{bmatrix}\) and afternoon sales in matrix \(N = \begin{bmatrix} 8 & 13 \\ 5 & 11 \end{bmatrix}\). What is the total combined sales of beans recorded in row 2, column 2 of matrix \((M + N)\)? (Type only the number, e.g., 42)
Review the concepts above.
Given the matrices \(A = \begin{bmatrix} 14 & 9 \\ 6 & 12 \end{bmatrix}\) and \(B = \begin{bmatrix} 5 & 4 \\ 2 & 7 \end{bmatrix}\), find the value of element \(c_{11}\) (row 1, column 1) in the difference matrix \(C = A - B\). (Type only the number, e.g., 42)
Review the concepts above.
A hardware store tracks stock before and after shipments. The net inventory change matrix is \(D = A - B\), where \(A = \begin{bmatrix} 20 & 15 \\ 8 & 10 \end{bmatrix}\) and \(B = \begin{bmatrix} 7 & -5 \\ 12 & 4 \end{bmatrix}\). Find the value of the entry in row 1, column 2 (i.e., \(d_{12}\)). (Type only the number, e.g., 42)
Review the concepts above.
Find the determinant of the matrix \(G = \begin{bmatrix} 7 & 4 \\ 5 & 6 \end{bmatrix}\). (Type only the number, e.g., 42)
Review the concepts above.
Matrix equation: \(\begin{bmatrix} x & 6 \\ 4 & 9 \end{bmatrix} - \begin{bmatrix} 5 & 2 \\ 1 & y \end{bmatrix} = \begin{bmatrix} 8 & 4 \\ 3 & 2 \end{bmatrix}\). Find the value of \(x + y\). (Type only the number, e.g., 42)
Review the concepts above.
Given two transaction matrices \(A = \begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix}\) and \(B = \begin{bmatrix} 1 & 5 \\ 2 & 3 \end{bmatrix}\), first calculate the difference matrix \(C = A - B\), then calculate the determinant of \(C\), i.e., \(\det(C)\). (Type only the number, e.g., 42)
Review the concepts above.