Skip to Content

Null {MASS}

Null Spaces of Matrices
Package: 
MASS
Version: 
7.3-26

Description

Given a matrix, M, find a matrix N giving a basis for the null space. That is t(N) %*% M is the zero and N has the maximum number of linearly independent columns.

Usage

Null(M)

Arguments

M
Input matrix. A vector is coerced to a 1-column matrix.

Values

The matrix N with the basis for the null space, or an empty vector if the matrix M is square and of maximal rank.

References

Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.

See Also

qr, qr.Q.

Examples

# The function is currently defined as
function(M)
{
    tmp <- qr(M)
    set <- if(tmp$rank == 0) 1:ncol(M) else  - (1:tmp$rank)
    qr.Q(tmp, complete = TRUE)[, set, drop = FALSE]
}

Documentation reproduced from package MASS, version 7.3-26. License: GPL-2 | GPL-3