From a table to a matrix

Amy, Bob, Charlie and Dan go to the bakery. Write down how many of each item they buy and you have a table. Strip away the words and the grid of numbers that is left is a matrix – a rectangular array of elements. A matrix with rows and columns is an matrix (rows first, then columns). Edit any cell, name or heading, or add people and items below.

people (rows) 2 items (columns) 3
The bakery table
The same thing as a matrix
Special & common matrices
Common matrices
1×12×23×3
Zero all 0s
Identity 1s on diagonal

Zero matrix : every element 0, and .

Identity matrix : 1s down the leading diagonal, 0 elsewhere. It is the “1” of matrices – . See this proved for any matrix on the Multiply tab.

Special shapes
If…it is calledexample
a square matrix
1 columna column matrix (vector)
1 rowa row matrix
Matrices and simultaneous equations

Back at the bakery: suppose an eclair costs pence and a flapjack costs pence. Amy buys 2 eclairs and 1 flapjack for 80p; Bob buys 4 eclairs and 3 flapjacks for 180p. That is a pair of simultaneous equations:

As one matrix equation:

The coefficients (the 2, 1, 4, 3) sit in matrix , the unknown prices in a column, the totals in another column. If has an inverse you can solve the whole system at once with – see the determinant & inverse tab.

Add, subtract and scalar multiply

You can only add or subtract matrices of the same size – just combine matching elements. A scalar multiplies every element. Below, two bakery tables (say two different weeks) give matrices and . Edit the numbers, names or headings; turn on scalars to put a multiplier in front of each matrix. Everything updates live.

people (rows) 2 items (columns) 3
→ matrix A
→ matrix B
operation:
Method – one element at a time
What do “commutative” and “associative” mean?

Commutative means the order does not matter: . Associative means the grouping does not matter: .

Matrix addition is both, because underneath it is just ordinary addition done element by element. For example

(Multiplication is a different story – order usually does matter; see the Multiply tab.)

Generalisation

Take and . Then

because each entry is a sum of two ordinary numbers, and and so on. The same element-by-element argument gives associativity.

Multiplying matrices – how much would they spend in each shop?

Amy and Bob's purchases form matrix (people × items). Each shop's prices form matrix (items × shops). The product tells you how much each person spends in each shop. Each entry is a row of paired with a column of .

people 2 items 3 shops 2
Purchases – people × items
Prices – items × shops (pence)

Click a cell in the answer to see exactly which row and column built it.

P
×
C
=
spend per person, per shop
Method – how to multiply

1Check the sizes line up: the number of columns of must equal the number of rows of (here, the items).

2Set up the answer: one row per row of , one column per column of (people × shops).

3Fill each entry: for row , column , slide along row of and down column of , multiply matching numbers, and add them.

4Repeat for every entry. Click any answer cell above to watch this happen.

The size of the output matrix?
Is matrix multiplication commutative? (does order matter?)

Commutative would mean the order makes no difference: for every pair. Matrix multiplication is not commutative – usually , and sometimes is not even a valid size.

An example where it fails:

Same two matrices, opposite order, different answer. This is why, for transformations, the matrix you apply first is written on the right.

Generalisation

With and :

Compare just the top-left entries: against . There is no reason those should be equal, so in general .

Multiplying by the identity matrix

The identity is the “1” of matrices: multiplying by it changes nothing, . With numbers,

And the algebra, for a general :

The 1s pick out each element and the 0s delete the rest. This is exactly why the inverse is defined by .

Determinant and inverse of a 2×2

How do we reach the identity? Deriving the inverse

The inverse is whatever matrix turns into the identity. Write the unknown inverse as and demand

1Multiplying out gives four equations – two for the first column of the answer, two for the second:

2Eliminate to find and (take the first minus the second):

3The same elimination on the right pair gives

4Collect the four entries. Writing for the shared denominator,

So: swap the diagonal, negate the other two, divide by . If that denominator is 0 you cannot divide – there is no inverse.

What if the determinant is zero?

If the matrix is singular and has no inverse. Geometrically it squashes the whole plane onto a line (area scale factor 0), so the move cannot be undone – see Matrix Transformations.

2×2 calculator

Type your own numbers; the determinant, inverse and the check update live.

Matrix A

