Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

Matrices

Print Algebra II only

The lessons of this topic taught in Algebra II, ready for paper.

To save a PDF, choose “Save as PDF” in the print dialog.

1. Matrices: representing data, adding and multiplying by a scalar

Discover

A table has 2 rows and 3 columns of numbers. How many numbers does it hold?

  1. 6
  2. 5

Key idea

A matrix is a rectangular table of numbers.

An m×nm \times n matrix has mm rows and nn columns; the entry in row ii, column jj is aija_{ij}. Matrices of the same size add and subtract entry by entry, and a scalar kk multiplies every entry: 3(120−1)=(360−3)3\begin{pmatrix} 1 & 2 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 3 & 6 \\ 0 & -3 \end{pmatrix}.

Worked example

Add (1234)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} and (50−12)\begin{pmatrix} 5 & 0 \\ -1 & 2 \end{pmatrix}.

1 + 5, 2 + 0, 3 + (−1), 4 + 2
Same positions.
(6226)\begin{pmatrix} 6 & 2 \\ 2 & 6 \end{pmatrix}
Result.

Your turn, guided

Your turn: the top-left entry of 4(2103)\begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}.

88
4 · 2.

Practice ★

  1. Let A = (3−375)\begin{pmatrix} 3 & -3 \\ 7 & 5 \end{pmatrix} and B = (−4−4−55)\begin{pmatrix} -4 & -4 \\ -5 & 5 \end{pmatrix}. What is the entry in row 1, column 2 of A + B?
  2. Let A = (2761)\begin{pmatrix} 2 & 7 \\ 6 & 1 \end{pmatrix} and B = (5−555)\begin{pmatrix} 5 & -5 \\ 5 & 5 \end{pmatrix}. What is the entry in row 1, column 2 of A + B?
  1. A shop records sales in a matrix with one row for each of its 4 stores and one column for each of 7 days. What are the dimensions of the matrix?
    1. 4 × 7
    2. 7 × 4
    3. 28 × 1

Watch out!

Practice ★★

  1. Let A = (2062)\begin{pmatrix} 2 & 0 \\ 6 & 2 \end{pmatrix}. What is the entry in row 2, column 1 of 3A?
  2. Let A = (82−1−3)\begin{pmatrix} 8 & 2 \\ -1 & -3 \end{pmatrix}. What is the entry in row 2, column 1 of 3A?
  1. Let A = (3−375)\begin{pmatrix} 3 & -3 \\ 7 & 5 \end{pmatrix} and B = (−4−4−55)\begin{pmatrix} -4 & -4 \\ -5 & 5 \end{pmatrix}. What is the entry in row 1, column 2 of A + B?

Exit ticket

Three questions to check you have got it.

  1. Let A = (3−375)\begin{pmatrix} 3 & -3 \\ 7 & 5 \end{pmatrix} and B = (−4−4−55)\begin{pmatrix} -4 & -4 \\ -5 & 5 \end{pmatrix}. What is the entry in row 1, column 2 of A + B?
  2. Let A = (2761)\begin{pmatrix} 2 & 7 \\ 6 & 1 \end{pmatrix} and B = (5−555)\begin{pmatrix} 5 & -5 \\ 5 & 5 \end{pmatrix}. What is the entry in row 1, column 2 of A + B?
  3. Let A = (4618)\begin{pmatrix} 4 & 6 \\ 1 & 8 \end{pmatrix} and B = (7259)\begin{pmatrix} 7 & 2 \\ 5 & 9 \end{pmatrix}. What is the entry in row 1, column 2 of A + B?

Summary card

Matrices

Size is rows × columns; add entry by entry; a scalar multiplies every entry.

Watch out: rows first.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. Let A = (−5102)\begin{pmatrix} -5 & 1 \\ 0 & 2 \end{pmatrix} and B = (4310)\begin{pmatrix} 4 & 3 \\ 1 & 0 \end{pmatrix}. What is the entry in row 1, column 1 of 2A − B?

2. Multiplying matrices and its properties

Warm-up

