Class 12 MathsAll 13 chaptersQuick lessonWorked solutionsPast papersPast papersGet updates

Matrices.
Tables that calculate.

A matrix is a rectangle of numbers in which position carries meaning. Once numbers sit in agreed places, we can add whole tables at once, scale them, multiply them to make bills, flip them in a mirror and even undo them. Computer graphics, spreadsheets, search engines and codes all run on this idea.

A table of how many pens and books two friends buy becomes a matrix. Multiplying it by a column of prices gives both bills in one step. That single idea, row × column, is the heart of the chapter.
Part 1 · Sections 3.1–3.2

A matrix is a table whose places mean something.

A matrix is a table of numbers in brackets. Where a number sits tells you what it means.

The idea
A = 302525312726

A matrix is an ordered rectangular array of numbers (or functions), written in brackets. Each number is an entry (or element). This one is Example 1’s table of workers.

Order
m × n = rows × columns

Horizontal lines are rows, vertical lines are columns. Always rows first. A matrix of order m × n holds m · n entries.

Address
A = [aij]m × n

aij is the entry in row i and column j. In the matrix above, a32 = 26.

Order and address explorerChoose the number of rows and columns. Tap any cell to read its address. The first little number is always the row.
Order
Tapped cell
Tap a cell
Rows

Go across

Row 2 is the second line from the top. In a table of factories, each row is one factory.

Columns

Go down

Column 3 is the third line from the left, like columns holding up a building.

Order

Rows first, always

A 2 × 3 matrix has 2 rows and 3 columns. A 3 × 2 matrix is a different shape.

Address

aij = row i, column j

a21 is in row 2, column 1. a12 is somewhere else.

Points and shapes are matrices too.

A point (x, y) can be written as a column [x; y] or a row [x y]. List the corners of a shape as columns and the whole shape becomes one matrix. The book’s quadrilateral A(1, 0), B(3, 2), C(1, 3), D(−1, 2) becomes a 2 × 4 matrix, or a 4 × 2 matrix if we use rows.

Shape as a matrixPick a shape. Tap a column of the matrix (or a corner) to see which is which. Row 1 holds the x-coordinates, row 2 the y-coordinates.
The shape as a 2 × n matrix
Selected corner
Tap a column or a corner
Example 1

Men and women workers in factories I, II, III: 30 and 25, 25 and 31, 27 and 26. Write a 3 × 2 matrix. What is the entry in row 3, column 2?

  1. Rows are factories, columns are men and women.
  2. A = [30 25; 25 31; 27 26], order 3 × 2.
  3. a₃₂ is in row 3 (factory III), column 2 (women).
a₃₂ = 26 women workers in factory III.
Example 2

A matrix has 8 elements. What orders are possible?

  1. m × n = 8 with natural numbers m, n.
  2. Factor pairs: (1, 8), (8, 1), (2, 4), (4, 2).
1 × 8, 8 × 1, 2 × 4, 4 × 2.
Example 3

Construct a 3 × 2 matrix with aij = ½|i − 3j|.

  1. Substitute each address: a₁₁ = ½|1 − 3| = 1, a₁₂ = ½|1 − 6| = 5/2.
  2. a₂₁ = ½, a₂₂ = 2, a₃₁ = 0, a₃₂ = 3/2.
A = [1 5/2; 1/2 2; 0 3/2].
Part 2 · Section 3.3

Seven shapes and patterns worth naming.

Some matrices come up so often that they have names. Some names describe the shape; others describe a pattern inside a square matrix.

Shape names
m × 1  ·  1 × n  ·  m = n

Column, row and square matrices are named after their shape.

The main diagonal
a11, a22, …, ann

In a square matrix, the entries running from the top-left corner to the bottom-right. The pattern names (diagonal, scalar, identity) all depend on it.

Column matrix

m × 1

Only one column, like a shopping list or a point [x; y].

Row matrix

1 × n

Only one row, like a price list [5 50].

Square matrix

m = n

As many rows as columns. Only square matrices have a main diagonal.

Diagonal matrix

aij = 0 when i ≠ j

Square, and everything off the main diagonal is 0.

Scalar matrix

diagonal, all equal to k

