SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.factorization.diagonalization
Class Bidiagonalization

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.factorization.diagonalization.Bidiagonalization

public class Bidiagonalization
extends java.lang.Object

Given a tall (m x n) matrix A, where m ≥ n, we find orthogonal matrices U and V such that

U' %*% A %*% V = B
B is an upper bi-diagonal matrix.

That is,

                   | d1  f1 ...                      |
                   | 0   d2  f2 ...                  |
 U' %*% A %*% V =  | 0                               |
                   | .                d(n-1) f(n-1)  |
                   | .                       d(n)    |
                   | 0     ...               0       |
                   |       ...                       |
                   | 0     ...               0       |
 

This implementation uses the Householder reflection process to repeatedly zero out the columns and the rows (partially).

For example, the first step is to left multiply A with the Householder matrix U1' so that matrix U1 %*% A has zeros in the left column (except for the first row). That is,

              | a11  * ... * |
              | 0            |
 U1' %*% A =  | 0            |
              | .       A'   |
              | .            |
              | 0            |
 
Then, we right multiply A with V1. (Note that the V's are Hermitian.) We have
                    | a11 a12 0 ... 0 |
                    | 0               |
 U1' %*% A %*% V1 = | 0               |
                    | .       A''     |
                    | .               |
                    | 0               |
 
At the end,
 (U1 %*% ... %*% Un)' %*% A %*% (V1 %*% ... %*% Vn) = B
 
where B is upper bi-diagonal.

The upper part of B, n x n, is a square, bi-diagonal matrix.

This transformation always succeeds.


Constructor Summary
Bidiagonalization(Matrix A)
          Run the Householder bidiagonalization for a tall matrix.
 
Method Summary
 BidiagonalMatrix B()
          Get a copy of the B matrix.
 Matrix U()
          Get a copy of U, where U' = Uk %*% ... %*% U1 where k = A.nCols().
 Matrix V()
          Get a copy of V, where V' = Vk %*% ... %*% V1 where k = A.nCols() - 2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bidiagonalization

public Bidiagonalization(Matrix A)
Run the Householder bidiagonalization for a tall matrix.

Parameters:
A - a square matrix
Throws:
java.lang.IllegalArgumentException - if A is not square
See Also:
"Algorithm 5.4.2. Matrix Computations, 3rd edition. Golub G. H., van Loan C. F."
Method Detail

U

public Matrix U()
Get a copy of U, where
U' = Uk %*% ... %*% U1
where k = A.nCols(). Dimension of U is mxm.

To compute U, instead of explicitly doing this multiplication, we can improve the performance by applying Ui's repeatedly on an identity matrix.

We take the transpose afterward.

Returns:
a copy of U matrix

V

public Matrix V()
Get a copy of V, where
V' = Vk %*% ... %*% V1
where k = A.nCols() - 2. Dimension of V is n x n.

To compute V, instead of explicitly doing this multiplication, we can improve the performance by applying Vi's repeatedly on an identity matrix.

We take the transpose afterward.

Returns:
a copy of V matrix

B

public BidiagonalMatrix B()
Get a copy of the B matrix.

B is the square upper part of U.t().multiply(A).multiply(V). Dimension of B is n x n.

Returns:
a copy of B

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.