Page 11-50
The Singular Value Decomposition (SVD) of a rectangular matrix
A
m
×
n
consists
in determining the matrices
U
,
S
, and
V
, such that
A
m
×
n
=
U
m
×
m
⋅
S
m
×
n
⋅
V
T
n
×
n
,
where
U
and
V
are orthogonal matrices, and
S
is a diagonal matrix. The
diagonal elements of
S
are called the
singular values
of
A
and are usually
ordered so that
s
i
≥
s
i+1
, for
i = 1, 2, …, n-1
. The columns [
u
j
] of
U
and [
v
j
] of
V
are the corresponding
singular vectors
.
Function SVD
In RPN, function SVD (Singular Value Decomposition) takes as input a matrix
A
n
×
m
, and returns the matrices
U
n
×
n
,
V
m
×
m
, and a vector
s
in stack levels 3, 2,
and 1, respectively. The dimension of vector
s
is equal to the minimum of the
values n and m. The matrices
U
and
V
are as defined earlier for singular
value decomposition, while the vector
s
represents the main diagonal of the
matrix
S
used earlier.
For example, in RPN mode:
[[5,4,-1],[2,-3,5],[7,2,8]] SVD
3: [[-0.27 0.81 –0.53][-0.37 –0.59 –0.72][-0.89 3.09E-3 0.46]]
2: [[ -0.68 –0.14 –0.72][ 0.42 0.73 –0.54][-0.60 0.67 0.44]]
1: [ 12.15 6.88 1.42]
Function SVL
Function SVL (Singular VaLues) returns the singular values of a matrix
A
n
×
m
as
a vector
s
whose dimension is equal to the minimum of the values n and m.
For example, in RPN mode,
[[5,4,-1],[2,-3,5],[7,2,8]] SVL
produces
[ 12.15 6.88 1.42].
Function SCHUR
In RPN mode, function SCHUR produces the
Schur decomposition
of a square
matrix
A
returning matrices
Q
and
T
, in stack levels 2 and 1, respectively,
such that
A
=
Q
⋅
T
⋅
Q
T
, where
Q
is an orthogonal matrix, and
T
is a triangular
matrix. For example, in RPN mode,
[[2,3,-1][5,4,-2][7,5,4]] SCHUR
results in:
2: [[0.66 –0.29 –0.70][-0.73 –0.01 –0.68][ -0.19 –0.96 0.21]]