svd_test
svd_test,
a Python code which
demonstrates the computation of the singular value decomposition
and a few of its properties.
The singular value decomposition has uses in solving
overdetermined or underdetermined linear systems,
linear least squares problems, data compression,
the pseudoinverse matrix,
reduced order modeling, and
the accurate computation of matrix rank and null space.
The singular value decomposition of an M by N rectangular matrix A has
the form
A(mxn) = U(mxm) * S(mxn) * V'(nxn)
where

U is an orthogonal matrix, whose columns are the left singular vectors;

S is a diagonal matrix, whose min(m,n) diagonal entries are the singular values;

V is an orthogonal matrix, whose columns are the right singular vectors;
Note that the transpose of V is used in the decomposition, and that the
diagonal matrix
S is typically stored as a vector.
Usage:
svd_test ( m, n, seed )
where

m is the number of rows in the matrix,

n is the number of columns in the matrix,

seed the seed for the random number generator.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
svd_test is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
fingerprints,
a dataset directory which
contains a few images of fingerprints.
svd_snowfall,
a Python code which
reads a file containing historical snowfall data and
analyzes the data with the Singular Value Decomposition (SVD).
Reference:

Edward Anderson, Zhaojun Bai, Christian Bischof, Susan Blackford,
James Demmel, Jack Dongarra, Jeremy Du Croz, Anne Greenbaum,
Sven Hammarling, Alan McKenney, Danny Sorensen,
LAPACK User's Guide,
Third Edition,
SIAM, 1999,
ISBN: 0898714478,
LC: QA76.73.F25L36

Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,
LINPACK User's Guide,
SIAM, 1979,
ISBN13: 9780898711721,
LC: QA214.L56.

Gene Golub, Charles VanLoan,
Matrix Computations,
Third Edition,
Johns Hopkins, 1996,
ISBN: 080184513X,
LC: QA188.G65.

David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1989,
ISBN: 0136272584,
LC: TA345.K34.

Lloyd Trefethen, David Bau,
Numerical Linear Algebra,
SIAM, 1997,
ISBN: 0898713617,
LC: QA184.T74.
Source Code:
Last revised on 11 December 2018.