Learn R Programming

Matrix (version 0.995-15)

lu: Triangular Decomposition of a Square Matrix

Description

Computes triangular decompositions of square matrices.

Usage

lu(x, ...)

Arguments

x
a matrix. No missing values or IEEE special values are allowed.
...
further arguments passed to or from other methods.

Value

  • an object of class "LU", see LU; this is a representation of a triangular decomposition of x.

Details

This is a generic function with special methods for different types of matrices. Use methods("lu") to list all the methods for the lu generic.

The method for class dgeMatrix is based on LAPACK's "dgetrf" subroutine.

Currently, there is no method for sparse matrices, but for sparse positive-definite ones, chol is available.

References

Golub, G., and Van Loan, C. F. (1989). Matrix Computations, 2nd edition, Johns Hopkins, Baltimore.

See Also

Class definition LU and function expand; qr, chol.

Examples

Run this code
x <- Matrix(rnorm(9), 3, 3)
lu(x)

Run the code above in your browser using DataLab