# Linear Algebra

Vector spaces are defined over a field $\mathcal{F}$, while matrix entries can be chosen from elements of commutative ring $\mathcal{K}$.

## Cayley-Hamilton theorem

$A = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}$

$\lambda = 1, 3$ are the eigenvalues, which can be determined by solving $det(A - \lambda I) = 0$.

The Cayley-Hamilton theorem states that $(A - \lambda_1 I) \ldots (A - \lambda_n I) = 0$; hence the matrix can be factorized as $\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}$ and $\begin{bmatrix} -1 & 1 \\ 1 & -1 \end{bmatrix}$

Eigenvector $\mathbb{v}$ can be obtained by solving $A \mathbb{v} = \lambda \mathbb{v}$.

## Determinant

The determinant function $D$ assigns to each $n \times n$ matrix, a scalar. It is n-linear, alternating, and $D(I) = 1$.

n-linear means: that for each $i$, $D$ is linear over the $i^{th}$ row, keeping all other rows fixed $D(\alpha_i + c\alpha_{i'}) = D(\alpha_i) + cD(\alpha_{i'})$

Alternating means:

1. If two rows in $A$ are equal, $D(A) = 0$
2. If $A'$ is the matrix we get by interchanging two rows of $A$, then $D(A') = -D(A)$

In [category-theoretic terms](/ct/1#natural-transformation), the determinant is a natural transformation $\tau : \textbf{CRng} \overset{\bullet}{\rightarrow} \textbf{Grp}$.