Linear Algebra LaTeX
Some basic LaTeX snippets common used in Linear Algebra.
1. Vector Notation
\vec{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix}2. Matrix Notation
A = \begin{bmatrix}
a_{11} & a_{12} & \cdots & a_{1n} \\
a_{21} & a_{22} & \cdots & a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{m1} & a_{m2} & \cdots & a_{mn}
\end{bmatrix}3. Dot Product
\vec{u} \cdot \vec{v} = \sum_{i=1}^{n} u_i v_i4. Cross Product (3D vectors)
\vec{u} \times \vec{v} = \begin{vmatrix}
\hat{i} & \hat{j} & \hat{k} \\
u_1 & u_2 & u_3 \\
v_1 & v_2 & v_3
\end{vmatrix}5. Determinant of a 2x2 Matrix
\det\left(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\right) = ad - bc6. Identity Matrix
I = \begin{bmatrix}
1 & 0 & \cdots & 0 \\
0 & 1 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & 1
\end{bmatrix}7. Inverse of a Matrix (if it exists)
A^{-1} \quad \text{such that} \quad AA^{-1} = I8. Eigenvalue Equation
A\vec{v} = \lambda \vec{v}9. Rank of a Matrix
\text{rank}(A)