A diagonal matrix whose diagonal entries are all the same number k. It acts like the ordinary number k.

Identity matrix I

scalar with k = 1

1s on the diagonal, 0s elsewhere. It works like the number 1: AI = IA = A.

Zero matrix O

every entry 0

Any shape. It works like the number 0: A + O = A.

Type detectorPick a size, try a preset, or type your own numbers. The detector tests every definition and explains each verdict. The main diagonal is shaded when the matrix is square.
Notice

Every identity matrix is a scalar matrix, and every scalar matrix is a diagonal matrix, and every diagonal matrix is square. The names get more demanding, like nested boxes. A 1 × 1 matrix such as [4] is all of column, row, square, diagonal and scalar at once.

Part 3 · Section 3.3.1

Equal means same shape and same entries, everywhere.

Two matrices are equal only when they have the same shape and the same number in every place.

Two conditions
aij = bij  for all i and j

A = B only when (i) they have the same order and (ii) every pair of corresponding entries is equal.

Hidden equations
3 × 3 equation → 9 equations

So one matrix equation between two 3 × 3 matrices secretly contains nine ordinary equations, one for each position.

Equal

[2 3; 0 1] = [2 3; 0 1]

Same order (2 × 2) and every position agrees.

Not equal

[3 2; 0 1] ≠ [2 3; 0 1]

Same numbers, but 3 and 2 have swapped places. Position matters.

Example 4

Find a, b, c, x, y, z when [x + 3 z + 4 2y − 7; −6 a − 1 0; b − 3 −21 0] = [0 6 3y − 2; −6 −3 2c + 2; 2b + 4 −21 0].

  1. Match positions: x + 3 = 0, z + 4 = 6, 2y − 7 = 3y − 2.
  2. a − 1 = −3, 0 = 2c + 2, b − 3 = 2b + 4.
a = −2, b = −7, c = −1, x = −3, y = −5, z = 2.
Example 5

Find a, b, c, d from [2a + b a − 2b; 5c − d 4c + 3d] = [4 −3; 11 24].

  1. 2a + b = 4 and a − 2b = −3 give a = 1, b = 2.
  2. 5c − d = 11 and 4c + 3d = 24 give c = 3, d = 4.
a = 1, b = 2, c = 3, d = 4.
Part 4 · Sections 3.4.1–3.4.4

Add partners, scale everyone.

To add two matrices, add the numbers that sit in the same place. To scale one, multiply every number by the same amount.

Add partners
A + B = [aij + bij]

Fatima has two factories, A and B, each making boys’ and girls’ shoes in three price categories. The total in each category adds the numbers in the same place. Defined only for matrices of the same order.

Scale everyone
kA = [k · aij]

If factory A doubles its output, every entry doubles. That is a scalar multiple.

Subtracting
−A = (−1)A
A − B = A + (−1)B

Taking away B is adding its negative.

Fatima’s factoriesEach bar is one entry of the matrix. Blue is factory A (times k), orange is factory B. Change k, or switch to subtraction, and watch every entry change at once.
Result matrix (rows = categories 1, 2, 3; columns = boys, girls)

Commutative

A + B = B + A

Each entry is aij + bij = bij + aij, because numbers commute.

Associative

(A + B) + C = A + (B + C)

Brackets can move, entry by entry.

Additive identity

A + O = A

The zero matrix of the same order changes nothing.

Additive inverse

A + (−A) = O

−A undoes A.

Scalar laws

k(A + B) = kA + kB

and (k + l)A = kA + lA. Scaling spreads over addition.

Example 6

A = [√3 1 −1; 2 3 0], B = [2 √5 1; −2 3 ½]. Find A + B.

  1. Same order 2 × 3, so add partners.
  2. √3 + 2, 1 + √5, −1 + 1; 2 − 2, 3 + 3, 0 + ½.
A + B = [2 + √3 1 + √5 0; 0 6 ½].
Example 7

A = [1 2 3; 2 3 1], B = [3 −1 3; −1 0 2]. Find 2A − B.

  1. 2A = [2 4 6; 4 6 2], −B = [−3 1 −3; 1 0 −2].
  2. Add them.
2A − B = [−1 5 3; 5 6 0].
Example 8

