HP (Hewlett-Packard) 50g User Manual

Page of 887
Page 11-50
Function LU
Function LU takes as input a square matrix A, and returns a lower-triangular 
matrix L, an upper triangular matrix U, and a permutation matrix P, in stack 
levels 3, 2, and 1, respectively.  The results LU, and P, satisfy the equation 
P
A = LU.    When you call the LU function, the calculator performs a Crout LU 
decomposition of A using partial pivoting.
For example, in RPN mode:  
[[-1,2,5][3,1,-2][7,6,5]]  LU
produces:
3:[[7 0 0][-1 2.86 0][3 –1.57 –1]
2: [[1 0.86 0.71][0 1 2][0 0 1]]
1: [[0 0 1][1 0 0][0 1 0]]
In ALG mode, the same exercise will be shown as follows:
     
Orthogonal matrices and singular value decomposition 
A square matrix is said to be orthogonal if its columns represent unit vectors that 
are mutually orthogonal.  Thus, if we let matrix U = [v
1
v
2
 … v
n
] where the v
i
,
i = 1, 2, …, n, are column vectors, and if v
i•
v
j
 = 
δ
ij
, where 
δ
ij
 is the Kronecker’s 
delta function, then U will be an orthogonal matrix.  This conditions also imply 
that U
⋅ U
T
 = I.
The Singular Value Decomposition (SVD) of a rectangular matrix A
m
×n
 consists in 
determining the matrices US, 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