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))) ? 回答1: I don't have a solution better than B %*% solve(A) , but I did want to point out that in general solve(A,B) is faster and more numerically stable than solve(A) %*% B . > A = matrix(rnorm(10000),100,100) > B = matrix