limitations of cramer's rule

hanhao

Registered Member
i usually solve 3 unknown sim equations using cramer's rule because it's systemic and fast, however today i encountered an equation that cramer's rule failed against age old tradition elimination and substitution method

-2A + B = -2
-2A - B - C = -4
2A - 3B - C = 0

usually i dont get nice interger numbers like that...
- how do i determine if a set of equations will fail to cramer's rule?
- any other helpful comments ?
 
AndersHermansson said:
I don't think Cramers Rule will fail if the determinant of the system is nonzero.

In this case the determinant is exactly zero.

Cramer's Rule also 'fails' when the determinant is close to zero. The computed answers can be very far from the correct answers because of loss of precision (e.g., 1.0 + 1e-16 = 1.0 on most computers). I never use Cramer's Rule because it is very susceptible to round-off errors and it doesn't tell me whether or not the answer is suspect (unless of course the determinant is exactly zero, in which case Cramer's Rule crashes and burns).

There are a lot of good canned packages for solving linear algebra problems.

None of them use Cramer's Rule.
 
hanhao said:
what methods do you use?
care to recommend?

gaussian elimination?

Matrix inversion and various decomposition methods such as LU, Cholesky, QR, and SVD. The last one (SVD) is the ugliest piece of math code I have ever seen. But that is what I prefer to use should I have any doubts about lurking degeneracies.
 
Back
Top