[R] ginv vs. solve

Angel angel_lul at hotmail.com
Thu Aug 7 13:32:40 CEST 2003


Why do
x<-b%*%ginv(A)
and
x<-solve(A,b)
give different results?. It seems that I am missing some basic feature of
matrix indexing.
e.g.:

A<-matrix(c(0,-4,4,0),nrow=2,ncol=2)
b<-c(-16,0)
x<-b%*%ginv(A);x
x<-solve(A,b);x

Thanks in advance,
Angel




More information about the R-help mailing list