Tensor Products
DfTensor Product (Kronecker Product)
For matrices and , the Kronecker product is:
Kronecker Product
Here,
- =Left matrix of size m × n
- =Right matrix of size p × q
- =Resulting matrix of size mp × nq
The result is a block matrix where each block is a submatrix scaled by .
ThProperties of Kronecker Product
- Mixed-product property:
- Distributivity:
- Transposition:
- Inverse: (when both exist)
- Eigenvalues: If has eigenvalues and has eigenvalues , then has eigenvalues
ℹ️ Outer Product vs Kronecker Product
The outer product of two vectors and is , a rank-1 matrix. The Kronecker product generalizes this to arbitrary matrices and produces a larger block matrix.
📝Kronecker Product Example
Let and .
💡 Applications in Quantum Computing
Multi-qubit quantum gates are constructed via Kronecker products. A 2-qubit gate is where are single-qubit gates. The CNOT gate cannot be decomposed as a Kronecker product of single-qubit gates — it is an entangling gate.
Matrix Exponential
DfMatrix Exponential
For any square matrix :
Matrix Exponential
Here,
- =Square matrix of size n × n
- =Identity matrix of same size
- =Matrix power (A multiplied by itself k times)
- =Factorial of k
This series converges absolutely for all matrices .
ThKey Properties of the Matrix Exponential
- Identity:
- Inverse:
- Determinant:
- Commutativity: If , then (fails when )
- Similarity:
- Derivative:
ℹ️ Applications of the Matrix Exponential
- Solving linear ODEs: For , the solution is
- Quantum mechanics: Time evolution where is the Hamiltonian
- Control theory: State transition matrix for linear time-invariant systems
- Merton model: Portfolio value evolution in continuous-time finance
📝Computing $e^A$ via Diagonalization
For :
Step 1: Eigenvalues are with eigenvectors .
Step 2: where , .
Step 3:
Matrix Logarithm
DfMatrix Logarithm
The matrix logarithm is the inverse of the matrix exponential: if , then . It exists if and only if is invertible and has no eigenvalues on the negative real axis (principal logarithm).
Matrix Logarithm via Diagonalization
Here,
- =Invertible matrix with positive eigenvalues
- =Matrix of eigenvectors
- =Diagonal matrix of eigenvalues
- =Eigenvalues of A (must be positive for principal log)
ℹ️ Applications
- Solving matrix equations: Find such that
- Multivariate statistics: Log-normal distributions involve matrix logarithms of covariance matrices
- Information geometry: The Kullback-Leibler divergence on Gaussian distributions uses matrix log
Matrix Powers
Matrix Powers via Diagonalization
Here,
- =Diagonalizable matrix
- =Matrix of eigenvectors
- =Diagonal matrix of eigenvalues
- =Non-negative integer power
💡 Why This Matters
For large , computing directly by multiplication is . Via diagonalization, it is regardless of — the eigenvalues are simply raised to the power . This is critical for Markov chains, dynamical systems, and iterative algorithms.
📝Fibonacci via Matrix Powers
The recurrence can be written as:
The matrix has eigenvalues (golden ratio) and , giving the closed-form Binet formula:
Generalized Eigenvalue Problem
DfGeneralized Eigenvalue Problem
Given two square matrices , find scalars and non-zero vectors satisfying . This reduces to the standard eigenvalue problem when .
Generalized Eigenvalue Equation
Here,
- =Symmetric matrix (often the stiffness or data matrix)
- =Symmetric positive definite matrix (often a mass or weight matrix)
- =Generalized eigenvalue
- =Generalized eigenvector
ThProperties of Generalized Eigenvalues
- If and are symmetric and is positive definite, all eigenvalues are real
- Eigenvectors are -orthogonal: for
- The generalized eigenvalues equal the eigenvalues of
- Can be computed via the QZ algorithm (generalized Schur decomposition)
ℹ️ Applications
- Structural engineering: Vibration analysis (stiffness vs mass matrices)
- Machine learning: Linear discriminant analysis (LDA) maximizes
- Canonical correlation analysis: Finding correlated pairs between two data sets
Matrix Functions
DfMatrix Functions
For a function and a diagonalizable matrix :
Matrix Function via Diagonalization
Here,
- =Diagonalizable matrix
- =Analytic function (e.g., sin, cosh, log, sqrt)
- =Matrix of eigenvectors
- =Diagonal matrix of eigenvalues
This extends scalar functions to matrices: , , , , , , and fractional powers .
💡 When Diagonalization Fails
If is not diagonalizable, use the Jordan canonical form and apply to each Jordan block:
The off-diagonal entries involve derivatives of evaluated at the eigenvalue.
Quadratic Forms
DfQuadratic Form
For a symmetric matrix , the quadratic form maps to a scalar:
Quadratic Form
Here,
- =Symmetric n × n matrix
- =Vector in R^n
- =Scalar output (real number)
ThClassification of Quadratic Forms
The quadratic form is classified by the signs of the eigenvalues of :
| Condition | Classification | All |
|---|---|---|
| All | Positive definite | |
| All | Positive semi-definite | |
| All | Negative definite | |
| All | Negative semi-definite | |
| Mixed signs | Indefinite | Takes both signs |
Equivalent conditions for positive definiteness: all leading principal minors (Sylvester's criterion).
ℹ️ Applications
- Optimization: The Hessian matrix defines a quadratic form near critical points; positive definite local minimum
- Statistics: The Mahalanobis distance is a quadratic form
- Physics: Kinetic energy is a quadratic form in the mass matrix
Rayleigh Quotient
Rayleigh Quotient
Here,
- =Symmetric matrix
- =Non-zero vector
- =Scalar ratio (Rayleigh quotient)
ThProperties of the Rayleigh Quotient
- Bounds: for all
- Stationary points: is minimized at eigenvectors corresponding to and maximized at eigenvectors corresponding to
- Scale invariance: for all
- Rayleigh quotient iteration: with converges cubically to an eigenvector
💡 Applications
- Iterative eigensolvers: The Rayleigh quotient iteration is one of the fastest algorithms for finding individual eigenvectors
- Vibration analysis: Natural frequency is a generalized Rayleigh quotient
- PCA: The first principal component maximizes the Rayleigh quotient of the covariance matrix
Polar Decomposition
DfPolar Decomposition
Any square matrix can be decomposed as:
Polar Decomposition
Here,
- =Orthogonal matrix (rotation/reflection), U^T U = I
- =Positive semi-definite symmetric matrix, P = (A^T A)^{1/2}
When is invertible, is unique and is positive definite. The left polar decomposition is where .
ThExistence and Uniqueness
- Every square matrix has a polar decomposition
- If is invertible, both and are unique
- If is singular, is unique only on the range of
- For an invertible matrix: ,
ℹ️ Geometric Interpretation
Polar decomposition separates a linear transformation into a rotation/reflection () followed by a scaling along principal axes (). This is analogous to writing a complex number as (magnitude and phase).
Jordan Normal Form
DfJordan Normal Form
When a matrix is defective (lacks enough eigenvectors for diagonalization), the Jordan normal form provides the closest possible simplification:
Jordan Canonical Form
Here,
- =Any n × n matrix over an algebraically closed field
- =Invertible matrix of generalized eigenvectors
- =Jordan form — block diagonal with Jordan blocks
- =Jordan block for eigenvalue λ_i
Each Jordan block has the form:
ThProperties of Jordan Normal Form
- Every square matrix has a Jordan form (over an algebraically closed field)
- The number of Jordan blocks equals the number of linearly independent eigenvectors
- The algebraic multiplicity of equals the total size of all Jordan blocks for
- The geometric multiplicity equals the number of Jordan blocks for
- A matrix is diagonalizable iff all Jordan blocks are
ℹ️ When Is Jordan Form Needed?
Jordan form is theoretically essential but numerically unstable — small perturbations can destroy the block structure. In practice, Schur decomposition is preferred for numerical computation. Jordan form is most useful for:
- Analyzing nilpotent matrices ()
- Computing matrix functions analytically
- Studying stability of defective systems in control theory
Python Implementation
💡 Numerical Stability
scipy.linalg.expm uses Pade approximation with scaling and squaring — more numerically stable than computing the Taylor series directly. For large matrices, scipy.sparse.linalg.expm handles sparse systems efficiently.
Applications in AI/ML
Common Mistakes
| Mistake | Correction |
|---|---|
| Assuming always | This only holds when ; for non-commuting matrices, use the Baker-Campbell-Hausdorff formula |
| Using Jordan form for numerical computation | Jordan form is numerically unstable; use Schur decomposition for floating-point arithmetic |
| Treating tensor product as element-wise multiplication | produces a block matrix of size , not which requires compatible dimensions |
| Assuming always | The matrix logarithm is multi-valued; for integer in the complex case |
| Ignoring positive definiteness in quadratic forms | Always verify eigenvalues of before concluding a critical point is a minimum; positive semi-definite is not sufficient |
| Confusing algebraic and geometric multiplicity | Geometric multiplicity algebraic multiplicity; they differ for defective matrices |
| Forgetting that polar decomposition requires to be PSD | must be the positive semi-definite square root, not just any square root |
Interview Questions
📝Question 1: Matrix Exponential Intuition
Q: Why does when and don't commute? Give a simple example.
💡Solution
A: When , the order of multiplication matters. For and :
,
but
These differ, confirming the non-commutativity effect.
📝Question 2: Quadratic Form Classification
Q: Classify the quadratic form .
💡Solution
A: The associated symmetric matrix is . Eigenvalues: . Both eigenvalues positive, so is positive definite.
📝Question 3: Jordan Form vs Diagonalization
Q: When does a matrix fail to be diagonalizable? How does Jordan form handle this?
💡Solution
A: A matrix fails to diagonalize when it is defective — the geometric multiplicity of some eigenvalue is less than its algebraic multiplicity. For example, has eigenvalue with algebraic multiplicity 2 but only one eigenvector. Jordan form gives — a single Jordan block. The in the super-diagonal captures the "near-diagonal" structure.
📝Question 4: Polar Decomposition Geometry
Q: What does polar decomposition tell us about a matrix geometrically?
💡Solution
A: Polar decomposition separates any linear map into a rotation/reflection (orthogonal) followed by a scaling along principal axes (positive semi-definite). This reveals the "pure stretching" part () and the "pure rotation" part () of a transformation. For example, if represents a stretch along one axis plus a rotation, polar decomposition isolates these two effects.
📝Question 5: Rayleigh Quotient Optimization
Q: How can the Rayleigh quotient be used to find eigenvalues?
💡Solution
A: The Rayleigh quotient has stationary points exactly at eigenvectors of , where it equals the corresponding eigenvalue. The Rayleigh quotient iteration with converges cubically to an eigenvector — one of the fastest known iterative methods.
Practice Problems
📝Problem 1: Matrix Exponential of a Nilpotent Matrix
Compute for .
💡Solution
Since (nilpotent), the series truncates exactly:
📝Problem 2: Kronecker Product Eigenvalues
If has eigenvalues and has eigenvalues , what are the eigenvalues of ?
💡Solution
The eigenvalues of are all pairwise products: , , , .
📝Problem 3: Positive Definiteness
Is positive definite? Verify using Sylvester's criterion.
💡Solution
Sylvester's criterion: all leading principal minors must be positive.
- ✓
- ✓
Yes, is positive definite.
📝Problem 4: Generalized Eigenvalue Problem
Solve for and .
💡Solution
Since both matrices are diagonal, the generalized eigenvalues are :
,
Eigenvectors are the standard basis: , .
Quick Reference
| Concept | Formula | Key Property |
|---|---|---|
| Kronecker Product | Size , eigenvalues | |
| Matrix Exponential | ||
| Matrix Logarithm | Inverse of | |
| Matrix Power | via diagonalization | |
| Generalized Eigen | ||
| Matrix Function | Applies to each eigenvalue | |
| Quadratic Form | Positive definite iff all | |
| Rayleigh Quotient | ||
| Polar Decomposition | Rotation + Scaling | |
| Jordan Normal Form | Handles defective matrices |
Cross-References
- Eigenvalues and Eigenvectors: Foundation for all matrix functions — enables
- Singular Value Decomposition: is the polar decomposition of when written as
- Positive Definite Matrices: Quadratic forms and Rayleigh quotients rely on positive definiteness
- Matrix Calculus: Derivatives of matrix exponentials and quadratic forms appear in optimization
- Optimization: The Hessian determines whether critical points are minima/maxima via quadratic form classification
- Probability and Statistics: Covariance matrices are positive semi-definite; Mahalanobis distance uses quadratic forms
- Numerical Methods: Pade approximation computes ; Schur decomposition avoids Jordan form instability
- Discrete Mathematics: Graph Laplacians and their eigenvalues power spectral graph theory and GNNs