A = [8 0; 4 −2; 3 6], B = [2 −2; 4 2; −5 1]. Find X with 2A + 3X = 5B.

  1. 3X = 5B − 2A, so X = ⅓(5B − 2A).
  2. 5B − 2A = [−6 −10; 12 14; −31 −7].
X = [−2 −10/3; 4 14/3; −31/3 −7/3].
Example 9

X + Y = [5 2; 0 9], X − Y = [3 6; 0 −1]. Find X and Y.

  1. Add: 2X = [8 8; 0 8].
  2. Subtract: 2Y = [2 −4; 0 10].
X = [4 4; 0 4], Y = [1 −2; 0 5].
Example 10

2[x 5; 7 y − 3] + [3 −4; 1 2] = [7 6; 15 14]. Find x, y.

  1. Left side = [2x + 3 6; 15 2y − 4].
  2. 2x + 3 = 7 and 2y − 4 = 14.
x = 2, y = 9.
Example 11

Two farmers’ September (A) and October (B) rice sales. Find the combined sales, the decrease, and the 2% profit on October sales.

  1. Combined = A + B; decrease = A − B.
  2. Profit = 0.02 × B.
Profits: Ramkishan ₹100, ₹200, ₹120; Gurcharan Singh ₹400, ₹200, ₹200.
Part 5 · Section 3.4.5

Multiply: every row meets every column.

To multiply matrices, every row meets every column. Multiply matching items and add, just like working out a shopping bill.

One bill
25 550
= 2 · 5 + 5 · 50 = 260

Meera buys 2 pens and 5 story books. Pens cost ₹5 and books ₹50, so she pays ₹260. Her bill is a row of quantities times the column of prices.

All the bills
25810 545040
= 260208540432

Nadeem buys 8 pens and 10 books: 8 · 5 + 10 · 50 = ₹540. A second shop (₹4 and ₹40) adds a second price column, and all four bills form one matrix.

The size rule
(m × n)(n × p) → m × p

If A is m × n and B is n × p, then AB is m × p. The columns of A must match the rows of B.

Each entry
cik = ai1b1k + ai2b2k
+ … + ainbnk

The (i, k) entry of AB: row i of A meets column k of B.

The shop bill machineChange the prices in the two shops. Tap any bill to see which row and which column make it.
The tapped bill
Tap a bill in the picture
The domino ruleA matrix of order m × n is a domino [m | n]. Two dominoes can be multiplied only if the touching halves match. The answer keeps the outside halves.
Three surprises

1. AB can exist while BA does not. A 2 × 3 times a 3 × 3 is fine, but 3 × 3 times 2 × 3 is not.

2. Even when both exist, AB ≠ BA in general. Order matters, like "put on socks, then shoes". (Diagonal matrices of the same order are an exception: they always commute.)

3. AB = O does not force A = O or B = O. [0 −1; 0 2][3 5; 0 0] = O, though neither factor is zero.

Example 12

A = [6 9; 2 3], B = [2 6 0; 7 9 8]. Find AB.

  1. (2 × 2)(2 × 3) → 2 × 3.
  2. Row 1: 6·2 + 9·7 = 75, 6·6 + 9·9 = 117, 6·0 + 9·8 = 72.
  3. Row 2: 25, 39, 24.
AB = [75 117 72; 25 39 24].
Example 13

A = [1 −2 3; −4 2 5], B = [2 3; 4 5; 2 1]. Find AB and BA.

  1. AB is 2 × 2, BA is 3 × 3.
AB = [0 −4; 10 3], BA = [−10 2 21; −16 2 37; −2 −2 11]: not equal.
Example 14

A = [1 0; 0 −1], B = [0 1; 1 0]. Show AB ≠ BA.

  1. AB = [0 1; −1 0], BA = [0 −1; 1 0].
Same size, still AB ≠ BA.
Example 15

A = [0 −1; 0 2], B = [3 5; 0 0]. Find AB.

  1. Every row of A meets a column of B with zeros in the right places.
AB = O, though A ≠ O and B ≠ O.
Part 6 · Section 3.4.6

What still works, and what does not.

