Matrices & Basic Operations

Amari Cross & Matthew Williams
||8 min read
MatricesOperations

Matrix notation, addition, subtraction, scalar multiplication, and matrix multiplication.

Matrices organise numbers into rows and columns so that related calculations can be handled together. The position of each entry matters, which is why matrix operations have stricter rules than ordinary arithmetic.

In the CSEC optional Vectors and Matrices question, you may need to add, subtract, multiply, or interpret matrices. Always check dimensions first. This tells you whether the operation is allowed and what size the answer should be.

What is a Matrix?

A matrix is a rectangular array of numbers organized in rows (horizontal) and columns (vertical).

Example 2×3 Matrix (2 rows, 3 columns): A=(123456)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}

Notation: We write m×nm \times n for mm rows and nn columns.

Why Matrices?

The point of a matrix is organisation. Instead of writing many separate values, you place them in a structure where position carries meaning.

Matrices are used to organize and manipulate data:

  • Spreadsheets: Rows = records, columns = attributes
  • Image Processing: Pixel colors stored in matrices
  • Network Analysis: Connection patterns between nodes
  • Economic Models: Input-output tables

Matrix Elements

Matrix entries are named by row first, then column. This row-column order is important because reversing it points to a different position.

Elements are referred to by position: aija_{ij} means row ii, column jj

For A=(123456)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}:

  • a11=1a_{11} = 1 (row 1, column 1)
  • a12=2a_{12} = 2 (row 1, column 2)
  • a23=6a_{23} = 6 (row 2, column 3)

Special Matrix Types

Special matrices behave like familiar numbers in matrix arithmetic. The zero matrix acts like 0 for addition, and the identity matrix acts like 1 for multiplication.

Square Matrix: Same number of rows and columns

A=(1234)(2×2)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \quad (2 \times 2)

Identity Matrix II: Square matrix with 1s on diagonal, 0s elsewhere

I2=(1001),I3=(100010001)I_2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad I_3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}

Zero Matrix: All elements are 0

O=(0000)O = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}


Part 5: Matrix Addition and Subtraction

Rules

Addition and subtraction are position-by-position operations. This is why the matrices must have the same dimensions.

Can only add/subtract matrices of the same dimensions (m×nm \times n)

Addition: Add corresponding elements

(abcd)+(efgh)=(a+eb+fc+gd+h)\begin{pmatrix} a & b \\ c & d \end{pmatrix} + \begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} a+e & b+f \\ c+g & d+h \end{pmatrix}

Subtraction: Subtract corresponding elements

(abcd)(efgh)=(aebfcgdh)\begin{pmatrix} a & b \\ c & d \end{pmatrix} - \begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} a-e & b-f \\ c-g & d-h \end{pmatrix}

Examples

Example

(5324)+(1132)=(5+13+(1)2+34+2)=(6256)\begin{pmatrix} 5 & 3 \\ 2 & 4 \end{pmatrix} + \begin{pmatrix} 1 & -1 \\ 3 & 2 \end{pmatrix} = \begin{pmatrix} 5+1 & 3+(-1) \\ 2+3 & 4+2 \end{pmatrix} = \begin{pmatrix} 6 & 2 \\ 5 & 6 \end{pmatrix}

Example

(7429)(3115)=(73412195)=(4314)\begin{pmatrix} 7 & 4 \\ 2 & 9 \end{pmatrix} - \begin{pmatrix} 3 & 1 \\ 1 & 5 \end{pmatrix} = \begin{pmatrix} 7-3 & 4-1 \\ 2-1 & 9-5 \end{pmatrix} = \begin{pmatrix} 4 & 3 \\ 1 & 4 \end{pmatrix}

Remember

You can only add or subtract matrices with same dimensions. A 2×32 \times 3 matrix cannot be added to a 3×33 \times 3 matrix.


Part 6: Scalar Multiplication of Matrices

Definition

Scalar multiplication changes the size of every entry by the same factor. It does not change the dimensions of the matrix.

Multiply every element by the scalar

k(abcd)=(kakbkckd)k \begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} ka & kb \\ kc & kd \end{pmatrix}

Examples

Example

3(2145)=(631215)3 \begin{pmatrix} 2 & 1 \\ 4 & 5 \end{pmatrix} = \begin{pmatrix} 6 & 3 \\ 12 & 15 \end{pmatrix}

Example

2(3124)=(6248)-2 \begin{pmatrix} 3 & 1 \\ 2 & 4 \end{pmatrix} = \begin{pmatrix} -6 & -2 \\ -4 & -8 \end{pmatrix}

Properties

  1. Associative: (rs)A=r(sA)(rs)A = r(sA)
  2. Distributive: r(A+B)=rA+rBr(A + B) = rA + rB
  3. Distributive: (r+s)A=rA+sA(r + s)A = rA + sA

