Vectors, Linear Combinations, Span & Independence
Understand how vectors add, scale, and span 2D space, and visualize when vectors become linearly dependent.
Vectors & Linear Combinations
-
Vector (向量):
/ˈvektər/
An object with magnitude and direction, represented as an arrow in space.
$$\mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} = c_1 \mathbf{v}_1 + c_2 \mathbf{v}_2$$
- Linear Combination (线性组合): /ˈlɪniər ˌkɒmbɪˈneɪʃn/ Sum of scalar multiples of vectors: $c_1 \mathbf{u} + c_2 \mathbf{v}$.
Span & Linear Independence
-
Span (张成空间):
/spæn/
The set of all possible linear combinations formed by a set of vectors.
$$\text{Span}(\mathbf{u}, \mathbf{v}) = \{ c_1 \mathbf{u} + c_2 \mathbf{v} \mid c_1, c_2 \in \mathbb{R} \}$$
- Linear Independence (线性无关): /ˈlɪniər ˌɪndɪˈpendəns/ No vector in the set can be written as a linear combination of the others ($c_1 \mathbf{u} + c_2 \mathbf{v} = \mathbf{0} \implies c_1 = c_2 = 0$).
Subspace, Basis & Dimension
- Subspace (子空间): /ˈsʌbˌspeɪs/ A subset $W \subseteq V$ containing $\mathbf{0}$, closed under vector addition and scalar multiplication.
-
Basis & Dimension (基与维度):
/ˈbeɪsɪs/ /daɪˈmenʃn/
A basis is a linearly independent set that spans the space. Dimension is the number of basis vectors.
$$\dim(\mathbb{R}^2) = 2, \quad \mathbf{e}_1 = \begin{bmatrix}1\\0\end{bmatrix}, \mathbf{e}_2 = \begin{bmatrix}0\\1\end{bmatrix}$$
Matrices as Linear Transformations & Determinants
Visualize how a 2x2 matrix moves, skews, and rotates space, and discover why Determinant equals area scaling factor.
Linear Transformations
-
Linear Transformation (线性变换):
/ˈlɪniər ˌtrænsfərˈmeɪʃn/
A mapping that preserves grid lines (lines remain lines, origin remains fixed).
$$T(\mathbf{x}) = A\mathbf{x} = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}$$
- Columns of Matrix = Transformed Basis Vectors: Column 1 is $T(\hat{i})$, Column 2 is $T(\hat{j})$.
Determinant, Rank & Nullspace
-
Determinant (行列式):
/dɪˈtɜːrmɪnənt/
The factor by which a transformation scales areas ($\det(A) = ad - bc$).
$$\det(A) = ad - bc$$
- Rank & Nullspace (秩与零空间): /ræŋk/ /ˈnʌlspeɪs/ Rank is the dimension of output space; Nullspace is all vectors that land on origin ($\mathbf{0}$).
Composition & Inverse Matrix
- Matrix Composition (矩阵乘法与复合变换): Multiplying $BA$ applies transformation $A$ first, then $B$. Note $BA \neq AB$ (non-commutative).
-
Inverse Matrix (逆矩阵):
/ˈɪnvɜːrs/
Undoes the transformation. Exists iff $\det(A) \neq 0$:
$$A^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}$$
Linear Systems, Rank & Gaussian Elimination
Use 2D lines, augmented matrices, and row operations to distinguish unique, no, and infinitely many solutions.
Geometry of Linear Systems
Each two-variable linear equation is a line; their intersection satisfies both equations.
Gauss-Jordan Elimination
Use row swaps, scaling, and replacement to reduce an augmented matrix to RREF.
Rank & Solution Classification
Different ranks for A and [A|b] mean no solution; equal ranks give a unique solution only when they match the number of unknowns.
Eigenvalues, Eigenvectors & Diagonalization
Discover vectors that do not change direction during transformation ($A\mathbf{v} = \lambda \mathbf{v}$) and explore spectral decomposition.
Eigenvalues & Eigenvectors
-
Eigenvalue & Eigenvector (特征值与特征向量):
/ˈaɪɡənˌvæljuː/ /ˈaɪɡənˌvektər/
A non-zero vector $\mathbf{v}$ is an eigenvector if $A\mathbf{v}$ is a scalar multiple of $\mathbf{v}$.
$$A\mathbf{v} = \lambda \mathbf{v} \iff (A - \lambda I)\mathbf{v} = \mathbf{0}$$
- Characteristic Equation (特征方程): $\det(A - \lambda I) = 0 \implies \lambda^2 - \text{tr}(A)\lambda + \det(A) = 0$.
Diagonalization & Spectral Theorem
-
Diagonalization (对角化):
/daɪˈæɡənəlaɪˌzeɪʃn/
Factoring matrix $A$ into eigenvector basis $P$ and diagonal matrix $D$: $A = PDP^{-1}$.
$$A = P D P^{-1}, \quad A^n = P D^n P^{-1}$$
- Spectral Theorem (谱定理): Every real symmetric matrix ($A = A^T$) can be orthogonally diagonalized ($A = Q D Q^T$) with real eigenvalues.
Multiplicity & PCA Connection
- Algebraic vs Geometric Multiplicity: Algebraic is root multiplicity in characteristic eq; Geometric is dimension of eigenspace $\text{Null}(A-\lambda I)$.
- PCA & Covariance Matrix (主成分分析): Principal components are eigenvectors of covariance matrix $C = \frac{1}{n} X^T X$, pointing in directions of max variance.
Orthogonality, Projection, QR, PCA & SVD
Master the geometry of orthogonal projection, QR, least squares, PCA dimensionality reduction, and Singular Value Decomposition.
Dot Product & Projection
-
Dot Product & Orthogonality (点积与正交性):
/ɔːrˌθɒɡəˈnæləti/
Vectors $\mathbf{u}, \mathbf{v}$ are orthogonal ($\mathbf{u} \perp \mathbf{v}$) iff $\mathbf{u} \cdot \mathbf{v} = 0$.
$$\mathbf{u} \cdot \mathbf{v} = \|\mathbf{u}\| \|\mathbf{v}\| \cos\theta$$
-
Orthogonal Projection (正交投影):
/prəˈdʒekʃn/
The shadow of vector $\mathbf{v}$ onto line spanned by $\mathbf{u}$.
$$\text{proj}_{\mathbf{u}}\mathbf{v} = \frac{\mathbf{v} \cdot \mathbf{u}}{\|\mathbf{u}\|^2} \mathbf{u}$$
Gram-Schmidt, QR & SVD
- Gram-Schmidt & QR (正交化与 QR 分解): /ɡræm ʃmɪt/ Converting vectors into orthonormal basis $Q$. Matrix form: $A = QR$.
- Singular Value Decomposition (SVD 奇异值分解): /ˈsɪŋɡjələr ˈvæljuː/ Factoring any matrix $A = U \Sigma V^T$ into Rotation ($V^T$) $\to$ Scaling ($\Sigma$) $\to$ Rotation ($U$).
Least Squares & Pseudo-Inverse
-
Least Squares Approximation (最小二乘法):
Solving inconsistent $A\mathbf{x} = \mathbf{b}$ by projecting $\mathbf{b}$ onto $\text{Col}(A)$:
$$A^T A \hat{\mathbf{x}} = A^T \mathbf{b} \implies \hat{\mathbf{x}} = (A^T A)^{-1} A^T \mathbf{b}$$
- Moore-Penrose Pseudo-Inverse (伪逆): $A^+ = V \Sigma^+ U^T$, generalizes inverse to non-square matrices.
Linear Algebra Quiz & Formula Cheatsheet
Test your linear algebra knowledge with 15 practice questions or review key formulas, SVD intuitions, and common pitfalls.
Loading question...
Matrix Operations & Properties
$$\det(AB) = \det(A)\det(B), \quad \det(A^T) = \det(A), \quad \det(cA) = c^n \det(A)$$
$$\text{tr}(AB) = \text{tr}(BA), \quad \text{tr}(A) = \sum_{i=1}^n \lambda_i$$
$$\text{Rank}(A) + \text{Nullity}(A) = n \quad (\text{for } m \times n \text{ matrix } A)$$
Four Fundamental Subspaces
- 1. Column Space $\text{Col}(A)$: Dim = $r$, subspace of $\mathbb{R}^m$.
- 2. Nullspace $\text{Null}(A)$: Dim = $n-r$, subspace of $\mathbb{R}^n$. $\text{Null}(A) \perp \text{Row}(A)$.
- 3. Row Space $\text{Row}(A) = \text{Col}(A^T)$: Dim = $r$, subspace of $\mathbb{R}^n$.
- 4. Left Nullspace $\text{Null}(A^T)$: Dim = $m-r$, subspace of $\mathbb{R}^m$. $\text{Null}(A^T) \perp \text{Col}(A)$.
Positive Definite Matrix
A real symmetric matrix $A$ is positive definite ($A \succ 0$) iff any of the following equivalent conditions holds:
- 1. $\mathbf{x}^T A \mathbf{x} > 0$ for every non-zero vector $\mathbf{x} \neq \mathbf{0}$.
- 2. All eigenvalues $\lambda_i > 0$ are strictly positive.
- 3. All leading principal minors are strictly positive ($\det(A_k) > 0$).
- 4. A Cholesky factorization exists: $A = L L^T$.
Singular Value Decomposition (SVD)
For any $m \times n$ matrix $A$:
$$A = U \Sigma V^T$$
- $U$: $m \times m$ orthogonal matrix of left singular vectors (eigenvectors of $A A^T$).
- $\Sigma$: $m \times n$ diagonal matrix of singular values $\sigma_i = \sqrt{\lambda_i(A^T A)}$.
- $V$: $n \times n$ orthogonal matrix of right singular vectors (eigenvectors of $A^T A$).
Least Squares & PCA Applications
$$A^T A \hat{\mathbf{x}} = A^T \mathbf{b}$$
Projection matrix onto $\text{Col}(A)$: $P = A(A^T A)^{-1}A^T$.
Sample covariance $C = \frac{1}{n} X^T X$. Applying SVD to the centered data matrix $X = U \Sigma V^T$ gives right singular vectors $V$ as the principal directions.
Common Linear Algebra Pitfalls
$AB \neq BA$ in general. $(AB)^T = B^T A^T$ and $(AB)^{-1} = B^{-1}A^{-1}$.
Eigenvalues apply only to square matrices and can be complex or negative. Singular values apply to any rectangular matrix and are always non-negative real numbers $\sigma_i \ge 0$.