Vectors

A vector is a mathematical object with both magnitude and direction. They can be used to represent real-world data, such as force or velocity, but are often useful as purely abstract tools.

“Position vectors” are often used to denote positions on a graph; these vectors start at the origin and point at a specific location in space.

Basis Vectors

In the 2D plane, there are two basis vectors - $\hat \imath = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$ and $\hat \jmath = \begin{bmatrix} 0 \\ 1 \end{bmatrix}$. Any vector can be written as a linear combination of these two:

$$ \vec{v} = \begin{bmatrix} a \\ b \end{bmatrix} = a \hat \imath + b \hat \jmath $$

But we could choose different basis vectors, e.g. $\vec{v}$ and $\vec{w}$.

Span

The span of basis vectors is the set of all linear combinations that can be formed from the two.

The $span(\vec{v_1}, \vec{v_2}, \vec{v_3})$ is the set of all vectors $\vec{x} = (x, y, z) \in \mathbb{R}^3$ (vectors where the $x$, $y$ and $z$ coordinates are part of the reals) such that $\vec{x} = c_1\vec{v_1} + c_2\vec{v_2} + c_3\vec{v_3}$.

Matrices

Linear Transformations

Linear transformations take a vector $\vec{v}$ and output another vector. In linear transformations, the grid lines remain straight and evenly spaced.

The beauty is that all we need to know to work out the output vector is the new position of the basis vectors. For example:

$$ \vec{v} = \begin{bmatrix} -1 \\ 2 \end{bmatrix} = -1 \hat \imath + 2 \hat \jmath $$

If we know that, after the transformation,

$$ \hat \imath = \begin{bmatrix} 1 \\ -2 \end{bmatrix}, \hat \jmath = \begin{bmatrix} 3 \\ 0 \end{bmatrix} $$

Then the transformed vector

$$ L(\vec{v}) = -1 \hat \imath + 2 \hat \jmath = -1 \begin{bmatrix} 1 \\ -2 \end{bmatrix} + 2 \begin{bmatrix} 3 \\ 0 \end{bmatrix} = \begin{bmatrix} -1 \\ 2 \end{bmatrix} + \begin{bmatrix} 6 \\ 0 \end{bmatrix} = \begin{bmatrix} 5 \\ 2 \end{bmatrix} $$