Vector Spaces, Subspaces & Linear Transformations
Vector Spaces, Subspaces & Linear Independence
Open Full Lesson →Subspace Test: A non-empty subset W of V is a subspace iff 0 in W, u + v in W, and c * u in W for all scalars c.
Must-Remember Principles:- —Linear Independence: c1*v1 + c2*v2 + ... + ck*vk = 0 iff c1 = c2 = ... = ck = 0.
- —Basis: A set B = {v1, ..., vk} is a basis for V iff B is linearly independent and span(B) = V.
- —Dimension: The number of vectors in any basis of V is unique and denotes dim(V).
- —Any set of k > n vectors in R^n is GUARANTEED to be linearly dependent.
- —If dim(V) = n, any linearly independent set of n vectors is automatically a basis.
Critical Pitfalls & Exam Traps:- ×A set containing the zero vector {0} is ALWAYS linearly dependent because 1 * 0 = 0 provides a non-trivial linear combination.
- ×A subset that does not contain the origin (0 vector) can NEVER be a vector subspace (e.g. affine hyperplanes like x + y = 1).
Vector Spaces, Subspaces & Linear Transformations
The Four Fundamental Subspaces & Rank-Nullity Theorem
Open Full Lesson →Rank-Nullity Theorem: For an m x n matrix A, Rank(A) + Nullity(A) = n (number of columns).
Must-Remember Principles:- —Column Space C(A) in R^m: Dimension = r = Rank(A). Spanned by pivot columns of A.
- —Null Space N(A) in R^n: Dimension = n - r = Nullity(A). Solutions to Ax = 0.
- —Row Space C(A^T) in R^n: Dimension = r. Spanned by non-zero rows of RREF(A).
- —Left Null Space N(A^T) in R^m: Dimension = m - r. Solutions to A^T y = 0.
- —Orthogonality Relations: N(A) = (C(A^T))_perp and N(A^T) = (C(A))_perp.
- —Sum of Dimensions: dim(C(A^T)) + dim(N(A)) = r + (n - r) = n.
Critical Pitfalls & Exam Traps:- ×To find a basis for the Column Space C(A), pick the PIVOT COLUMNS OF ORIGINAL MATRIX A, NOT the columns of RREF(A).
- ×Row rank ALWAYS equals Column rank for ANY matrix, square or rectangular: dim(C(A)) = dim(C(A^T)) = r.
Vector Spaces, Subspaces & Linear Transformations
Linear Maps, Matrix Representations & Change of Basis
Open Full Lesson →Similarity Transformation: Two matrices A and B represent the same linear transformation under different bases iff B = P^{-1} * A * P for an invertible transition matrix P.
Must-Remember Principles:- —Linearity Criterion: T(alpha * u + beta * v) = alpha * T(u) + beta * T(v).
- —Standard Matrix: Columns of [T] are the images of standard basis vectors: [T] = [ T(e1) | T(e2) | ... | T(en) ].
- —Matrix representation in basis B: [T]_B = P^{-1} * [T] * P, where P has basis vectors of B as columns.
- —Similar matrices share the SAME eigenvalues, trace, determinant, and rank.
Critical Pitfalls & Exam Traps:- ×Similar matrices share eigenvalues, but their EIGENVECTORS ARE NOT GENERALLY THE SAME (they are transformed by P).
- ×Affine transformations T(x) = Ax + b with b != 0 are NOT linear transformations because T(0) != 0.
Systems of Linear Equations & Determinants
Gaussian Elimination & Linear System Solvability
Open Full Lesson →Rouché-Capelli Theorem: Ax = b is consistent iff Rank(A) = Rank([A|b]). If rank = n, unique solution; if rank < n, infinitely many solutions.
Must-Remember Principles:- —Consistent with Unique Solution: Rank(A) = Rank([A|b]) = n (number of variables).
- —Consistent with Infinitely Many Solutions: Rank(A) = Rank([A|b]) = r < n (n - r free parameters).
- —Inconsistent (No Solution): Rank(A) < Rank([A|b]) (a row of the form [0, 0, ..., 0 | c] with c != 0 appears).
- —Homogeneous Systems Ax = 0: ALWAYS consistent (x = 0 is trivial solution). Non-trivial solution exists iff Rank(A) < n iff det(A) = 0 for square A.
Critical Pitfalls & Exam Traps:- ×Never perform row operations that divide by an unknown algebraic parameter (e.g. dividing by k - 3) before checking the case where that parameter equals zero.
Systems of Linear Equations & Determinants
Determinant Algebra, Cramer's Rule & Inverses
Open Full Lesson →Matrix Invertibility: A square n x n matrix A is invertible iff det(A) != 0 iff Rank(A) = n iff Ax = 0 has only the trivial solution.
Must-Remember Principles:- —Scalar Multiplication: det(c * A) = c^n * det(A) for an n x n matrix A.
- —Product Rule: det(A * B) = det(A) * det(B).
- —Inverse Determinant: det(A^{-1}) = 1 / det(A).
- —Transpose Invariance: det(A^T) = det(A).
- —Adjugate Inverse Formula: A^{-1} = (1 / det(A)) * adj(A).
- —Adjugate Determinant: det(adj(A)) = (det(A))^{n - 1}.
- —Orthogonal Matrix: det(Q) = +1 or -1.
Critical Pitfalls & Exam Traps:- ×Remember det(c * A) = c^n * det(A), NOT c * det(A). Forgetting the power n is one of the most common GATE errors.
- ×det(A + B) != det(A) + det(B) in general; determinants do not distribute over matrix addition.
Systems of Linear Equations & Determinants
LU Decomposition: Elimination You Can Reuse
Open Full Lesson →Elimination without row exchanges factors A = LU: U is the upper-triangular result of elimination, and L is unit lower-triangular holding the multipliers l_ij used to clear each entry.
Must-Remember Principles:- —Multiplier l_ij = (entry being cleared) / (pivot). It goes into L at position (i, j).
- —Solve Ax = b in two triangular steps: Ly = b (forward substitution), then Ux = y (back substitution).
- —det(A) = det(L)·det(U) = product of U's diagonal (L has 1s on its diagonal).
- —LU without row exchanges exists and is unique (with unit L) when every leading principal submatrix A_k is invertible.
- —If a zero pivot appears, exchange rows: PA = LU with a permutation matrix P.
- —Cost: factoring ≈ (2/3)n³ operations; each extra right-hand side ≈ 2n².
Critical Pitfalls & Exam Traps:- ×The multipliers go into L with a plus sign, even though you subtract them during elimination.
- ×A nonsingular matrix can still lack an LU factorization without pivoting, for example [[0,1],[1,0]].
- ×Don't refactor A for each new b. Reuse L and U.
Eigenvalues, Diagonalization & Cayley-Hamilton
Eigenvalues, Eigenvectors & Trace-Determinant Relations
Open Full Lesson →Sum of eigenvalues equals Trace(A); Product of eigenvalues equals det(A).
Must-Remember Principles:- —Eigenvalue Definition: A * v = lambda * v with non-zero eigenvector v != 0.
- —Characteristic Equation: det(A - lambda * I) = 0.
- —Trace Property: Sum_{i=1}^n lambda_i = Trace(A) = Sum_{i=1}^n a_{ii}.
- —Determinant Property: Prod_{i=1}^n lambda_i = det(A).
- —Eigenvalues of A^k are lambda_i^k.
- —Eigenvalues of A^{-1} are 1 / lambda_i (provided det(A) != 0).
- —Eigenvalues of A + c * I are lambda_i + c.
- —Eigenvalues of Triangular/Diagonal matrices are simply the diagonal entries.
Critical Pitfalls & Exam Traps:- ×Eigenvectors must be NON-ZERO vectors by definition. A zero vector is NEVER an eigenvector, even though lambda = 0 is a valid eigenvalue.
- ×Eigenvalues of A + B are NOT generally lambda(A) + lambda(B) unless A and B commute (AB = BA).
Eigenvalues, Diagonalization & Cayley-Hamilton
Diagonalizability, Multiplicities & Defective Matrices
Open Full Lesson →Diagonalizability Criterion: An n x n matrix A is diagonalizable iff Geometric Multiplicity equals Algebraic Multiplicity for EVERY eigenvalue (GM = AM), yielding n linearly independent eigenvectors.
Must-Remember Principles:- —Algebraic Multiplicity AM(lambda): The multiplicity of lambda as a root of the characteristic polynomial.
- —Geometric Multiplicity GM(lambda): The dimension of the eigenspace Nullity(A - lambda * I) = n - Rank(A - lambda * I).
- —Multiplicity Inequality: 1 <= GM(lambda) <= AM(lambda).
- —Sufficient Condition: If A has n DISTINCT eigenvalues, A is AUTOMATICALLY diagonalizable.
- —Diagonalization: A = P * D * P^{-1}, where columns of P are eigenvectors, and D = diag(lambda1, ..., lambdan).
- —Matrix Powers: A^k = P * D^k * P^{-1}, where D^k = diag(lambda1^k, ..., lambdan^k).
Critical Pitfalls & Exam Traps:- ×Having repeated eigenvalues does NOT mean a matrix is not diagonalizable. It is defective ONLY IF GM < AM.
- ×A defective matrix CANNOT be diagonalized into a pure diagonal matrix (requires Jordan Canonical Form).
Eigenvalues, Diagonalization & Cayley-Hamilton
Cayley-Hamilton Theorem & Minimal Polynomials
Open Full Lesson →Cayley-Hamilton Theorem: Every square matrix satisfies its own characteristic equation: p(A) = 0.
Must-Remember Principles:- —Characteristic Polynomial: p(lambda) = det(A - lambda * I) = (-1)^n lambda^n + c_{n-1} lambda^{n-1} + ... + c_0.
- —Cayley-Hamilton Matrix Identity: (-1)^n A^n + c_{n-1} A^{n-1} + ... + c_0 I = 0.
- —Matrix Inverse via Cayley-Hamilton: A^{-1} = (-1 / c_0) * [ (-1)^n A^{n-1} + c_{n-1} A^{n-2} + ... + c_1 I ], provided c_0 = det(A) != 0.
- —Minimal Polynomial m(lambda): The unique monic polynomial of minimum degree such that m(A) = 0. Divides p(lambda).
- —Diagonalizability via Minimal Polynomial: A matrix A is diagonalizable iff its minimal polynomial m(lambda) factors into DISTINCT linear terms (no repeated roots).
Critical Pitfalls & Exam Traps:- ×Remember that the scalar term c_0 in p(lambda) becomes c_0 * I (identity matrix) when substituting matrix A.
- ×The minimal polynomial m(lambda) has the EXACT same set of distinct roots as p(lambda), but with possibly lower powers.
Orthogonality, QR Factorization & Spectral Theorem
Inner Products, Gram-Schmidt & QR Factorization
Open Full Lesson →Orthogonal Matrix Q: Q^T * Q = I, meaning Q^{-1} = Q^T. Preserves vector lengths ||Q x|| = ||x|| and angles.
Must-Remember Principles:- —Cauchy-Schwarz Inequality: |<u, v>| <= ||u|| * ||v|| with equality iff u and v are linearly dependent.
- —Gram-Schmidt Step: u_k = v_k - Sum_{j=1}^{k-1} [ (v_k . u_j) / (u_j . u_j) ] * u_j; Normalization: e_k = u_k / ||u_k||.
- —QR Decomposition: Any m x n matrix A with linearly independent columns can be factored as A = Q * R, where Q (m x n) has orthonormal columns and R (n x n) is upper triangular.
- —Orthogonal Projection Matrix: P = A * (A^T * A)^{-1} * A^T. Properties: P^2 = P (idempotent), P^T = P (symmetric).
- —Least-Squares Solution: When Ax = b is inconsistent, x_hat = (A^T A)^{-1} A^T b solves ||Ax - b||_2.
Critical Pitfalls & Exam Traps:- ×When normalizing Gram-Schmidt vectors, divide by the Euclidean norm ||u_k|| = sqrt(Sum u_{ki}^2), NOT the sum of components.
- ×If Q is rectangular (m > n with orthonormal columns), Q^T Q = I_n, but Q Q^T is the PROJECTION MATRIX onto C(Q), NOT I_m.
Orthogonality, QR Factorization & Spectral Theorem
Symmetric Matrices, Spectral Theorem & Positive Definiteness
Open Full Lesson →Spectral Theorem: Every real symmetric matrix A = A^T can be orthogonally diagonalized as A = Q * Lambda * Q^T, with all eigenvalues real and mutually orthogonal eigenvectors.
Must-Remember Principles:- —Real Eigenvalues: All eigenvalues of a real symmetric matrix are guaranteed to be REAL numbers.
- —Orthogonal Eigenvectors: Eigenvectors corresponding to distinct eigenvalues of a symmetric matrix are MUTUALLY ORTHOGONAL.
- —Spectral Decomposition: A = Sum_{i=1}^n lambda_i * q_i * q_i^T, expressing A as a weighted sum of rank-1 projection matrices.
- —Quadratic Form: q(x) = x^T * A * x = Sum_{i, j} a_{ij} x_i x_j.
- —Positive Definite (PD): x^T A x > 0 for all x != 0 iff all lambda_i > 0 iff all leading principal minors det(A_k) > 0 (Sylvester's Criterion).
- —Positive Semi-Definite (PSD): x^T A x >= 0 for all x iff all lambda_i >= 0 iff all principal minors >= 0.
- —Cholesky Factorization: A is Positive Definite iff A = L * L^T for a unique lower triangular matrix L with positive diagonal.
Critical Pitfalls & Exam Traps:- ×Sylvester's criterion for Positive Definiteness requires ONLY the LEADING principal minors to be > 0. But for Positive SEMI-Definiteness, ALL principal minors (not just leading ones) must be >= 0.
- ×If a symmetric matrix has both positive and negative eigenvalues, it is INDEFINITE and its quadratic form has a saddle point at x = 0.
Orthogonality, QR Factorization & Spectral Theorem
Partitioned (Block) Matrices and Idempotent Matrices
Open Full Lesson →Partitioned matrices multiply like ordinary matrices with blocks in place of numbers (when the block sizes match). An idempotent matrix satisfies P² = P: its eigenvalues are only 0 and 1, and its rank equals its trace.
Must-Remember Principles:- —[A B; C D]·[E F; G H] = [AE+BG, AF+BH; CE+DG, CF+DH] (block sizes must be compatible).
- —Block triangular: det[A B; 0 D] = det(A)·det(D) (A and D square).
- —Schur complement: if A is invertible, det[A B; C D] = det(A)·det(D − C A⁻¹ B).
- —Block diagonal inverse: [A 0; 0 D]⁻¹ = [A⁻¹ 0; 0 D⁻¹].
- —Idempotent P: eigenvalues ∈ {0, 1}, P is diagonalizable, rank(P) = trace(P).
- —If P is idempotent, so is I − P, and P(I − P) = 0.
- —An idempotent P is an orthogonal projection exactly when P is also symmetric (Pᵀ = P).
- —Hat matrix H = X(XᵀX)⁻¹Xᵀ is symmetric and idempotent; trace(H) = number of columns of X (full column rank).
Critical Pitfalls & Exam Traps:- ×Block products keep the order: write AE + BG, never EA + GB. Blocks do not commute.
- ×det[A B; C D] is not det(A)det(D) − det(B)det(C) in general.
- ×Not every idempotent matrix is symmetric: [[1,1],[0,0]] is idempotent but projects obliquely.
Singular Value Decomposition (SVD) & PCA
SVD Factorization, Eckart-Young Theorem & PCA
Open Full Lesson →SVD: Any m x n matrix A can be factored as A = U * Sigma * V^T, where U (m x m) and V (n x n) are orthogonal, and Sigma contains non-negative singular values sigma_1 >= sigma_2 >= ... >= sigma_r > 0.
Must-Remember Principles:- —Singular Values: sigma_i = sqrt(lambda_i(A^T A)) = sqrt(lambda_i(A A^T)).
- —Right Singular Vectors (columns of V): Eigenvectors of A^T A (size n x n).
- —Left Singular Vectors (columns of U): Eigenvectors of A A^T (size m x m). Relation: u_i = (1 / sigma_i) * A * v_i.
- —Frobenius Norm: ||A||_F^2 = Sum_{i, j} a_{ij}^2 = Sum_{i=1}^r sigma_i^2.
- —Eckart-Young-Mirsky Theorem: The optimal rank-k approximation minimizing ||A - A_k||_F is A_k = Sum_{i=1}^k sigma_i * u_i * v_i^T.
- —PCA Connection: If data matrix X is mean-centered, the sample covariance matrix is Sigma_X = (1/n) * X^T X. The principal components are the right singular vectors V of X.
- —Explained Variance Ratio: EVR_k = (Sum_{i=1}^k sigma_i^2) / (Sum_{j=1}^r sigma_j^2).
Critical Pitfalls & Exam Traps:- ×Singular values are ALWAYS non-negative real numbers, even if matrix entries or eigenvalues of A are negative.
- ×Columns of U and V must be paired consistently using u_i = (1 / sigma_i) * A * v_i to avoid sign contradictions.