Why is linear algebra useful? It turns out that most things in the world are pretty linear, or can be modeled as linear systems through [clever techniques](https://chillphysicsenjoyer.substack.com/p/using-linear-algebra-to-predict-a). On top of that, computers are very good at working with data stored in matrices, the core of linear algebra. So linear algebra is a super powerful tool for understanding the world.
### Vectors
A vector is a series of numbers stacked vertically, i.e. $x = \begin{bmatrix}1 \\ 2 \\ 3\end{bmatrix}$
Taking the transpose of a vector makes it horizontal: $x^{\mathrm{T}} = \begin{bmatrix}1 & 2 & 3\end{bmatrix}$
We can multiply vectors in a few ways, including the outer product and cross product, but the most relevant is the dot product, also known as the inner product.
#### Dot product
$a\cdot b = a^{\mathrm{T}}b = \begin{bmatrix}1 & 2 & 3\end{bmatrix} \begin{bmatrix}4 \\ 5 \\ 6\end{bmatrix} = 1\cdot 4 + 2 \cdot 5 + 3 \cdot 6$
The **length** of a vector $x$ is the square root of its dot product with itself: $\lvert \lvert x \rvert \rvert = \sqrt{ x_{1}^{2}+x_{2}^{2} + \dots + x_{n}^{2} } = \sqrt{ x\cdot x }$
Additionally, if $a\cdot b=0$, then we can say the vectors are **orthogonal**, or perpendicular in each of their dimensions. We can show this works in 2D with the Pythagorean theorem: if $a$ and $b$ are perpendicular vectors the hypotenuse is $c=b-a$, then $\lvert \lvert a \rvert \rvert^{2} + \lvert \lvert b \rvert \rvert^{2} = \lvert \lvert c \rvert \rvert^{2}$. Rewriting this as $a\cdot a + b\cdot b = (b-a)\cdot(b-a) = b\cdot b -2a\cdot b + a\cdot a$, we see that the Pythagorean theorem holds only when $a\cdot b=0$.
#### Outer product:
Not even useful enough to get its own symbol but worth mentioning to illustrate vector multiplication:
$ab^{\mathrm{T}} = \begin{bmatrix}1 \\ 2 \\ 3\end{bmatrix} \begin{bmatrix}4 & 5 & 6\end{bmatrix} = \begin{bmatrix}1\cdot 4 & 1\cdot 5 & 1 \cdot 6 \\ 2\cdot 4 & 2\cdot5 & 2\cdot 6 \\ 3 \cdot 4 & 3 \cdot 5 & 3 \cdot 6 \end{bmatrix}$
#### Linear Independence
Vectors are linearly dependent (think redundant) if at least one of them is a linear combination of the others.
In other words, the vectors $v_{1}, v_{2}, \dots v_{k}$ are linearly independent when $a_{1}v_{1}+a_{2}v_{2}+\dots+a_{k}v_{k}=0$ only holds if $a_{1}= a_{2} =\dots= a_{k}=0$ .
A set of vectors which are
### Matrices
A matrix is a vector with multiple columns. The **column space** of a matrix $A$, denoted $C(A)$, is the set of all vectors which are linear combinations of the column vectors of $A$.
Multiplying vector $b$ by matrix $A$ transforms it into a vector in the column space of $A$; you scale the column vectors of $A$ by the corresponding values of $b$:
$
Ab = \begin{bmatrix}
| & | & | \\
a_{1} & a_{2} & a_{3} \\
| & | & |
\end{bmatrix} \begin{bmatrix}
1 \\
2 \\
3
\end{bmatrix} = a_{1} \cdot 1 + a_{2} \cdot 2 + a_{3} \cdot 3
$
The **null space** of $A$, denoted $N(A)$, is the set of all vectors such that $Ab =0$.
When you multiply matrix $B$ with matrix $A$, you transform each of $B