Matrix multiplication keeps most of the rules of ordinary multiplication, except that you may never swap the order of the factors.

Associative

(AB)C = A(BC)

Brackets can move. So ABC has one meaning.

Distributive

A(B + C) = AB + AC

and (A + B)C = AC + BC, keeping each matrix on its own side.

Identity

IA = AI = A

For every square matrix A, the identity of the same order changes nothing.

Not commutative

AB ≠ BA in general

Always keep the order you were given.

Example 16

Show (AB)C = A(BC) for A (3 × 3), B (3 × 2), C (2 × 4).

  1. AB = [2 1; −1 18; 1 15], then (AB)C.
  2. BC = [7 2 −3 −1; 4 0 −4 2; 7 −2 −11 8], then A(BC).
Both equal [4 4 4 −7; 35 −2 −39 22; 31 2 −27 11].
Example 17

Verify (A + B)C = AC + BC for the given 3 × 3 matrices and C = [2; −2; 3].

  1. AC = [9; 12; 30], BC = [1; 8; −2].
  2. (A + B)C = [10; 20; 28].
(A + B)C = AC + BC.
Example 18

A = [1 2 3; 3 −2 1; 4 2 1]. Show A³ − 23A − 40I = O.

  1. A² = [19 4 8; 1 12 8; 14 6 15].
  2. A³ = [63 46 69; 69 −6 23; 92 46 63].
A³ − 23A − 40I = O.
Example 19

Cost per contact 40, 100, 50 paise; contacts in cities X and Y: [1000 500 5000; 3000 1000 10,000]. Total spent?

  1. Multiply contacts by cost column.
₹3400 in X and ₹7200 in Y.
Part 7 · Section 3.5

Transpose: read the table sideways.

The transpose swaps rows and columns. Picture every entry flying across the main diagonal to its mirror position.

The flip
123456′ = 142536

The transpose A′ (or AT) of an m × n matrix is the n × m matrix you get by swapping rows and columns: row 1 of A becomes column 1 of A′.

Entry by entry
a′ij = aji

The entry in row i, column j of A′ is the entry in row j, column i of A.

Flip labChoose a matrix and press Flip. Each number flies from (i, j) to (j, i). Diagonal entries (purple) stay put.
Order

(i)

(A′)′ = A

Flip twice and you are back.

(ii)

(kA)′ = kA′

Scaling and flipping can be done in either order.

(iii)

(A + B)′ = A′ + B′

Flip the sum, or add the flips.

(iv)

(AB)′ = B′A′

The order reverses, like taking off socks and shoes.

Example 20

A = [3 √3 2; 4 2 0], B = [2 −1 2; 1 2 4]. Verify (A′)′ = A, (A + B)′ = A′ + B′, (kB)′ = kB′.

  1. A′ = [3 4; √3 2; 2 0], and flipping again returns A.
  2. A + B = [5 √3 − 1 4; 5 4 4]; its transpose equals A′ + B′.
All three rules hold.
Example 21

A = [−2; 4; 5], B = [1 3 −6]. Verify (AB)′ = B′A′.

  1. AB = [−2 −6 12; 4 12 −24; 5 15 −30].
  2. B′A′ = [−2 4 5; −6 12 15; 12 −24 −30] = (AB)′.
(AB)′ = B′A′.
Part 8 · Section 3.6

Mirror matrices and anti-mirror matrices.

A symmetric matrix looks the same in the diagonal mirror. A skew symmetric matrix turns into its own negative.

Symmetric
A′ = A
aij = aji

A square matrix is symmetric if it equals its transpose. Think of a distance chart between towns.

Skew symmetric
A′ = −A
aji = −aij

A square matrix is skew symmetric if its transpose is its negative. Think of a goal-difference table.

Zero diagonal
aii = −aii  ⇒  aii = 0

Put i = j in the skew rule: every diagonal entry of a skew symmetric matrix is 0. Goal difference against yourself is 0.

Theorem 1

A + A′ is symmetric, A − A′ is skew symmetric

(A + A′)′ = A′ + A = A + A′, and (A − A′)′ = A′ − A = −(A − A′).

Theorem 2

A = ½(A + A′) + ½(A − A′)

Every square matrix is a symmetric part plus a skew symmetric part.

