SVD

Shipping
matrix_svd

Full singular value decomposition A = U·Σ·Vᵀ via MKL LAPACK

Signature

Inputs

  • aSignal|ArrayrequiredA 2-D matrix (may be rectangular).

Outputs

  • singular_valuesVectorThe singular values $\sigma_i$ in descending order.
  • uMatrixThe left singular vectors $U$.
  • vtMatrixThe transposed right singular vectors $V^\top$.

Description

SVD computes the singular value decomposition of a (possibly rectangular) matrix through the MKL LAPACK backend, returning the singular values vector plus the full U and Vᵀ factor matrices. It is the numerical workhorse behind least squares, pseudo-inverse, rank, condition number, and the spectral/nuclear norms.

The singular values are non-negative and returned in descending order; the largest and smallest reveal the matrix's spectral norm and conditioning. All outputs are dimensionless, consistent with the rank-≥2 toolkit convention. When a factor cannot be formed the corresponding matrix port is emitted as an empty matrix rather than erroring.

Mathematics

Examples

Reading rank and conditioning from Σ

Feed any matrix into a. The singular_values output lists . Count the values above a small tolerance to get the rank; the ratio is the condition number, and alone is the spectral (2-)norm.

Applications

  • Dimensionality reduction and low-rank approximation (PCA-style truncation of Σ).
  • Deriving pseudo-inverse, rank, and condition number from a single decomposition.
  • Denoising and total-least-squares via singular-value thresholding.
  • Analyzing the principal directions (U, Vᵀ) of a data or transfer matrix.

Neat

SVD is the shared engine for the whole family: matrix_lstsq, matrix_pinv, matrix_rank, matrix_cond, and the spectral/nuclear norms all derive from it.

Unavailable factor matrices come back as empty $0\times0$ arrays instead of hard errors, keeping downstream wiring robust.

Known issues

Full U/Vᵀ for very large matrices can be memory-heavy; a values-only path (via the norm node) exists when only singular values are needed.

Sign conventions of individual singular vectors are not unique — columns of U/Vᵀ may flip sign across runs or platforms while the decomposition stays valid.

See also

svddecompositionsingular-valueslinear-algebralapackmklstateless