Undergraduate → Algebra → Linear Algebra ↓
Singular Value Decomposition
In the field of linear algebra, singular value decomposition (SVD) is a fundamental technique that provides a powerful method to decompose a matrix into its constituent components. Singular value decomposition is widely used in many applications in various fields such as signal processing, statistics, and machine learning. Understanding SVD can significantly enhance one's understanding of how data behaves in high-dimensional spaces and helps in various dimensionality reduction and data compression tasks.
Introduction to singular value decomposition
Singular value decomposition is a method that decomposes a matrix into three separate matrices. Given a matrix A
with dimension mxn
, SVD expresses it as:
A = UΣVᵀ
Where:
U
is anmxm
orthogonal matrix.Σ
(sigma) is anmxn
diagonal matrix.V
is annxn
orthogonal matrix.
Here, U
and V
are orthogonal matrices, that is, their columns are orthonormal vectors.
Visual example
Consider a simple 2x2 matrix A
:
A = [[4, 0], [3, -5]]
For such a matrix, the SVD factorization will yield:
U = [[1, 0], [0, 1]] Σ = [[5, 0], [0, 3]] Vᵀ = [[0, 1], [1, 0]]
This can be understood as decomposing the matrix A
into rotations/reflections represented by U
and V
, and scalings represented by the diagonal matrix Σ
.
Understanding the components
Orthogonal matrices U
and V
Orthogonal matrices have special properties. For a matrix to be orthogonal, the dot product of every pair of distinct columns must be zero, and the dot product of every column with itself must be one, which means that the norm is preserved. For a matrix U
:
UᵀU = I
Similarly for V
:
vᵀv = i
Orthogonal matrices are important to understand because they preserve the geometric properties of the data, such as angles and lengths.
Diagonal matrix Σ
The diagonal matrix Σ
contains the singular values of the original matrix A
. These values can be viewed as stretching factors along the respective directions defined by the columns of U
and V
.
Example: Calculating the SVD by hand
Consider the matrix:
A = [[3, 1], [1, 3]]
Here is a step-by-step guide to calculate the SVD.
Step 1: Calculate AᵀA
and AAᵀ
First, calculate the following:
AᵀA = [[10, 6], [6, 10]]
AAᵀ = [[10, 6], [6, 10]]
Step 2: Find the eigenvalues and eigenvectors
The eigenvalues of these matrices will help in determining the singular values, while the eigenvectors provide the orthogonal matrices.
Solving {|AᵀA - λI| = 0} yields the eigenvalues λ₁ = 16
, λ₂ = 4
.
Σ
thus becomes:
Σ = [[4, 0], [0, 2]]
Step 3: Construct V
and U
From the eigenvectors of AᵀA
, we calculate V
:
V = [[1/√2, -1/√2], [1/√2, 1/√2]]
Similarly, from the eigenvectors of AAᵀ
, calculate U
:
U = [[1/√2, -1/√2], [1/√2, 1/√2]]
Applications of singular value decomposition
Data compression
SVD can be used to compress data. By truncating the matrices U
, Σ
, and V
to lower dimensions, significant data compression can be achieved with minimal loss of information.
Signal processing
In signal processing, singular values can help identify the 'shape' and 'structure' of a signal, filter out noise, and parse out important features effectively.
Example of SVD in image processing
Gray-scale images can be represented as a matrix. Using SVD, we can compress an image by keeping only the top singular values. This technique reduces the size of the image while preserving its main features.
Consider an image matrix I
:
I = [[255, 240, 230], [200, 180, 175], [215, 196, 188]]
Applying SVD:
U = [[0.68, -0.72], [0.68, 0.68]] Σ = [[457, 0], [0, 25]] Vᵀ = [[0.60, -0.80], [0.80, 0.60]]
By keeping only the largest singular value and its corresponding vectors, the image retains its main features but shrinks the data representation.
Conclusion
In short, Singular Value Decomposition is an indispensable tool in linear algebra, giving us the power to decompose a matrix into products of simpler and more interpretable components. Understanding SVD not only enhances our mathematical intuition but also equips us with powerful tools for practical tasks in fields such as computing, data science, and engineering.