Split labType any 3 × 3 matrix. P = ½(A + A′) is its symmetric part and Q = ½(A − A′) its skew symmetric part. Matching colours show mirror pairs.
Example 22

Express B = [2 −2 −4; −1 3 4; 1 −2 −3] as symmetric + skew symmetric.

  1. P = ½(B + B′) = [2 −3/2 −3/2; −3/2 3 1; −3/2 1 −3].
  2. Q = ½(B − B′) = [0 −1/2 −5/2; 1/2 0 3; 5/2 −3 0].
B = P + Q.
Example 24

A, B symmetric of the same order. Show AB is symmetric if and only if AB = BA.

  1. (AB)′ = B′A′ = BA.
  2. So (AB)′ = AB exactly when BA = AB.
AB symmetric ⇔ AB = BA.
Part 9 · Section 3.7

An inverse is an undo button.

An inverse undoes what a matrix does. It is the matrix version of the inverse functions in Chapter 1.

The idea
AB = BA = I

If A is square of order m and a square matrix B of the same order gives AB = BA = I, then B is the inverse of A, written A−1, and A is invertible.

An example
2312 2−3−12 = 1001

These two multiply to I in both orders. Only square matrices can have inverses, because AB and BA must both exist and be the same size.

Only one
B = BI = B(AC) = (BA)C
= IC = C

An inverse, if it exists, is unique (Theorem 3): if B and C both work, they are the same matrix.

Undo in reverse
(AB)−1 = B−1A−1

Theorem 4: to undo “A after B”, first undo A, then undo B.

Undo labA 2 × 2 matrix moves every point of the plane. Apply A to the flag, then apply A⁻¹ and watch it come home. One matrix squashes the plane flat, and nothing can undo that.
A and its inverse

How to find an inverse in general is the subject of the next chapter (Determinants). For a 2 × 2 matrix [a b; c d], the inverse exists exactly when ad − bc ≠ 0.

Miscellaneous examples

Three ideas that tie it together.

Example 23

If A = [cos θ sin θ; −sin θ cos θ], prove Aⁿ = [cos nθ sin nθ; −sin nθ cos nθ].

  1. A turns every arrow clockwise by θ.
  2. Induction: true for n = 1; if true for k, then A·Aᵏ uses cos(θ + kθ) and sin(θ + kθ).
Aⁿ turns by nθ.
Example 25

A = [2 −1; 3 4], B = [5 2; 7 4], C = [2 5; 3 8]. Find D with CD − AB = O.

  1. AB = [3 0; 43 22]; D = [a b; c d].
  2. 2a + 5c = 3, 3a + 8c = 43, 2b + 5d = 0, 3b + 8d = 22.
D = [−191 −110; 77 44].
Self-check

The eleven multiple-choice questions.

Every multiple-choice question from the exercises, in one place. Tap an option to check it and see the reasoning.

The questions come from Exercises 3.1–3.4 and the miscellaneous exercise.

Score0 / 1111 left to answer
Summary

Remember this.

A matrix is an ordered rectangular array. Order m × n = m rows, n columns; aij sits in row i, column j.

Column (m × 1), row (1 × n), square (m = n); diagonal, scalar and identity are square with patterns on the diagonal; O is all zeros.

Equal: same order and aij = bij everywhere. Add and scale entry by entry; A − B = A + (−1)B.

AB needs (columns of A) = (rows of B); cik = Σ aijbjk. Associative and distributive, but not commutative, and AB = O is possible with A, B ≠ O.

Transpose swaps rows and columns: (A′)′ = A, (kA)′ = kA′, (A + B)′ = A′ + B′, (AB)′ = B′A′.

Symmetric A′ = A; skew symmetric A′ = −A (zero diagonal). Every square matrix = ½(A + A′) + ½(A − A′).

Inverse: AB = BA = I. Only square matrices can have one, it is unique, and (AB)−1 = B−1A−1.

Finished Chapter 3? Hear when the next one is ready

Leave your email and we will write when a new chapter or a new set of worked solutions is ready. That is all we use it for, and you can ask to be taken off the list at any time.

You are on the list. We will email you when new chapters are added, and for nothing else.