Rows and columns

A matrix is a number grid

A is 2 × 2
Matrix sizerows first, columns second12342 rows2 columns

A matrix stores numbers in rows and columns. The size is written as rows by columns.

Detailed notes

Worked Examples

Matrix operations are mostly size rules plus careful entry-by-entry arithmetic. Multiplication is the exception: it uses rows from the first matrix and columns from the second.

Step 1: Read the matrix size

Count rows first, then columns. This matrix has 2 rows and 2 columns.

A = [1234]
size of A = 2 × 2

Step 2: Add matching entries

Addition only works when both matrices have the same size. Add each position to its matching position.

[1234] + [5678]
[1 + 52 + 63 + 74 + 8]
[681012]

Step 3: Subtract matching entries

Subtraction also needs the same size. Keep the order: first matrix minus second matrix.

[5678] - [1234]
[5 - 16 - 27 - 38 - 4]
[4444]

Step 4: Multiply rows by columns

Each answer entry comes from one row and one column. Write each product-sum on its own line so the row-column matches stay visible.

[1234] × [2012]
top left = 1×2 + 2×1 = 4
top right = 1×0 + 2×2 = 4
bottom left = 3×2 + 4×1 = 10
bottom right = 3×0 + 4×2 = 8
[44108]

Step 5: Divide by using an inverse

There is no direct matrix division. If B has an inverse, divide by B by multiplying by B inverse.

A ÷ B is not a direct operation
A ÷ B means A × B-1
AX = C, so X = A-1C

Step 6: Check whether the operation is allowed

Before calculating, check the sizes. This prevents most matrix mistakes.

add or subtract: 2 × 2 with 2 × 2
multiply: 2 × 3 with 3 × 2 gives 2 × 2
inverse: only square matrices can have B-1