3 ms·
You calculate the factorization (QR, LU, or similar), but you never calculate the inverse of the factorization: A x = b A => QR # QR decomposition
by donuteaters 10y ago
You calculate the factorization (QR, LU, or similar), but you never calculate the inverse of the factorization:
A x = b
A => QR # QR decomposition
Q R x = b
R x = Q' b # Q is inverted by transposing
x = backsubstitute(R, Q' b)
Q was the transpose of it's inverse, and so you don't get any rounding error when you transpose it. R didn't need to be inverted because it was in a form where back substitution lets you apply the inverse of R to be without needing the inverse of R.
- deleted 10y ago[deleted]
- pramodliv1 10y agoMATLAB's linsolve uses your strategy! (http://in.mathworks.com/help/matlab/ref/linsolve.html http://in.mathworks.com/help/matlab/ref/linsolve.html)
- ryanmonroe 10y agoLinear models in R are also solved by QR factorization.