learn › Linear Algebra

Matrices

lesson · about 3 minutes

Multiply matrices and compute determinants.

Pen and paper is fine · no calculator needed why?

Opens at level 42. You're level 1. You can read and practice here now.

the idea

A matrix is a grid of numbers. Here it is written as a list of rows: [[1, 2], [3, 4]] has first row (1, 2) and second row (3, 4).

Each entry of a product AB is a dot product: a row of A with a column of B. So AB and BA are usually different.

The determinant of a square matrix measures how much it stretches area or volume; a minus sign means it also flips them over. It is 0 exactly when the matrix squashes space flat.

techniques

Row times column

One entry of a matrix product AB.

  1. For the entry in row i, column j, take row i of A and column j of B.
  2. A column runs down: column j holds the j-th entry of each row.
  3. Multiply matching entries and add, as in a dot product.
worked example

Example: A = [[2, −1], [0, 3]] and B = [[4, 1], [5, −2]] (rows listed). What is the entry in row 1, column 2 of AB?

  1. Row 1 of A is (2, −1). Column 2 of B is (1, −2).
  2. 2 × 1 + (−1) × (−2) = 2 + 2 = 4.

Answer: 4

2 × 2 determinant: ad − bc

Any 2 × 2 matrix [[a, b], [c, d]].

  1. Multiply down the main diagonal, a × d.
  2. Multiply the other diagonal, b × c.
  3. Subtract the second from the first. Keep the signs of negative entries.
worked example

Example: What is the determinant of [[3, −2], [5, 4]]?

  1. ad = 3 × 4 = 12.
  2. bc = (−2) × 5 = −10.
  3. 12 − (−10) = 22.

Answer: 22

3 × 3: expand along the zeros

A 3 × 3 determinant, especially one with zeros in it.

  1. Pick the row or column with the most zeros.
  2. Signs follow a checkerboard: + − + on the top row, − + − in the middle, + − + at the bottom.
  3. Each nonzero entry gives sign × entry × the 2 × 2 determinant left when you cross out its row and column.
  4. Add those terms. The zero entries drop out.
worked example

Example: What is the determinant of [[0, 3, 0], [2, 1, 4], [1, 5, 3]]?

  1. Row 1 has two zeros. Its middle position has sign −.
  2. Cross out row 1 and column 2: [[2, 4], [1, 3]].
  3. That determinant is 6 − 4 = 2.
  4. det = −3 × 2 = −6.

Answer: −6

watch out for

practice

Sign in to try one

Matrix product entry

worked example

A = [[−3, 0, −2], [−3, 4, 9]] and B = [[4, −1], [−5, 8], [2, −4]] (rows listed). What is the entry in row 1, column 2 of AB?

Answer: 11

  1. Row 1 of A is (−3, 0, −2); column 2 of B is (−1, 8, −4).
  2. (−3) × (−1) + 0 × 8 + (−2) × (−4) = 3 + 0 + 8 = 11.

2 × 2 determinant

worked example

What is the determinant of [[8, 4], [6, −2]]?

Answer: -40

  1. For [[a, b], [c, d]] the determinant is ad − bc.
  2. 8 × (−2) − 4 × 6 = −16 − 24 = −40.

3 × 3 determinant

worked example

What is the determinant of [[2, −1, 0], [1, −2, 0], [−2, 1, −3]]?

Answer: 9

  1. Expand along column 3 (cofactor signs + − +); zero entries drop out.
  2. det = −3 × (2 × (−2) − (−1) × 1)
  3. = −3 × (−3) = 9.

Sign in to start