next up previous
Next: SLA_TP2S - Tangent Plane to Spherical
Up: SUBPROGRAM SPECIFICATIONS
Previous: SLA_SVDCOV - Covariance Matrix from SVD

SLA_SVDSOL - Solution Vector from SVD   

ACTION:
From a given vector and the SVD of a matrix (as obtained from the sla_SVD routine), obtain the solution vector. This routine solves the equation:

 		 A $\cdot$ x = b         
where:

 		 A 		 is a given m (rows) $\times n$ (columns)                       matrix, where $m \geq n$ 
		 x 		 is the n-vector we wish to find, and
		 b 		 is a given m-vector         
by means of the Singular Value Decomposition method (SVD).

CALL:
CALL sla_SVDSOL (M, N, MP, NP, B, U, W, V, WORK, X)

GIVEN:

M,N I m, n, the numbers of rows and columns in matrix A
MP,NP I physical dimensions of array containing matrix A
B D(M) known vector b
U D(MP,NP) array containing $m \times n$ matrix U
W D(N) $n \times n$ diagonal matrix W (diagonal elements only)
V D(NP,NP) array containing $n \times n$ orthogonal matrix V

RETURNED:

WORK D(N) workspace
X D(N) unknown vector x

NOTES:
1.
In the Singular Value Decomposition method (SVD), the matrix A is first factorized (for example by the routine sla_SVD) into the following components:

 		 A = U $\cdot$ W $\cdot$ VT
where:

 		 A 		 is any m (rows) $\times n$ (columns) matrix,                      where m > n 
		 U 		 is an $m \times n$ column-orthogonal matrix
		 W 		 is an $n \times n$ diagonal matrix with                      $w_{ii} \geq 0$ 
		 VT is the transpose of an $n \times n$                            orthogonal matrix        
Note that m and n are the logical dimensions of the matrices and vectors concerned, which can be located in arrays of larger physical dimensions MP and NP. The solution is then found from the expression:

 		 x = V $\cdot~[diag(1/$W$_{j})]
 \cdot ($U$^{T}\cdot$b)        
2.
If matrix A is square, and if the diagonal matrix W is not altered, the method is equivalent to conventional solution of simultaneous equations.
3.
If m > n, the result is a least-squares fit.
4.
If the solution is poorly determined, this shows up in the SVD factorization as very small or zero Wj values. Where a Wj value is small but non-zero it can be set to zero to avoid ill effects. The present routine detects such zero Wj values and produces a sensible solution, with highly correlated terms kept under control rather than being allowed to elope to infinity, and with meaningful values for the other terms.

REFERENCE:
Numerical Recipes, section 2.9.


next up previous
Next: SLA_TP2S - Tangent Plane to Spherical
Up: SUBPROGRAM SPECIFICATIONS
Previous: SLA_SVDCOV - Covariance Matrix from SVD

SLALIB --- Positional Astronomy Library
Starlink User Note 67
P. T. Wallace
12 October 1999
E-mail:ptw@star.rl.ac.uk