SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

PSEUDO INVERSE

Name:
    PSEUDO INVERSE (LET)
Type:
    Let Subcommand
Purpose:
    Compute the transpose of the Moore-Penrose pseudo inverse of a matrix.
Description:
    If A is a square matrix of full rank, then the inverse of A exists (A is referred to as an invertible matrix) and

      Ax = b

    has the solution

      x = A-1b

    The Moore-Penrose pseudo inverse is a generalization of the matrix inverse when the matrix may not be invertible. If A is invertible, then the Moore-Penrose pseudo inverse is equal to the matrix inverse. However, the Moore-Penrose pseudo inverse is defined even when A is not invertible.

    More formally, the Moore-Penrose pseudo inverse, A+, of an m-by-n matrix is defined by the unique n-by-m matrix satisfying the following four criteria (we are only considering the case where A consists of real numbers).

    1. AA+A = A

    2. A+AA+ = A+

    3. (AA+)' = AA+

    4. (A+A)' = A+A

    If A is an mxn matrix where m > n and A is of full rank (= n), then

      A+ = (A'A)-1A'

    and the solution of Ax = b is x = A+b. In this case, the solution is not exact. It finds the solution that is closest in the least squares sense.

Syntax:
    LET <mat2> = PSEUDO INVERSE <mat1>             <SUBSET/EXCEPT/FOR qualification>
    where <mat1> is a matrix for which the pseudo inverse is to be computed;
                <mat2> is a matrix where the resulting transpose of the pseudo inverse is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and rarely used in this context).
Examples:
    LET C = PSEUDO INVERSE A
Note:
    The pseudo inverse is also referred to as the generalized inverse.
Note:
    A pseudo inverse can be used for any operator pinv satisfying

      M pinv(M) M = M

    Dataplot specifically computes the Moore-Penrose pseudo inverse. Other formulations are not currently supported.

Note:
    Dataplot computes the pseudo inverse using the MATMPI routine written by Charles Reeve while he was a member of the NIST Statistical Engineering Division. This routine is available at

    The MATMPI routine is based on the singular value decomposition. The singular value decomposition of A is

      A = USV'

    where U and V are both nxn orthogonal matrices and S is an mxn diagonal matrix with singular values sigma i for i = 1, ..., n. Then

      A+ = V(S'S)-1S'U'

    If the rank r of A is less than n, the inverse of S'S does not exist and we use only the first r singular values. S is then an rxr matrix and U and V are shrunk accordingly.

Note:
    Matrices are created with the READ MATRIX, CREATE MATRIX and MATRIX DEFINITION commands.
Note:
    The columns of a matrix are accessible as variables by appending an index to the matrix name. For example, the 4x4 matrix C has columns C1, C2, C3, and C4. These columns can be operated on like any other DATAPLOT variable.
Note:
    The maximum size matrix that DATAPLOT can handle is set when DATAPLOT is built on a particular site. Enter HELP DIMENSION and HELP MATRIX DIMENSION for details.
Default:
    None
Synonyms:
    None
Related Commands: References:
    Penrose (1956), "On Best Approximate Solution of Linear Matrix Equations", Proceedings of the Cambridge Philosophical Society, 52, pp. 17-19.

    Dongarra, Bunch, Moler, Stewart (1979), "LINPACK User's Guide", Siam.

Applications:
    Linear Algebra
Implementation Date:
    2009/1
Program:
     
    DIMENSION 100 COLUMNS
    READ MATRIX X
    16 16 19 21
    14 17 15 22
    24 23 21 24
    18 17 16 15
    18 11  9 18
    END OF DATA
    LET A = PSEUDO INVERSE X
    PRINT A
        
    The following output is generated.
             MATRIX A       --            5 ROWS
                            --            4 COLUMNS
    
     VARIABLES--A1             A2             A3             A4      
    
             0.0032        -0.2179         0.2005         0.0298
            -0.1124         0.1551        -0.1195         0.0757
             0.0101         0.0890        -0.0397        -0.0401
             0.0390         0.0506         0.0154        -0.0818
             0.0877        -0.0963        -0.0478         0.0499
        

Date created: 1/21/2009
Last updated: 1/21/2009
Please email comments on this WWW page to alan.heckert@nist.gov.