Next: the same idea for a 3×3 matrix, using minors and cofactors.

Determinant and inverse of a 3×3

Same plan as the 2×2: find the determinant, build a matrix of signed minors (cofactors), transpose it, then divide by the determinant.

Matrix A – edit any number
Step 1 – calculate the determinant

Expand along the top row: each top entry times the 2×2 minor left when you cross out its row and column, with the signs.

Step 2 – minors

A minor is the determinant of the 2×2 matrix left when you cross out one row and one column. Click an element of A to cross out its row and column and see the minor that remains highlighted.

Matrix A – click an element

Matrix of minors (every minor worked out)

Step 3 – cofactors (attach the + − + signs)

A cofactor is a minor with a sign attached, sign , which gives this checkerboard grid:

+++++
cofactor matrix C

check each one (sign × minor)

Step 4 – transpose to the adjugate

A transpose reflects a matrix in its leading diagonal: rows become columns, so the entry in row , column moves to row , column . Transposing the cofactor matrix gives the adjugate:

Step 5 – divide by the determinant

Finally : divide every entry of the adjugate by the determinant from Step 1.

Solving two simultaneous equations

Two linear equations are really one matrix equation . If has an inverse, then solves both at once – the inverse undoes . Edit the numbers; the matrix form, determinant, inverse, solution and graph update live.

x +y = x +y =

Blue = equation 1, red = equation 2. The green dot is the solution (where they cross).

What if there is no single answer?

One solution (): the lines cross once. has an inverse, so .

No solution (, lines parallel and different): they never meet.

Infinitely many (, same line): every point on the line works. In both cases is singular and has no inverse, which is why the matrix method stops.

Three planes – solving 3 equations

Three linear equations in form one matrix equation , and each equation is a plane. If the planes meet at a single point and . If they either share a line/plane (infinitely many) or never all meet (none).

x +y +z = x +y +z = x +y +z =

The highlighted card shows how the three planes sit. means is singular, so there is no single inverse to solve with.

The three cases (geometry)

Single point (): the planes meet at one point; .

A common line - infinitely many (, consistent): the planes pass through one shared line (a sheaf), so the solution is that whole line. If all three equations are the same plane, the solution is a whole plane.

No common point - no solution (, inconsistent): the planes enclose a gap (a triangular prism) or are parallel and distinct, so nothing satisfies all three.

Doing all of this on a calculator

Every skill on the other tabs can be done on a Casio. Here are the key sequences for the two common UK models – the ClassWiz (fx-991CW / fx-991EX) and the CG-series graphical (fx-CG100 / fx-CG50). The exact menu wording shifts a little between models and firmware, but the flow is always the same: define the matrices first, then build the calculation.

Casio ClassWiz (fx-991CW / fx-991EX)

1. Get into Matrix mode and define a matrix

To do thisPress
Open the modeHOME (or MENU) → Matrix
Define a matrixOPTNDefine MatrixMatA, choose rows × columns, type each entry then =
Define a second onerepeat the step above for MatB

2. Build the calculation – press OPTN to drop MatA / MatB into the line, then =

SkillEnter
Add / subtract   or  
Scalar multiply
Multiply
DeterminantOPTNDeterminant → MatA
InverseMatA, then the key
TransposeOPTNTranspose → MatA

Answer shown as a decimal? Press FORMAT / S⇔D to switch to an exact fraction.

Casio CG-series graphical (fx-CG100 / fx-CG50)

1. Define a matrix

To do thisPress
Open the modeMain menu → Run-Matrix
Open the editorF3 (▸MAT/VCT)
Enter a matrixhighlight Mat A, set the dimension, EXE, type each entry then EXE; EXIT when done

2. Build the calculation – press OPTNF2 (MAT/VCT) to insert Mat and the tools, then EXE

SkillEnter
Add / subtract
Scalar multiply
Multiply
DeterminantOPTN → MAT/VCT → Det → Mat A
InverseMat A, then the key
TransposeOPTN → MAT/VCT → Trn

Press F⇔D to turn a decimal answer into an exact fraction.

Good habits

Check the size rules first: you cannot add different sizes, and to multiply the inner numbers must match. Use the calculator to check work you did by hand – if your is right then comes out as the identity. Matrices sit in Further Maths / some international specs, not GCSE.