Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Gaussian elimination



At 08:50 PM 2/28/01 -0500, I wrote:
Inverting a 3x3 matrix isn't very hard. A fellow named Gauss had something
to say about it.

Let me expand on this a bit.

When I was in high school, somebody taught me to invert matrices using
Cramer's rule. AAAARRRRRRGGGGGGHHHHHHHHHHH!!!!!

This is a really, really terrible idea. It requires N^4 operations, and
has abysmal accuracy (because it usually requires finding the small
difference between large numbers).

In contrast, Gaussian elimination requires only N^3 operations, the
accuracy is incomparably better, and the logic of what you are doing is
clear. If you are clever about choosing the pivots the accuracy is even
better.

http://violet.csa.iisc.ernet.in/~saurabh/Algebra/node13.html

Bottom line: If you ever feel tempted to use (or to teach) Cramer's rule,
lie down until the feeling goes away.