Linear Transformations

Matrix-Vector Multiplication

Intuitively, vector transformations (or maps) are functions that have vectors as their input and output. Typically, matrices are used as functions on vectors. Linear algebra limits itself to the study of linear transformations, which preserve the linearity or "straightness" of the Cartesian plane. A visualization should make this clear.

For example, let us take the transformation that transforms each vector input by rotating it such that $\frac{\pi}{4}$ rad counterclockwise from the $x$-axis (We denote the transformationn by $A$.) Of course, it undesirable to represent each and every vector in the plane in a transformation, as it would get too messy. Even if we represent only the vectors that have $-4$ and $-4$ as components, it still is way too cluttered:

It is better to represent the set of a vectors as a grid where each point of intersection of grid lines represents the head of the vector. We only draw arrows for the vectors that we care about; in this case vector $\vec{B}$:

Another way to think about transformation $A$ is that instead of the vectors rotating themselves, the Cartesian plane itself rotates by$\frac{\pi}{4}$ rad, dragging the vectors along it. Either way it doesn't really matter which way you think of it.

Now, it can be seen that $\vec{B}$ has coordinates $\begin{bmatrix} 2 \\ 2\end{bmatrix}$ moves to approx. $\begin{bmatrix} 0 \\ 2.8\end{bmatrix}$. Is there a way that allows us to determine where $\vec{B}$ lands exactly?

Turns out, if we know where the two basis vectors $\hat{i}$ and $\hat{j}$ go, then we can use that information to know where any random vector goes. Since we rotated the plane $\frac{\pi}{4}$ rad counterclockwise, it makes sense that $\hat{i} = \begin{bmatrix} 1 \\ 0\end{bmatrix}$ goes to $\begin{bmatrix} \cos \frac{\pi}{4} \\ \sin \frac{\pi}{4} \end{bmatrix} = \begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix}$ and $\hat{j} = \begin{bmatrix} 0 \\ 1\end{bmatrix}$ goes to $\begin{bmatrix} \cos \frac{3\pi}{4} \\ \sin \frac{3\pi}{4} \end{bmatrix} = \begin{bmatrix} -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix}$ by trigonometry:

Notice that in the new coordinate system, the transformed versions of $\hat{i}$ and $\hat{j}$, when both scaled by a factor (or multiplied) by 2, the result corresponds by the transformed version of $\vec{B}$ as shown below: Click me to start animation

That is, $2(\text{transformed version of }\hat{i})+2(\text{transformed version of } \hat{j}) = 2\begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} + 2 \begin{bmatrix} -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix} = \begin{bmatrix} \frac{2}{\sqrt{2}} \\ \frac{2}{\sqrt{2}} \end{bmatrix} + \begin{bmatrix} -\frac{2}{\sqrt{2}} \\ \frac{2}{\sqrt{2}} \end{bmatrix} = \begin{bmatrix} 0 \\ \frac{4}{\sqrt{2}} \end{bmatrix} $. If we check, we notice that $\frac{4}{\sqrt{2}} = 2.8284... \approx 2.8$, verifying that our calculations are indeed correct.

By convention, we usually combine both $\begin{bmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix}$ and $\begin{bmatrix} -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{bmatrix}$ into a single matrix $\begin{bmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix} $, called a rotation matrix. When we write $\begin{bmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix}\begin{bmatrix} 2 \\ 2\end{bmatrix}$, we are basically finding out where did the vector $\begin{bmatrix} 2 \\ 2\end{bmatrix}$ go by where the basis vectors go, based on the rotation matrix. In general, when we write $\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} e \\ f\end{bmatrix}$, it asks us to find out where does the vector $\begin{bmatrix} e \\ f \end{bmatrix}$ go to, based on the coordinates of the transformed basis vectors $\begin{bmatrix} a \\ c\end{bmatrix}$ and $\begin{bmatrix} b\\ d \end{bmatrix}$ from the rotation matrix.

More formally, a linear map $f$ is a function $f: V \rightarrow U$ wherein $U$ and $V$ are vector spaces such that

Rotation Matrix