> For the complete documentation index, see [llms.txt](https://isubasinghe.gitbook.io/isithas-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://isubasinghe.gitbook.io/isithas-wiki/math/linear_algebra/basics.md).

# Linear Algebra

## Basic idea

Linear maps between vector spaces are fully described by matrices once a basis is fixed. Most computations reduce to multiplication, inversion, and eigen-decomposition.

## Key formulas

* Matrix multiplication: $(AB)*{ij}=\sum\_k A*{ik}B\_{kj}$
* Dot product: $\mathbf{a}\cdot\mathbf{b}=\sum\_i a\_i b\_i = |\mathbf{a}||\mathbf{b}|\cos\theta$
* Norm ($L^2$): $|\mathbf{x}|\_2=\sqrt{\sum\_i x\_i^2}$
* Determinant (2x2): $\det\begin{pmatrix}a\&b\c\&d\end{pmatrix}=ad-bc$
* Inverse exists $\iff \det A \ne 0$; $A^{-1}=\dfrac{1}{\det A}\operatorname{adj}(A)$
* Eigenvalue equation: $Av=\lambda v$, characteristic polynomial $\det(A-\lambda I)=0$
* Trace: $\operatorname{tr}(A)=\sum\_i A\_{ii}=\sum\_i \lambda\_i$
* Rank-nullity: $\operatorname{rank}(A)+\operatorname{nullity}(A)=n$
* Singular value decomposition: $A=U\Sigma V^\top$
* Cauchy-Schwarz: $|\langle u,v\rangle|\le|u||v|$
