01 / 21

Matrix Transformations
of Vectors

Discover how matrix multiplication transforms vectors in the plane: rotations, reflections, scaling, and more, all through the power of linear algebra.

Precalculus

What Is a Vector?

A vector describes a quantity with both magnitude and direction. In precalculus, we write a 2D vector as a column matrix:

x y 1 2 3 1 2 3 (3, 2)

What Is a Matrix?

A matrix is a rectangular array of numbers arranged in rows and columns. For transforming 2D vectors, we use a \(2 \times 2\) matrix:

Column 1
Where \(\hat{i} = \begin{bmatrix}1\\0\end{bmatrix}\) lands: \(\begin{bmatrix}a\\c\end{bmatrix}\)
Column 2
Where \(\hat{j} = \begin{bmatrix}0\\1\end{bmatrix}\) lands: \(\begin{bmatrix}b\\d\end{bmatrix}\)

Multiplying a Matrix by a Vector

When we multiply a \(2 \times 2\) matrix by a \(2 \times 1\) vector, we produce a new \(2 \times 1\) vector: the transformed vector.

$ \color{#818cf8}{\begin{bmatrix} a & b \\ c & d \end{bmatrix}} \color{#4ade80}{\begin{bmatrix} x \\ y \end{bmatrix}} \color{#e2e8f0}{=} \color{#fbbf24}{\begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}} $

The Core Formula

The result is a linear combination of the matrix columns, weighted by the vector's components. This is the foundation of every matrix transformation.

1
Row-by-column: Multiply each row of the matrix by the column vector using dot products.
2
Top entry: \(ax + by\) comes from row 1 dotted with the vector.
3
Bottom entry: \(cx + dy\) comes from row 2 dotted with the vector.

Geometric Meaning

Matrix-vector multiplication transforms the plane. Every point moves according to the matrix's rules. The entire grid warps, but lines stay straight and the origin stays fixed.

Original
\(\hat{i}\)
\(\hat{j}\)
\(\vec{v}\)
→
\(A\vec{v}\)
Transformed
\(\hat{i}'\)
\(\hat{j}'\)
\(A\vec{v}\)

Types of Transformations

Rotation
\(\begin{bmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{bmatrix}\) rotates by angle \(\theta\)
Scaling
\(\begin{bmatrix}k_x & 0 \\ 0 & k_y\end{bmatrix}\) stretches axes independently
Reflection
\(\begin{bmatrix}1 & 0 \\ 0 & -1\end{bmatrix}\) reflects over the \(x\)-axis
Shear
\(\begin{bmatrix}1 & k \\ 0 & 1\end{bmatrix}\) tilts shapes along the \(x\)-axis

Scalar vs. Matrix Multiplication

Scalar \(\cdot\) Vector Matrix \(\cdot\) Vector
Operation \(k\vec{v}\) \(A\vec{v}\)
Effect Scales magnitude only Rotates, scales, reflects, shears
Direction Same or reversed Can change to any direction
Result size \(2 \times 1\) \(2 \times 1\)
Example \(3\begin{bmatrix}1\\2\end{bmatrix} = \begin{bmatrix}3\\6\end{bmatrix}\) \(\begin{bmatrix}0 & -1\\1 & 0\end{bmatrix}\begin{bmatrix}1\\2\end{bmatrix} = \begin{bmatrix}-2\\1\end{bmatrix}\)

How to Compute \(A\vec{v}\)

1
Check dimensions: Confirm the matrix is \(m \times n\) and the vector is \(n \times 1\). The number of matrix columns must match the vector's rows.
2
Row 1 dot product: Multiply each entry in row 1 by the corresponding vector entry, then add: \(a \cdot x + b \cdot y\).
3
Row 2 dot product: Repeat for row 2: \(c \cdot x + d \cdot y\).
4
Stack results: Place the two results in a column vector: \(\begin{bmatrix}ax+by \\ cx+dy\end{bmatrix}\).
5
Interpret geometrically: Plot both the original and result vectors to visualize the transformation.

Example 1: Basic Multiplication

Compute the product:

1
Row 1: \(2 \cdot 5 + 1 \cdot (-1) = 10 - 1 = \) 9
2
Row 2: \(3 \cdot 5 + 4 \cdot (-1) = 15 - 4 = \) 11
3
Result: \(\begin{bmatrix}2 & 1 \\ 3 & 4\end{bmatrix}\begin{bmatrix}5 \\ -1\end{bmatrix} = \begin{bmatrix}9 \\ 11\end{bmatrix}\)

Example 2: \(90^\circ\) Rotation

The matrix for a \(90^\circ\) counterclockwise rotation is \(\begin{bmatrix}0 & -1 \\ 1 & 0\end{bmatrix}\). Apply it to \(\vec{v} = \begin{bmatrix}3 \\ 1\end{bmatrix}\):

1 2 3 -1 1 2 3 x y
\((3, 1)\)
\((-1, 3)\)
\(90^\circ\)

Example 3: Reflection over the \(x\)-axis

Reflect \(\vec{v} = \begin{bmatrix}2\\3\end{bmatrix}\) over the \(x\)-axis using the matrix \(\begin{bmatrix}1 & 0 \\ 0 & -1\end{bmatrix}\):

1 2 3 1 2 3 -1 -2 x y mirror
\((2, 3)\)
\((2, -3)\)

Dimension Compatibility

Matrix-vector multiplication only works when the inner dimensions match. The result inherits the outer dimensions:

\(m \times n\)
·
\(n \times 1\)
=
\(m \times 1\)
must match
✓ Valid
\(2\times 2\) matrix times \(2\times 1\) vector gives a \(2\times 1\) vector
✓ Valid
\(3\times 2\) matrix times \(2\times 1\) vector gives a \(3\times 1\) vector
✕ Invalid
\(2\times 2\) matrix times \(3\times 1\) vector: columns \(\neq\) rows

Special Matrices: Identity and Zero

Identity Matrix \(I\)
\(\begin{bmatrix}1 & 0\\0 & 1\end{bmatrix}\vec{v} = \vec{v}\)
Leaves every vector unchanged: the "do nothing" transformation.
Zero Matrix \(O\)
\(\begin{bmatrix}0 & 0\\0 & 0\end{bmatrix}\vec{v} = \vec{0}\)
Collapses every vector to the origin: all information is lost.

Common Mistakes

✕ Wrong Order
Writing \(\vec{v} A\) instead of \(A\vec{v}\). Matrix multiplication is not commutative: the matrix goes on the left.
✕ Adding Instead of Multiplying
Computing \(a + x\) instead of \(a \cdot x\). Each entry uses multiplication then addition (dot product), not element-wise addition.
✕ Ignoring Dimensions
Trying to multiply a \(2 \times 2\) matrix by a \(3 \times 1\) vector. Always check that columns = rows before computing.

Summary of Matrix Transformations

Transformation Matrix Effect on \(\begin{bmatrix}1\\0\end{bmatrix}\)
Identity \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\) \(\begin{bmatrix}1\\0\end{bmatrix}\)
\(90^\circ\) Rotation \(\begin{bmatrix}0&-1\\1&0\end{bmatrix}\) \(\begin{bmatrix}0\\1\end{bmatrix}\)
Reflect over \(x\)-axis \(\begin{bmatrix}1&0\\0&-1\end{bmatrix}\) \(\begin{bmatrix}1\\0\end{bmatrix}\)
Scale by 2 \(\begin{bmatrix}2&0\\0&2\end{bmatrix}\) \(\begin{bmatrix}2\\0\end{bmatrix}\)
Shear (\(k=1\)) \(\begin{bmatrix}1&1\\0&1\end{bmatrix}\) \(\begin{bmatrix}1\\0\end{bmatrix}\)

Question 1 of 5

What is the result of \(\begin{bmatrix}3 & 0 \\ 0 & 2\end{bmatrix}\begin{bmatrix}4\\-5\end{bmatrix}\)?

Question 2 of 5

Which matrix represents a \(90^\circ\) counterclockwise rotation?

Question 3 of 5

A \(3 \times 2\) matrix multiplied by a \(2 \times 1\) vector produces a vector of what size?

Question 4 of 5

What does the identity matrix \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\) do to any vector \(\vec{v}\)?

Question 5 of 5

Compute \(\begin{bmatrix}1 & 2\\3 & 4\end{bmatrix}\begin{bmatrix}1\\1\end{bmatrix}\):