Advanced Matrix Operations
Finding singular values and norms of matrices.
The singular values
of a matrix m
are the square roots of the eigenvalues of m.m*
, where *
denotes Hermitian transpose. The number of such singular values is the smaller dimension of the matrix. SingularValueList
sorts the singular values from largest to smallest. Very small singular values are usually numerically meaningless. With the option setting Tolerance->t
drops singular values that are less than a fraction t
of the largest singular value. For approximate numerical matrices, the tolerance is by default slightly greater than zero.
If you multiply the vector for each point in a unit sphere in n
-dimensional space by an m
, then you get an m
-dimensional ellipsoid, whose principal axes have lengths given by the singular values of m
of a matrix Norm[m, 2]
is the largest principal axis of the ellipsoid, equal to the largest singular value of the matrix. This is also the maximum 2-norm length of m.v
for any possible unit vector v
of a matrix Norm[m, p]
is in general the maximum p
-norm length of m.v
that can be attained. The cases most often considered are p=1
. Also sometimes considered is the Frobenius norm Norm[m, "Frobenius"]
, which is the square root of the trace of m.m*
Decomposing square matrices into triangular forms.
When you create a LinearSolveFunction
, this often works by decomposing the matrix m
into triangular forms, and sometimes it is useful to be able to get such forms explicitly.
effectively factors any square matrix into a product of lower- and upper-triangular matrices. Cholesky decomposition
effectively factors any Hermitian positive-definite matrix into a product of a lower-triangular matrix and its Hermitian conjugate, which can be viewed as the analog of finding a square root of a matrix.
Orthogonal decompositions of matrices.
The standard definition for the inverse of a matrix fails if the matrix is not square or is singular. The pseudoinverse m (-1)
of a matrix m
can however still be defined. It is set up to minimize the sum of the squares of all entries in m.m (-1)-I
, where I
is the identity matrix. The pseudoinverse is sometimes known as the generalized inverse, or the Moore-Penrose inverse. It is particularly used for problems related to least-squares fitting.
writes any matrix m
as a product q*r
, where q
is an orthonormal matrix, *
denotes Hermitian transpose, and r
is a triangular matrix, in which all entries below the leading diagonal are zero.
Singular value decomposition
, or SVD
, is an underlying element in many numerical matrix algorithms. The basic idea is to write any matrix m
in the form usv*
, where s
is a matrix with the singular values of m
on its diagonal, u
are orthonormal matrices, and v*
is the Hermitian transpose of v
Functions related to eigenvalue problems.
Most square matrices can be reduced to a diagonal matrix of eigenvalues by applying a matrix of their eigenvectors as a similarity transformation. But even when there are not enough eigenvectors to do this, one can still reduce a matrix to a Jordan form
in which there are both eigenvalues and Jordan blocks on the diagonal. Jordan decomposition
in general writes any square matrix in the form as sjs-1
Numerically more stable is the Schur decomposition
, which writes any square matrix m
in the form qtq*
, where q
is an orthonormal matrix, and t
is block upper-triangular. Also related is the Hessenberg decomposition
, which writes a square matrix m
in the form php*
, where p
is an orthonormal matrix, and h
can have nonzero elements down to the diagonal below the leading diagonal.