svd

Singular Value Decomposition.

📝 Syntax

  • s = svd(M)

  • [U, S, V] = svd(M)

  • [U, S, V] = svd(M, 0)

  • [U, S, V] = svd(M, 'econ')

📥 Input argument

  • M - a numeric value: matrix (double or single)

📤 Output argument

  • s - real vector (singular values) by descending order.

  • U - left singular values.

  • S - real diagonal matrix (singular values)

  • V - right singular values.

📄 Description

svd computes the Singular Value Decomposition of a matrix.

For an m×nm \times n

matrix M, the SVD is: M=UΣVTM = U\Sigma V^T

where:

  • UU is an m×mm \times m

unitary matrix (left singular vectors)

  • Σ\Sigma is an m×nm \times n

diagonal matrix with non-negative real numbers (singular values)

  • VTV^T is an n×nn \times n

unitary matrix (right singular vectors)

The singular values σi\sigma_i

are arranged in decreasing order: σ1σ20\sigma_1 \geq \sigma_2 \geq \ldots \geq 0

💡 Example

X = eye(3, 3);
s = svd(X)
[U, S, V] = svd(X)

🔗 See also

eig.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?