Do we have to know Cramer's rule for the exam?
March 3, 2010 2:20 PM Subscribe
Why do people care about Cramer's rule?
OK, so I'm teaching linear algebra again, and this time I have lots of engineering students in my class, all of whom apparently are taught to use Cramer's rule to solve systems of equations [apparently derived from...some stuff...using some Laplace transforms or something. They're not totally clear and I don't do that kind of math much] and who are interested in seeing something about it in the (very pure math-y) linear algebra course they're required to take.
So, my question is why are they being taught to use Cramer's rule, instead of just row-reducing a matrix? Even for systems derived from Laplace transforms, where you've got some parameter in the coefficients, a computer algebra system should be able to row-reduce the matrix just fine (Mathematica doesn't seem to care), and for general solving of linear systems, row-reduction is cheap and easy (and has the advantage that it works even when you don't have an n x n system). Is it that back in the day, Cramer's rule was so much easier for hand-computation, and so that's just the way they've always done it? Or is there a way/situation in which using Cramer's rule really is computationally cheaper, in practice (as opposed to toy exam questions)?
In fact, any insights people have about how/whether engineers actually use Cramer's rule "in real life" would be appreciated.
Also, I have heard (and vaguely remember) there are places in which Cramer's rule really is useful theoretically. Any good examples folks have floating around?
OK, so I'm teaching linear algebra again, and this time I have lots of engineering students in my class, all of whom apparently are taught to use Cramer's rule to solve systems of equations [apparently derived from...some stuff...using some Laplace transforms or something. They're not totally clear and I don't do that kind of math much] and who are interested in seeing something about it in the (very pure math-y) linear algebra course they're required to take.
So, my question is why are they being taught to use Cramer's rule, instead of just row-reducing a matrix? Even for systems derived from Laplace transforms, where you've got some parameter in the coefficients, a computer algebra system should be able to row-reduce the matrix just fine (Mathematica doesn't seem to care), and for general solving of linear systems, row-reduction is cheap and easy (and has the advantage that it works even when you don't have an n x n system). Is it that back in the day, Cramer's rule was so much easier for hand-computation, and so that's just the way they've always done it? Or is there a way/situation in which using Cramer's rule really is computationally cheaper, in practice (as opposed to toy exam questions)?
In fact, any insights people have about how/whether engineers actually use Cramer's rule "in real life" would be appreciated.
Also, I have heard (and vaguely remember) there are places in which Cramer's rule really is useful theoretically. Any good examples folks have floating around?
Google's Cramer's rule...
Oh yeah, that crazy old thing. I never used it and I'm not sure why we had to know it. I did not take linear algebra though but took plenty of other advanced mathematics for my engineering degree. It isn't how you would solve a system in the computer generally and doesn't seem to simplify anything except for the 2x2 case (and who needs a 2x2 simplified?).
I always felt it was designed to teach the magic of the determinant but I never got that magic. It never popped into my head as a useful thing.
posted by chairface at 2:51 PM on March 3, 2010
Oh yeah, that crazy old thing. I never used it and I'm not sure why we had to know it. I did not take linear algebra though but took plenty of other advanced mathematics for my engineering degree. It isn't how you would solve a system in the computer generally and doesn't seem to simplify anything except for the 2x2 case (and who needs a 2x2 simplified?).
I always felt it was designed to teach the magic of the determinant but I never got that magic. It never popped into my head as a useful thing.
posted by chairface at 2:51 PM on March 3, 2010
When I was in engineering school (three years ago), Cramer's rule was useful solely for toy problems that had to be worked out by hand on an exam. As a practicing engineer, I just throw things at Matlab or LAPACK and consider it done.
posted by indubitable at 3:00 PM on March 3, 2010
posted by indubitable at 3:00 PM on March 3, 2010
For a 3x3 matrix, writing up the constituent matrices and doing determinants by diagonals is faster than row-reducing, when doing it by hand. Also, you don't have to carry fractions through the whole goddamn problem, like you often have to (or use large numbers) when row-reducing. On a 2x2, if it's in proper form, most engineers can do it in their heads.
Deriving Cramer's rule is just algebra. For ax +by=c and dx+ey=f, solve for x to get x=(c-by)/a. substitute that in to the other equation to get d[(c-by)/a)]+ey=f. Multiply through by a, and distribute to get cd-bdy+eay=fa. Rearrange to get y=(af-cd)/(ae-bd). this is the same, if you do the determinants, as |Ay|/|A|. Easy peasy. Works for parameters, whatever.
Row reduction always seemed so...ungainly...to me, and you don't know going in if it's going to be a long or a short one. Cramer takes the same amount of time.
posted by notsnot at 3:04 PM on March 3, 2010
Deriving Cramer's rule is just algebra. For ax +by=c and dx+ey=f, solve for x to get x=(c-by)/a. substitute that in to the other equation to get d[(c-by)/a)]+ey=f. Multiply through by a, and distribute to get cd-bdy+eay=fa. Rearrange to get y=(af-cd)/(ae-bd). this is the same, if you do the determinants, as |Ay|/|A|. Easy peasy. Works for parameters, whatever.
Row reduction always seemed so...ungainly...to me, and you don't know going in if it's going to be a long or a short one. Cramer takes the same amount of time.
posted by notsnot at 3:04 PM on March 3, 2010
Cramer's rule, as notsnot points out, is just a method that pre-computes the generalized solution so that all you have to do is plug in the numbers and and read out the answer. This is similar to the quadratic formula, which is just a generalized pre-computation of the method of completing the square. Using the quadratic formula is faster than completing the square. Likewise Cramer's rule is faster than row reduction.
posted by JackFlash at 3:36 PM on March 3, 2010
posted by JackFlash at 3:36 PM on March 3, 2010
Response by poster: JackFlash---do you know the conditions under which Cramer's rule is faster than row-reduction?
(assuming you have access to a computer)
I have heard a conjecture that if your matrices are sufficiently sparse, computing the determinants is less computationally expensive than row-reducing. I don't know if it's true.
I agree that if you're stuck doing everything by hand, Cramer's rule is easier for, say, systems that are 3x3 or smaller. But I'd rather row-reduce a 5x5 system by hand than use cofactor expansion to compute all those determinants!
indubitable---yeah, that was about what I figured. But I'm not an engineer, so it's nice to have confirmation.
posted by leahwrenn at 4:52 PM on March 3, 2010
(assuming you have access to a computer)
I have heard a conjecture that if your matrices are sufficiently sparse, computing the determinants is less computationally expensive than row-reducing. I don't know if it's true.
I agree that if you're stuck doing everything by hand, Cramer's rule is easier for, say, systems that are 3x3 or smaller. But I'd rather row-reduce a 5x5 system by hand than use cofactor expansion to compute all those determinants!
indubitable---yeah, that was about what I figured. But I'm not an engineer, so it's nice to have confirmation.
posted by leahwrenn at 4:52 PM on March 3, 2010
We care about Cramer's rule because it's a very simple way to solve 2x2 systems. And what would you know, 2x2 systems are really common in engineering homework problems! Many professors don't let you use MATLAB on HW assignments (particularly as an underclassmen), and basically none of them let you use it on tests (until grad school, anyway).
Rarely did I have to solve a matrix larger than a 3x3 by hand in school, and even those were pretty uncommon. When I solved matrices computationally, I didn't use row reduction or factorization either, as even those are too slow for practical matrices.
posted by !Jim at 9:06 PM on March 3, 2010
Rarely did I have to solve a matrix larger than a 3x3 by hand in school, and even those were pretty uncommon. When I solved matrices computationally, I didn't use row reduction or factorization either, as even those are too slow for practical matrices.
posted by !Jim at 9:06 PM on March 3, 2010
Just chiming in -- weaker students who cannot solve systems of equations using the other methods can almost always use Cramer's Rule successfully. I usually cover it when I teach College Algebra (though I usually just call it Magic) for this very reason.
posted by wittgenstein at 12:35 PM on March 4, 2010
posted by wittgenstein at 12:35 PM on March 4, 2010
This thread is closed to new comments.
In many math classes, they teach techniques like this. You learn it the hard way that requires lots of time, thinking, and effort . . . after you spend a lot of time on that they are all like "oh yeah, there is also an easy mode way of doing that is mindless and fast".
Just my opinion...
posted by milqman at 2:45 PM on March 3, 2010 [1 favorite]