Linear Algebra LaTeX
Some basic LaTeX snippets common used in Linear Algebra
1. Vector Notation
v=v1v2⋮vn
\vec{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix}
2. Matrix Notation
A=a11a21⋮am1a12a22⋮am2⋯⋯⋱⋯a1na2n⋮amn
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
u⋅v=∑i=1nuivi
\vec{u} \cdot \vec{v} = \sum_{i=1}^{n} u_i v_i
4. Cross Product (3D vectors)
u×v=i^u1v1j^u2v2k^u3v3
\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([acbd])=ad−bc
\det\left(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\right) = ad - bc
6. Identity Matrix
I=10⋮001⋮0⋯⋯⋱⋯00⋮1
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−1such thatAA−1=I
A^{-1} \quad \text{such that} \quad AA^{-1} = I
8. Eigenvalue Equation
Av=λv
A\vec{v} = \lambda \vec{v}
9. Rank of a Matrix
rank(A)
\text{rank}(A)