[R] Matrix decomposition: orthogonal complement

Simon Wood simon at stats.gla.ac.uk
Tue Nov 2 15:18:31 CET 2004



> How I can compute in R the orthogonal complement of  one matrix?

use the qr decomposition. For example:

A<-matrix(rnorm(40),10,4)
B <- t(qr.Q(qr(A),complete=TRUE)[,5:10])
B%*%A

best,
Simon


> 
> If  A (n x m ) matrix of full column rank (n>m), its orthogonal complement is
> denoted by A_ .
> 
> A_  is  n X (n-m) matrix of full column rank and such that A'A_=0.
> 
> I  need to compute A_.   How I can compute A_ in R?
> 
> Best Regards,
> /Florin
> 
> -- 
> Florin G. Maican
> Ph.D. candidate, Department of Economics
> School of Economics and Commercial Law
> Gothenburg University, Sweden
> E-mail: Florin.Maican at handels.gu.se
> P.O.Box 640 SE-405 30 Gothenburg, Sweden Phone no +46 31 773 4866
> Fax no +46 31 773 4154
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list