Salick Academy

Vectors and Matrices II

No calculator

Module 2 was arithmetic. This one is about what vectors and matrices are actually for: proving geometrical facts, and undoing operations.

Vector geometry

Set up two base vectors — usually OA=a\overrightarrow{OA} = \mathbf{a} and OB=b\overrightarrow{OB} = \mathbf{b} — and write every other vector in terms of them.

The rule for travelling between points never changes:

AB=ba\overrightarrow{AB} = \mathbf{b} - \mathbf{a}

Midpoints. If MM is the midpoint of ABAB, go to AA first, then half way along ABAB:

OM=a+12(ba)=a+12b12a=12(a+b)\overrightarrow{OM} = \mathbf{a} + \tfrac12(\mathbf{b} - \mathbf{a}) = \mathbf{a} + \tfrac12\mathbf{b} - \tfrac12\mathbf{a} = \tfrac12(\mathbf{a} + \mathbf{b})

A tidy result worth knowing: the position vector of a midpoint is the average of the two position vectors.

Ratios. If PP divides ABAB in the ratio 1:21:2, then PP is one third of the way along:

OP=a+13(ba)=23a+13b\overrightarrow{OP} = \mathbf{a} + \tfrac13(\mathbf{b} - \mathbf{a}) = \tfrac23\mathbf{a} + \tfrac13\mathbf{b}

Parallel lines. Two vectors are parallel when one is a scalar multiple of the other. If PQ=3a+6b\overrightarrow{PQ} = 3\mathbf{a} + 6\mathbf{b} and RS=a+2b\overrightarrow{RS} = \mathbf{a} + 2\mathbf{b}, then PQ=3RS\overrightarrow{PQ} = 3\overrightarrow{RS}, so PQPQ is parallel to RSRS and three times as long.

Collinear points

Three points are collinear when they lie on one straight line. To prove it, show two vectors joining them are parallel and share a common point.

Show that A(1,2)A(1,2), B(3,5)B(3,5) and C(7,11)C(7,11) are collinear.

AB=(35)(12)=(23)\overrightarrow{AB} = \begin{pmatrix} 3 \\ 5 \end{pmatrix} - \begin{pmatrix} 1 \\ 2 \end{pmatrix} = \begin{pmatrix} 2 \\ 3 \end{pmatrix}

BC=(711)(35)=(46)=2(23)=2AB\overrightarrow{BC} = \begin{pmatrix} 7 \\ 11 \end{pmatrix} - \begin{pmatrix} 3 \\ 5 \end{pmatrix} = \begin{pmatrix} 4 \\ 6 \end{pmatrix} = 2\begin{pmatrix} 2 \\ 3 \end{pmatrix} = 2\overrightarrow{AB}

So BC\overrightarrow{BC} is parallel to AB\overrightarrow{AB}, and both pass through BB. Therefore AA, BB and CC lie on the same straight line.

The determinant

For a 2×22 \times 2 matrix,

A=(abcd)detA=adbcA = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \qquad \det A = ad - bc

Multiply the leading diagonal, multiply the other diagonal, subtract.

det(3152)=(3)(2)(1)(5)=65=1\det\begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix} = (3)(2) - (1)(5) = 6 - 5 = 1

det(4235)=206=14\det\begin{pmatrix} 4 & 2 \\ 3 & 5 \end{pmatrix} = 20 - 6 = 14

When the determinant is zero the matrix is singular and has no inverse:

det(2412)=44=0\det\begin{pmatrix} 2 & 4 \\ 1 & 2 \end{pmatrix} = 4 - 4 = 0

The inverse of a 2 × 2 matrix

A1=1adbc(dbca)A^{-1} = \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

Swap the leading diagonal, change the sign of the other two, divide by the determinant.

Find the inverse of (3152)\begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}.

The determinant is 1, so

A1=(2153)A^{-1} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}

Check by multiplying:

(3152)(2153)=(653+310105+6)=(1001) \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}\begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix} = \begin{pmatrix} 6-5 & -3+3 \\ 10-10 & -5+6 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \ \checkmark

That last matrix is the identity, II — the matrix equivalent of the number 1, and the definition of an inverse is AA1=IAA^{-1} = I.

Another: (4235)\begin{pmatrix} 4 & 2 \\ 3 & 5 \end{pmatrix}, with determinant 14:

A1=114(5234)A^{-1} = \frac{1}{14}\begin{pmatrix} 5 & -2 \\ -3 & 4 \end{pmatrix}

Solving equations with matrices

Any pair of simultaneous linear equations can be written as one matrix equation.

3x+y=115x+2y=183x + y = 11 \qquad 5x + 2y = 18

becomes

(3152)(xy)=(1118)\begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 11 \\ 18 \end{pmatrix}

In the form Ax=bA\mathbf{x} = \mathbf{b}, multiply both sides by A1A^{-1} on the left:

(xy)=A1b=(2153)(1118)\begin{pmatrix} x \\ y \end{pmatrix} = A^{-1}\mathbf{b} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}\begin{pmatrix} 11 \\ 18 \end{pmatrix}

=(221855+54)=(41)= \begin{pmatrix} 22 - 18 \\ -55 + 54 \end{pmatrix} = \begin{pmatrix} 4 \\ -1 \end{pmatrix}

So x=4x = 4 and y=1y = -1. Check: 3(4)+(1)=113(4) + (-1) = 11 ✓ and 5(4)+2(1)=185(4) + 2(-1) = 18

Matrix transformations

A 2×22 \times 2 matrix acting on a position vector transforms the point. These are the ones to know, all centred on the origin:

Transformation Matrix
Reflection in the xx-axis (1001)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}
Reflection in the yy-axis (1001)\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}
Reflection in y=xy = x (0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}
Rotation 90°90° anticlockwise (0110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}
Rotation 180°180° (1001)\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}
Enlargement, scale factor kk (k00k)\begin{pmatrix} k & 0 \\ 0 & k \end{pmatrix}

Rotate (2,3)(2,3) through 90°90° anticlockwise about the origin.

(0110)(23)=((0)(2)+(1)(3)(1)(2)+(0)(3))=(32)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 2 \\ 3 \end{pmatrix} = \begin{pmatrix} (0)(2) + (-1)(3) \\ (1)(2) + (0)(3) \end{pmatrix} = \begin{pmatrix} -3 \\ 2 \end{pmatrix}

Matching the rule from Module 2: (x,y)(y,x)(x,y) \mapsto (-y, x)