Three quick questions from earlier lessons.

  1. Let A = (3−375)\begin{pmatrix} 3 & -3 \\ 7 & 5 \end{pmatrix} and B = (−4−4−55)\begin{pmatrix} -4 & -4 \\ -5 & 5 \end{pmatrix}. What is the entry in row 1, column 2 of A + B?
  2. Let A = (2062)\begin{pmatrix} 2 & 0 \\ 6 & 2 \end{pmatrix}. What is the entry in row 2, column 1 of 3A?
  3. A shop records sales in a matrix with one row for each of its 4 stores and one column for each of 7 days. What are the dimensions of the matrix?
    1. 4 × 7
    2. 7 × 4
    3. 28 × 1

Discover

To multiply a row (2, 3) by a column (4, 5), you compute 2 · 4 + 3 · 5. What is it?

  1. 23
  2. (8, 15)

Key idea

Each entry of AB is a row of A times a column of B.

If AA is m×nm \times n and BB is n×pn \times p, then ABAB is m×pm \times p: the entry in row ii, column jj is row ii of AA times column jj of BB (multiply pairs, then add). The inner sizes must match. Matrix multiplication is associative and distributes over addition, but in general AB≠BAAB \ne BA.

Worked example

Compute the top-left entry of (1234)(5678)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}.

(1, 2) and (5, 7)
Row 1 of A, column 1 of B.
1 · 5 + 2 · 7 = 19
Multiply and add.

Your turn, guided

Your turn: the top-right entry of the same product.

2222
1 · 6 + 2 · 8.

Practice ★

  1. Let A = (423−2)\begin{pmatrix} 4 & 2 \\ 3 & -2 \end{pmatrix} and B = (7954)\begin{pmatrix} 7 & 9 \\ 5 & 4 \end{pmatrix}. What is the entry in row 1, column 1 of AB?
  2. Let A = (−2−45−4)\begin{pmatrix} -2 & -4 \\ 5 & -4 \end{pmatrix} and B = (47−5−1)\begin{pmatrix} 4 & 7 \\ -5 & -1 \end{pmatrix}. What is the entry in row 1, column 1 of AB?
  1. A is a 2 × 5 matrix and B is a 5 × 8 matrix. What are the dimensions of AB?
    1. 2 × 8
    2. 5 × 5
    3. AB is not defined

Watch out!

Practice ★★

  1. Let A = (8884)\begin{pmatrix} 8 & 8 \\ 8 & 4 \end{pmatrix} and B = (2332)\begin{pmatrix} 2 & 3 \\ 3 & 2 \end{pmatrix}. What is the entry in row 2, column 1 of AB?
  2. Let A = (182−2)\begin{pmatrix} 1 & 8 \\ 2 & -2 \end{pmatrix} and B = (2−556)\begin{pmatrix} 2 & -5 \\ 5 & 6 \end{pmatrix}. What is the entry in row 2, column 1 of AB?

Exit ticket

Three questions to check you have got it.

  1. Let A = (423−2)\begin{pmatrix} 4 & 2 \\ 3 & -2 \end{pmatrix} and B = (7954)\begin{pmatrix} 7 & 9 \\ 5 & 4 \end{pmatrix}. What is the entry in row 1, column 1 of AB?
  2. Let A = (−2−45−4)\begin{pmatrix} -2 & -4 \\ 5 & -4 \end{pmatrix} and B = (47−5−1)\begin{pmatrix} 4 & 7 \\ -5 & -1 \end{pmatrix}. What is the entry in row 1, column 1 of AB?
  3. Let A = (5804)\begin{pmatrix} 5 & 8 \\ 0 & 4 \end{pmatrix} and B = (41−23)\begin{pmatrix} 4 & 1 \\ -2 & 3 \end{pmatrix}. What is the entry in row 1, column 1 of AB?

Summary card

Multiplying matrices

(m × n)(n × p) = m × p; entry = row · column.

Watch out: AB is usually not BA.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. Let A = (1101)\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}. What is the entry in row 1, column 2 of A17A^{ 17 }?

3. Matrices as transformations: matrix times vector, determinant and area

Warm-up

Three quick questions from earlier lessons.

  1. Let A = (423−2)\begin{pmatrix} 4 & 2 \\ 3 & -2 \end{pmatrix} and B = (7954)\begin{pmatrix} 7 & 9 \\ 5 & 4 \end{pmatrix}. What is the entry in row 1, column 1 of AB?
  2. Let A = (8884)\begin{pmatrix} 8 & 8 \\ 8 & 4 \end{pmatrix} and B = (2332)\begin{pmatrix} 2 & 3 \\ 3 & 2 \end{pmatrix}. What is the entry in row 2, column 1 of AB?
  3. A is a 2 × 5 matrix and B is a 5 × 8 matrix. What are the dimensions of AB?
    1. 2 × 8
    2. 5 × 5
    3. AB is not defined