Part 7: Matrix Multiplication

Why Matrix Multiplication is Different

Matrix multiplication combines rows from the first matrix with columns from the second. Because rows and columns play different roles, changing the order can change the result.

Key Idea: Matrix multiplication is NOT element-by-element. It represents combining transformations or composing operations.

Rule: Can only multiply if: (columns of first matrix) = (rows of second matrix)

(m×n)×(n×p)=(m×p)(m \times n) \times (n \times p) = (m \times p)

How to Multiply: Step-by-Step

Work systematically across the answer matrix. Each blank entry has its own row-column calculation, so label positions if the matrix is large.

For matrices AA and BB to get product ABAB:

Each element in the product = (row of A) · (column of B)

ABij=(row i of A)(column j of B)AB_{ij} = (\text{row } i \text{ of } A) \cdot (\text{column } j \text{ of } B)

2×2 × 2×2 matrix multiplication: row · column

2×2 Matrix Multiplication Example

(1234)×(5678)=?\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \times \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} = ?

Position (1,1): (Row 1 of first) · (Column 1 of second) =1(5)+2(7)=5+14=19= 1(5) + 2(7) = 5 + 14 = 19

Position (1,2): (Row 1 of first) · (Column 2 of second) =1(6)+2(8)=6+16=22= 1(6) + 2(8) = 6 + 16 = 22

Position (2,1): (Row 2 of first) · (Column 1 of second) =3(5)+4(7)=15+28=43= 3(5) + 4(7) = 15 + 28 = 43

Position (2,2): (Row 2 of first) · (Column 2 of second) =3(6)+4(8)=18+32=50= 3(6) + 4(8) = 18 + 32 = 50

(1234)×(5678)=(19224350)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \times \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}

Remember

Matrix multiplication is NOT commutative: ABBAAB \neq BA. Order matters!

2×3 times 3×2 Example

(123456)×(789101112)=(????)\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix} \times \begin{pmatrix} 7 & 8 \\ 9 & 10 \\ 11 & 12 \end{pmatrix} = \begin{pmatrix} ? & ? \\ ? & ? \end{pmatrix}

Result is 2×2:

Position (1,1): 1(7)+2(9)+3(11)=7+18+33=581(7) + 2(9) + 3(11) = 7 + 18 + 33 = 58

Position (1,2): 1(8)+2(10)+3(12)=8+20+36=641(8) + 2(10) + 3(12) = 8 + 20 + 36 = 64

Position (2,1): 4(7)+5(9)+6(11)=28+45+66=1394(7) + 5(9) + 6(11) = 28 + 45 + 66 = 139

Position (2,2): 4(8)+5(10)+6(12)=32+50+72=1544(8) + 5(10) + 6(12) = 32 + 50 + 72 = 154

=(5864139154)= \begin{pmatrix} 58 & 64 \\ 139 & 154 \end{pmatrix}

Exam Tip

Always check dimensions first:

  • Can I multiply? (columns of first = rows of second)
  • What size is result? (rows of first × columns of second)
  • Multiply systematically (row × column for each position)

Multiplying Matrix by Column Vector

Multiplying a matrix by a column vector is how transformations act on points. The input point goes in as a vector, and the output vector gives the transformed point.

Key Use: Transform a point or apply an operation

(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}

Example

Rotation of point (1,2)(1, 2) by 90° counterclockwise uses matrix (0110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}:

(0110)(12)=(0(1)+(1)(2)1(1)+0(2))=(21)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 1 \\ 2 \end{pmatrix} = \begin{pmatrix} 0(1) + (-1)(2) \\ 1(1) + 0(2) \end{pmatrix} = \begin{pmatrix} -2 \\ 1 \end{pmatrix}

Point (1,2)(1, 2) rotated 90° becomes (2,1)(-2, 1).


Part 8: Determinants

What is a Determinant?

For a 2×22 \times 2 matrix, the determinant is a single number that tells whether the matrix can be reversed. A determinant of zero means information has collapsed and no inverse exists.

The determinant of a square matrix is a special number that:

  • Tells if a matrix is invertible
  • Represents scaling factor in transformations
  • Used in solving systems of equations

Notation: det(A)\det(A) or A|A|

2×2 Determinant

det(abcd)=adbc\det \begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc

Mnemonic: Multiply diagonal down-left, subtract diagonal down-right

det(M) = ad − bc

2×2 Determinant Examples

Example

det(3214)=3(4)2(1)=122=10\det \begin{pmatrix} 3 & 2 \\ 1 & 4 \end{pmatrix} = 3(4) - 2(1) = 12 - 2 = 10

Example

det(51024)=5(4)10(2)=2020=0\det \begin{pmatrix} 5 & 10 \\ 2 & 4 \end{pmatrix} = 5(4) - 10(2) = 20 - 20 = 0

Determinant 0 means the matrix is singular (not invertible).