Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R right matrix division

What's the most succinct, fastest, most numerically stable, most R-idiomatic way to do left and right matrix division in R? I understand left division inv(A)*B is usually done with solve(a,b), but how about B*inv(A)? Is the best way really to compute t(solve(t(A),t(B)))?

like image 448
bright-star Avatar asked Nov 21 '13 09:11

bright-star


1 Answers

It is B %*% solve(A), because solve(A) finds the inverse of A.

like image 194
Julius Vainora Avatar answered Sep 24 '22 07:09

Julius Vainora