Discover

Doubling both coordinates of every point of a square with area 1 gives a square with area…

  1. 4
  2. 2

Key idea

A matrix moves vectors; its determinant scales areas.

Multiplying a column vector by a matrix gives a new vector: (abcd)(xy)=(ax+bycx+dy)\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}. So a 2×22 \times 2 matrix is a transformation of the plane; its columns are the images of (1,0)(1, 0) and (0,1)(0, 1). Areas are multiplied by ∣det⁡A∣|\det A|.

Worked example

Apply (0−110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} to (3, 0) and (0, 3).

(0 · 3 − 1 · 0, 1 · 3 + 0) = (0, 3)
First point.
(−3, 0)
Second point.
a 90° counterclockwise rotation; det = 1, areas unchanged
Conclusion.

Your turn, guided

Your turn: the area scale factor of (3002)\begin{pmatrix} 3 & 0 \\ 0 & 2 \end{pmatrix}.

66
det = 3 · 2.

Practice ★

  1. Let A = (9236)\begin{pmatrix} 9 & 2 \\ 3 & 6 \end{pmatrix}. What is the first component of A(−3−1)\begin{pmatrix} -3 \\ -1 \end{pmatrix}?
  2. Let A = (−15−5−5)\begin{pmatrix} -1 & 5 \\ -5 & -5 \end{pmatrix}. What is the first component of A(3−2)\begin{pmatrix} 3 \\ -2 \end{pmatrix}?
  1. The matrix (0−110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} maps the point (8, 0) to (0, 8) and (0, 8) to (−8, 0). Which transformation does it represent?
    1. A rotation of 90° counterclockwise about the origin
    2. A reflection in the line y = x
    3. A rotation of 90° clockwise about the origin

Watch out!

Practice ★★

  1. A shape with an area of 2 square units is transformed by the matrix (2223)\begin{pmatrix} 2 & 2 \\ 2 & 3 \end{pmatrix}. What is the area of the image?
  2. A shape with an area of 8 square units is transformed by the matrix (2213)\begin{pmatrix} 2 & 2 \\ 1 & 3 \end{pmatrix}. What is the area of the image?
  1. Let A = (9236)\begin{pmatrix} 9 & 2 \\ 3 & 6 \end{pmatrix}. What is the first component of A(−3−1)\begin{pmatrix} -3 \\ -1 \end{pmatrix}?

Exit ticket

Three questions to check you have got it.

  1. Let A = (9236)\begin{pmatrix} 9 & 2 \\ 3 & 6 \end{pmatrix}. What is the first component of A(−3−1)\begin{pmatrix} -3 \\ -1 \end{pmatrix}?
  2. Let A = (−15−5−5)\begin{pmatrix} -1 & 5 \\ -5 & -5 \end{pmatrix}. What is the first component of A(3−2)\begin{pmatrix} 3 \\ -2 \end{pmatrix}?
  3. Let A = (7−1−27)\begin{pmatrix} 7 & -1 \\ -2 & 7 \end{pmatrix}. What is the first component of A(61)\begin{pmatrix} 6 \\ 1 \end{pmatrix}?

Summary card

Matrices as transformations

Av moves vectors; columns are the images of (1, 0) and (0, 1); areas scale by |det|.

Watch out: the area factor is the determinant, not a sum of entries.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. A shape with an area of 20 square units is transformed by (4004)\begin{pmatrix} 4 & 0 \\ 0 & 4 \end{pmatrix}. What is the area of the image?

4. History of matrices: the Nine Chapters, Sylvester and Cayley

Discover

The Chinese Nine Chapters on the Mathematical Art contains 18 problems that reduce to systems of linear equations. How were they solved?

  1. By arranging the numbers in a table and reducing it to triangular form
  2. By guessing

Key idea

From counting boards to matrix algebra.

