gives a list of the nonzero singular values of a matrix m.
SingularValueList[{m,a}]
gives the generalized singular values of m with respect to a.
SingularValueList[m,k]
gives the k largest singular values of m.
SingularValueList[{m,a},k]
gives the k largest generalized singular values of m.
SingularValueList
gives a list of the nonzero singular values of a matrix m.
SingularValueList[{m,a}]
gives the generalized singular values of m with respect to a.
SingularValueList[m,k]
gives the k largest singular values of m.
SingularValueList[{m,a},k]
gives the k largest generalized singular values of m.
Details and Options
- Singular values are sorted from largest to smallest.
- Repeated singular values appear with their appropriate multiplicity.
- By default, singular values are kept only when they are larger than 100 times 10-p, where p is Precision[m].
- SingularValueList[m,Tolerance->t] keeps only singular values that are at least t times the largest singular value.
- SingularValueList[m,Tolerance->0] returns all singular values.
- The matrix m can be rectangular; the total number of singular values is always Min[Dimensions[m]].
- Exact and symbolic matrices can be used, with zero tolerance assumed by default.
- The singular values can be obtained from Sqrt[Eigenvalues[ConjugateTranspose[m].m]].
Examples
open all close allBasic Examples (2)
Compute the singular values of an invertible matrix:
SingularValueList[(| | |
| - | - |
| 1 | 2 |
| 3 | 4 |)]Compute the nonzero singular values of a singular matrix:
SingularValueList[(| | | |
| - | - | - |
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |)]There are only two, rather than three, because that is the rank of the matrix:
MatrixRank[(| | | |
| - | - | - |
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |)]Scope (19)
Basic Uses (7)
Find the nonzero singular values of a machine-precision matrix:
SingularValueList[(| | | |
| --- | --- | --- |
| 1.1 | 1.3 | 2.1 |
| 2.2 | 2.2 | 3.3 |
| 3.3 | -3 | 4.7 |)]Singular values of a complex matrix:
SingularValueList[(| | |
| ----------- | ----------- |
| 0.5 + 0.5 I | 1.1 |
| -I | 3.2 - 4.5 I |)]Singular values for an exact matrix:
SingularValueList[{{1, 2}, {3, 4}}]Singular values for an arbitrary-precision matrix:
SingularValueList[MatrixExp[RandomReal[1, {2, 2}, WorkingPrecision -> 20]]]Singular values of a symbolic matrix:
FullSimplify[SingularValueList[(| | |
| - | - |
| a | b |
| c | d |)], {a, b, c, d}∈ℝ]The singular values of large numerical matrices are computed efficiently:
m = RandomReal[{1, 9}, {1000, 1000}];AbsoluteTiming[SingularValueList[m];]Singular values of a non-square matrix:
SingularValueList[(| | | | |
| - | - | -- | - |
| 3 | 2 | 2 | 7 |
| 9 | 3 | -2 | 1 |)]Subsets of Singular Values (5)
Find the three largest singular values:
m = (| | | | | |
| --- | --- | ---- | ----- | ------ |
| 0.5 | 0.5 | 0.5 | 0 | 0 |
| 1. | 2. | 4. | 8. | 0 |
| 1.5 | 4.5 | 13.5 | 40.5 | 121.5 |
| 0 | 8. | 32. | 128. | 512. |
| 0 | 0 | 62.5 | 312.5 | 1562.5 |);
SingularValueList[m, 3]And the three smallest singular values:
SingularValueList[m, -3]Find the four largest singular values, including zero values, or as many as there are if fewer:
SingularValueList[(| | | |
| --- | --- | --- |
| 0.5 | 1. | 1.5 |
| 2. | 2.5 | 3. |
| 3.5 | 4. | 4.5 |), UpTo[4]]Zero singular values are included when computing the smallest singular values:
SingularValueList[(| | | |
| --- | --- | --- |
| 0.5 | 1. | 1.5 |
| 2. | 2.5 | 3. |
| 3.5 | 4. | 4.5 |), -2]Repeated singular values are listed multiple times:
SingularValueList[{{2, 0, 0}, {0, 2, 0}, {0, 0, 2}}]Repeated singular values are counted separately when extracting a subset of the singular values:
mat = {{(7/2), 0, (1/2), 0}, {0, 3, 0, 1}, {(1/2), 0, (7/2), 0}, {0, 1, 0, 3}};SingularValueList[mat]SingularValueList[mat, 3]SingularValueList[mat, -3]Generalized Singular Values (3)
Generalized machine-precision singular values:
m = {{1.5, 1.3}, {3.1, 2.2}};
a = {{1.1, 5.1}, {4.2, 3.4}};
SingularValueList[{m, a}]Find the two smallest generalized singular values:
a = (| | | |
| --- | --- | --- |
| 1. | 1.5 | 2. |
| 3.1 | 2. | 2.9 |
| 3. | 2. | 1. |);b = (| | | |
| --- | --- | --- |
| 1.3 | 0.5 | 1.1 |
| 0. | 1.5 | 2.3 |
| 1. | 0. | 1. |);SingularValueList[{a, b}, -2]Find the generalized singular values of a machine-precision complex matrix:
m = (| | |
| ---------------------------------------- | ---------------------------------------- |
| 4.641175490606916 + 7.207263282382337 I | 2.522671922520866 + 8.989217121399136 I |
| 4.114478069008367 + 7.010706036954508 I | 8.95961276370625 + 3.569738897382109 I |
| 4.405169936758572 + 4.4509297530197465 I | 9.145107926643146 + 6.3767022076415465 I |);a = (| | |
| --------------------------------------- | ---------------------------------------- |
| 7.341517476299638 + 9.810565178638917 I | 8.24181899398409 + 3.4570598473462972 I |
| 7.775955216608212 + 1.68269060515731 I | 3.944961113408187 + 1.4889990223210265 I |
| 6.431377195364613 + 6.245150387114993 I | 7.026661544586792 + 1.0790173484547747 I |);SingularValueList[{m, a}]Special Matrices (4)
Singular values of sparse matrices:
SparseArray[{{1, 3} -> 2, {2, 2} -> 3, {3, 1} -> 1, {4, 2} -> 5}, {4, 4}]SingularValueList[%]Find the three largest singular values:
SparseArray[{{x_, y_} /; Abs[x - y] < 3 -> 1}, {150, 150}]SingularValueList[%, 3]//FullSimplifySingular values of structured matrices:
SymmetrizedArray[{{1, 1} -> 2, {1, 2} -> 1}, {2, 2}, Symmetric[All]]SingularValueList[%]QuantityArray[{{1, 2}, {3, 4}}, {"Meters", "Meters"}]The units go with the singular values:
SingularValueList[%]IdentityMatrix always has all-one singular values:
SingularValueList[IdentityMatrix[12]]Singular values of HilbertMatrix:
SingularValueList[HilbertMatrix[5]]//FullSimplifyOptions (2)
Tolerance (2)
Compute the singular values larger than
of the largest singular value:
m = N[HilbertMatrix[10]];{Subscript[σ, 1]} = SingularValueList[m, 1];Select[SingularValueList[m], # > 0.1 Subscript[σ, 1]&]Setting Tolerance to
will directly compute the same set of singular values:
SingularValueList[m, Tolerance -> 0.1]m = HilbertMatrix[16];The matrix is positive definite, so with exact arithmetic there are 16 nonzero singular values:
Length[SingularValueList[m]]Many of the singular values are too small to show up at machine precision:
Length[SingularValueList[N[m]]]Setting the tolerance to zero will make them all show up:
SingularValueList[N[m], Tolerance -> 0]Because of numerical roundoff, the values are not computed accurately:
N[SingularValueList[m]]Applications (4)
Find the maximum value of
for the following matrix
:
m = (| | | |
| ------------------- | ------------------- | ------------------ |
| 0.6201924059167849 | 0.1642012623471385 | 0.9488900631268065 |
| 0.45081828391187817 | 0.23528005253744255 | 0.5556683503523119 |
| 0.6490685022331557 | 0.8994304255663148 | 0.4108954380673717 |);The maximum is equal to the largest singular value of
:
SingularValueList[m, 1]//FirstConfirm the result using MaxValue:
MaxValue[(Norm[m.x]/Norm[x]), x∈Vectors[3, Reals]]Find the minimum value of
subject to
for the following matrix
:
m = (| | | |
| ------------------ | ------------------ | ------------------- |
| 0.61 | 0.6596700568069829 | 0.21806383036829602 |
| 0.9065034103282616 | 0.32 | 0.39008198633165536 |
| 0.9749976665586482 | 0.5298619922699106 | 0.7332553638224806 |);Because the matrix has at least as many rows as columns, the minimum is the smallest singular value of
:
SingularValueList[m, -1]//FirstConfirm the result using MinValue:
MinValue[Norm[m.x], x∈Sphere[]]The operator norm of a matrix, also called the spectral norm or 2-norm, is defined as the maximum value of
subject to the constraint that
. Find the operator norm of the following
:
m = (| | | | |
| - | - | - | - |
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |);The maximum of
, and thus the norm, is the largest singular value of
:
SingularValueList[m, 1]//FirstVerify the result using Norm:
% == Norm[m]Use the singular values of
to compute its norm, the norm of
and the
condition number of the matrices:
m = (| | | | | |
| ------------------- | ------------------ | ------------------- | ------------------- | ------------------- |
| 0.5586541141266836 | 0.4836196860997566 | 0.43001371472761707 | 0.15584341399194623 | 0.5776446005074791 |
| 0.03069348146554618 | 0.5690912070366865 | 0.9683326899888793 | 0.580 | 0.5052068378482946 |
| 0.6553340778639707 | 0.3059598694903798 | 0.3931179458877401 | 0.5208999887331609 | 0.27321537200542423 |
| 0.03595071365286251 | 0.9210532614194069 | 0.9985000839819722 | 0.41170277644341935 | 0.3839108065740755 |
| 0.5809025186735828 | 0.6117636142636071 | 0.11827188288474355 | 0.31845314947311976 | 0.35583919578557843 |);sv = SingularValueList[m]The 2-norm of a matrix is equal to the largest singular value:
sv[[1]] == Norm[m, 2]The 2-norm of the inverse is equal to the reciprocal of the smallest singular value:
(1/sv[[-1]])Verify using Norm:
% == Norm[Inverse[m], 2]The
condition number is
and thus equals the ratio of largest to smallest singular values:
sv[[1]] / sv[[-1]]Properties & Relations (11)
The nonzero singular values of
are the square roots of the nonzero eigenvalues of
:
m = RandomInteger[{0, 9}, {7, 5}];SingularValueList[m] == DeleteCases[Sqrt[Eigenvalues[m.ConjugateTranspose[m]]], 0]//FullSimplifyEquivalently, they are the square roots of the nonzero eigenvalues of
:
SingularValueList[m] == DeleteCases[Sqrt[Eigenvalues[ConjugateTranspose[m].m]], 0]//FullSimplifyThe complete set of singular values of
is the square root of the eigenvalues of either
or
:
m = (| | | |
| - | -- | -- |
| 1 | 0 | 1 |
| 0 | 1 | -1 |
| 1 | 1 | 0 |
| 1 | -1 | 2 |);SingularValueList[m, Tolerance -> 0]The product that produces the smaller square matrix, in this case
, should be used:
% == Sqrt[Eigenvalues[ConjugateTranspose[m].m]]The order that produces a larger square matrix has additional zero eigenvalues:
Sqrt[Eigenvalues[m.ConjugateTranspose[m]]]m and ConjugateTranspose[m] have the same singular values:
m = RandomComplex[1 + I, {5, 7}];
SingularValueList[m] == SingularValueList[ConjugateTranspose[m]]The product of the singular values of a square matrix m equals Abs[Det[m]]:
m = RandomInteger[9, {5, 5}];
Abs[Det[m]] == Times@@SingularValueList[m, Tolerance -> 0]//FullSimplifyFor a normal matrix n, the singular values equal Abs[Eigenvalues[n]]:
m = {{1, 2, -1}, {-1, 1, 2}, {2, -1, 1}};
NormalMatrixQ[m]SingularValueList[m] == Abs[Eigenvalues[m]]MatrixRank[m] equals the number of nonzero singular values:
m = RandomInteger[1, {6, 6}];
MatrixRank[m] == Length[SingularValueList[m]]The singular values of
are the reciprocals of the singular values of
in the opposite order:
m = RandomReal[1, {5, 5}];
SingularValueList[Inverse[m]] == Reverse[(1/SingularValueList[m])]For a submatrix s of m, the largest singular value of m is greater than or equal to the singular values of s:
m = RandomReal[1, {5, 5}];
s = m[[RandomSample[Range[5], 3], RandomSample[Range[5], 4]]];First[SingularValueList[m, 1]] ≥ First[SingularValueList[s, 1]]The generalized singular values of
to
equal the roots of the generalized eigenvalues of
to
:
m = RandomComplex[1 + I, {3, 3}];
a = RandomComplex[1 + I, {3, 3}];SingularValueList[{m, a}] == Sqrt[Eigenvalues[{ConjugateTranspose[m].m, ConjugateTranspose[a].a}]] Unlike ordinary singular values, they are not related to the generalized eigenvalues of
to
:
SingularValueList[{m, a}] == Sqrt[Eigenvalues[{m.ConjugateTranspose[m], a.ConjugateTranspose[a]}]]The largest singular value of
with respect to
(with
having independent columns) is
:
m = (| | | |
| ---- | ---- | ---- |
| 0.2 | 0.05 | 0.91 |
| 0.25 | 0.83 | 0.21 |
| 0.2 | 0.73 | 0.43 |);a = (| | | |
| ------------------ | ---- | ---- |
| 0.01 | 0.28 | 0.63 |
| 0.5700000000000001 | 0.25 | 0.63 |
| 0.8 | 0.19 | 0.13 |);SingularValueList[{m, a}]MaxValue[(Norm[m.x]/Norm[a.x]), x∈Sphere[]]Call the input that gave the maximum
:
v1 = ArgMax[(Norm[m.x]/Norm[a.x]), x∈Sphere[]];The second singular value is the maximum of the ratio with the constraint that
is
-orthogonal to
:
MaxValue[{(Norm[m.x]/Norm[a.x]), x.a.a.v1 == 0}, x∈Sphere[]]Each subsequent singular value is found by requiring
to be
-orthogonal to all the preceding inputs:
v2 = ArgMax[{(Norm[m.x]/Norm[a.x]), x.a.a.v1 == 0}, x∈Sphere[]];MaxValue[{(Norm[m.x]/Norm[a.x]), x.a.a.v1 == 0 && x.a.a.v2 == 0}, x∈Sphere[]]The generalized singular values of
with respect to
differ from those of
with respect to
:
m = RandomComplex[1 + I, {3, 3}];
a = RandomComplex[1 + I, {3, 3}];
SingularValueList[{m, a}] == SingularValueList[{ConjugateTranspose[m], ConjugateTranspose[a]}]Possible Issues (1)
s = SparseArray[{{i_, i_} -> 1. / i, {1, j_} -> 1.}, {1000, 1000}]Computing all of the singular values uses dense linear algebra, which may be prohibitive:
Short[SingularValueList[s]]//AbsoluteTimingComputing just a few will typically be much faster:
SingularValueList[s, 2]//AbsoluteTimingTech Notes
Related Guides
History
Introduced in 2003 (5.0) | Updated in 2007 (6.0) ▪ 2014 (10.0) ▪ 2015 (10.3)
Text
Wolfram Research (2003), SingularValueList, Wolfram Language function, https://reference.wolfram.com/language/ref/SingularValueList.html (updated 2015).
CMS
Wolfram Language. 2003. "SingularValueList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/SingularValueList.html.
APA
Wolfram Language. (2003). SingularValueList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SingularValueList.html
BibTeX
@misc{reference.wolfram_2026_singularvaluelist, author="Wolfram Research", title="{SingularValueList}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/SingularValueList.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_singularvaluelist, organization={Wolfram Research}, title={SingularValueList}, year={2015}, url={https://reference.wolfram.com/language/ref/SingularValueList.html}, note=[Accessed: 13-June-2026]}