QT {mgcv} | R Documentation

## QT factorisation of a matrix

### Description

If A is an r by c matrix, where r<c, then it can be factorised: AQ=[0,T] , where Q is an orthogonal matrix and T is reverse lower triangular. The first c-r columns of Q from an orthogonal basis for the null space of A. Q is returned as a sequence of r Householder rotations (from the right), as described below.

### Usage

    QT(A)

### Arguments

`A` | is an R matrix having more columns than rows

### Details

This function is primarily useful for providing the null space of the linear constraint matrix C, from the linear constraints Cp=0 , as a series of Householder rotations of the form used internally by `mgcv()`. It does not need to be called to set up a problem for solution by mgcv.

### Value

The returned matrix R, say, is of the same dimension as the input matrix A. Each of its rows contains a vector, u_i , defining one Householder rotation, H_i = (I - u_i u_i') . The orthogonal matrix Q is defined by: Q=H_1 H_2 ... H_r .

### Author(s)

Simon N. Wood simon@stats.gla.ac.uk

### References

Gill, Murray and Wright (1981) Practical Optimization, Academic Press

### Examples

    set.seed(0)
    y<-rnorm(12,1,1)
    A<-matrix(y,2,6)
    B<-QT(A)

[Package Contents]