150010001500c. 263Nine Chaptersc. 263Nine Chapters
  1. Step 1150010001500c. 263Nine Chaptersc. 263Nine ChaptersThe Nine Chapters (commentary by Liu Hui, 263): elimination on a table of numbers.
  2. Step 2150010001500c. 263Nine Chapters1850Sylvesterc. 263Nine Chapters1850SylvesterJames Joseph Sylvester 1814–1897Unknown artist. Public domain1850: Sylvester introduces the word matrix.
  3. Step 3150010001500c. 263Nine Chapters1850Sylvester1855Cayleyc. 263Nine Chapters1850Sylvester1855CayleyArthur Cayley 1821–1895Herbert Beraud (1845–1896). Public domain1855: Cayley's first paper on matrices: inverse and multiplication.

In the Nine Chapters, 18 problems reduce to systems of linear equations; the numbers are arranged in a table that is reduced to triangular form by column operations, as in Gaussian elimination today. The word matrix was introduced by James Joseph Sylvester in 1850. In 1855 Arthur Cayley published the first expository paper on matrices, with the ideas of inverse and of matrix multiplication.

Worked example

A triangular system like the end of the Nine Chapters method: x+y+z=6x + y + z = 6, y+z=5y + z = 5, z=3z = 3.

z=3z = 3, y=2y = 2
From the bottom up.
x=6−5=1x = 6 - 5 = 1
Then.

Practice ★

  1. Who introduced the word 'matrix', in 1850?
    1. James Joseph Sylvester
    2. Arthur Cayley
    3. Carl Friedrich Gauss
  1. Solve the triangular system x+y+z=−5x + y + z = -5, y+z=0y + z = 0, z=−4z = -4. Give xx.
  2. Solve the triangular system x+y+z=−8x + y + z = -8, y+z=−5y + z = -5, z=0z = 0. Give xx.
  1. Cayley's inverse needs det⁡(−41−3−6)≠0\det \begin{pmatrix} -4 & 1 \\ -3 & -6 \end{pmatrix} \neq 0. Compute this determinant.

Summary card

Matrices today

  • Search engines rank pages with huge matrices.
  • 3D graphics rotate and project with 4×4 matrices.
  • Economics and logistics solve large linear systems.

Sources: MacTutor article on the Nine Chapters; biographies of Sylvester and Cayley (see "Sources and credits").

5. Determinants of products and powers

Discover

det⁡A=2\det A = 2 and det⁡B=5\det B = 5. Without computing ABAB, what is det⁡(AB)\det(AB)?

  1. 1010: determinants multiply
  2. 77

Key idea

Determinants of products and powers.

For square matrices of the same size:

det⁡(AB)=det⁡A⋅det⁡B\det(AB) = \det A \cdot \det B, det⁡(An)=(det⁡A)n\quad \det(A^n) = (\det A)^n, det⁡(A−1)=1det⁡A\quad \det(A^{-1}) = \dfrac{1}{\det A}.

A 2×2 determinant is the factor by which the transformation scales areas.

Worked example

A=(2111)A = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}. Find det⁡(A3)\det(A^3).

11
det⁡A=2−1\det A = 2 - 1.
det⁡(A3)=13=1\det(A^3) = 1^3 = 1
Power.

Your turn, guided

Your turn: det⁡A=3\det A = 3. Find det⁡(A2)\det(A^2).

99
323^2.

Practice ★

  1. det⁡A=5\det A = 5 and det⁡B=−2\det B = -2. Find det⁡(AB)\det(AB).
  2. det⁡A=−5\det A = -5 and det⁡B=−1\det B = -1. Find det⁡(AB)\det(AB).
  3. det⁡A=2\det A = 2 and det⁡B=1\det B = 1. Find det⁡(AB)\det(AB).

Practice ★★

  1. det⁡A=1\det A = 1. Find det⁡(A2)\det(A^{ 2 }).
  2. det⁡A=−2\det A = -2. Find det⁡(A4)\det(A^{ 4 }).

Exit ticket

Two questions to check.

  1. det⁡A=5\det A = 5 and det⁡B=−2\det B = -2. Find det⁡(AB)\det(AB).
  2. det⁡A=−5\det A = -5 and det⁡B=−1\det B = -1. Find det⁡(AB)\det(AB).

Summary card

Determinant rules

  • det⁡(AB)=det⁡Adet⁡B\det(AB) = \det A \det B.
  • det⁡(An)=(det⁡A)n\det(A^n) = (\det A)^n.

Computer graphics check determinants to know whether a transformation flips or squashes an image.