Main Content

Singular value decomposition

returns
the singular values
of matrix `S`

= svd(`A`

)`A`

in descending order.

```
[___]
= svd(
```

produces an economy-size decomposition of `A`

,"econ")`A`

using either of the
previous output argument combinations. If `A`

is an
`m`

-by-`n`

matrix, then:

`m > n`

— Only the first`n`

columns of`U`

are computed, and`S`

is`n`

-by-`n`

.`m = n`

—`svd(A,"econ")`

is equivalent to`svd(A)`

.`m < n`

— Only the first`m`

columns of`V`

are computed, and`S`

is`m`

-by-`m`

.

The economy-size decomposition removes extra rows or columns of zeros from the
diagonal matrix of singular values, `S`

, along with the columns in
either `U`

or `V`

that multiply those zeros in the
expression `A = U*S*V'`

. Removing these zeros and columns can
improve execution time and reduce storage requirements without compromising the
accuracy of the decomposition.

```
[___]
= svd(
```

produces a
different economy-size decomposition of `A`

,0)`m`

-by-`n`

matrix `A`

:

`m > n`

—`svd(A,0)`

is equivalent to`svd(A,"econ")`

.`m <= n`

—`svd(A,0)`

is equivalent to`svd(A)`

.

`[___] = svd(___,`

optionally specifies the output format for the singular values. You can use this
option with any of the previous input or output argument combinations. Specify
`outputForm`

)`"vector"`

to return the singular values as a column vector, or
`"matrix"`

to return the singular values in a diagonal
matrix.