Learn R Programming

lmreg (version 1.2)

intsectbasis: Basis of intersection of two column spaces

Description

Computes an orthonormal basis of the intersection of column spaces of two given matrices.

Usage

intsectbasis(A, B, tol1=sqrt(.Machine$double.eps), tol2=sqrt(.Machine$double.eps))

Arguments

A

First matrix.

B

Second matrix with identical number of rows.

tol1

A relative tolerance to detect zero singular values while computing generalized inverse, in case the matrix concerned is rank deficient (default = sqrt(.Machine$double.eps)).

tol2

A tolerance to detect if there is any non-zero singular value of a 'parallel sum' matrix, without which the intersection space is null (default = sqrt(.Machine$double.eps)).

Value

Returns a semi-orthogonal matrix with columns forming an orthonormal basis of the intersection of the column spaces of A and B.

References

Sengupta and Jammalamadaka (2019), Linear Models and Regression with R: An Integrated Approach.

Examples

Run this code
# NOT RUN {
A<-matrix(2,3,5)
B<-matrix(3,3,2)
intsectbasis(A,B, tol1=sqrt(.Machine$double.eps), tol2=1e-14)
# }

Run the code above in your browser using DataLab