Post Reply 
Pivot-ing of matrix does not work
06-27-2024, 05:50 AM (This post was last modified: 06-27-2024 05:55 AM by jte.)
Post: #8
RE: Pivot-ing of matrix does not work
(06-27-2024 05:27 AM)parisse Wrote:  
(06-25-2024 09:33 PM)jte Wrote:  (Some might teach a Gaussian elimination of this form, but many do not, in introductory linear algebra courses.)
Unfortunately most math teachers ignore the most efficient way to reduce integer matrices by hand. They make a linear combination like this (I assume for simplicity that the matrix is not singular and pivots are on the diagonal):
M[j]=M[j]-M[j][j]/M[pivotline][j]*M[pivotline]
This will introduce fractions, therefore take more time to compute, and it raises the risk to make a computation error.

The more efficient method is called Gauss-Bareiss, it works like this:
M[j]=(M[pivotline][j]*M[j]-M[j][j]*M[pivotline])/(pivot_used_to_reduce_previous_column)
It does not introduce fractions while keeping coefficients not too large.
Addtionally, if you are using reduction to compute a determinant, then run Gauss-Bareiss under the diagonal, once reduced, the determinant is the last diagonal coefficient.

Big GrinBig GrinBig Grin & here I was... resisting... resisting... resisting... mentioning Bareiss. Wink Yes, it's a standard way to control the growth of integer matrix elements during elimination. So it's great you brought it up Smile You gave me a good laugh (much appreciated!) tonight! Smile I'm glad I resisted!

(Post edited as I had U+1F602 [FACE WITH TEARS OF JOY] instead of Big Grin, but it seems such emoji can't be included directly in posts. Too much joy for mybb to encode succinctly?)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Pivot-ing of matrix does not work - DG7RBN - 06-25-2024, 03:33 PM
RE: Pivot-ing of matrix does not work - jte - 06-27-2024 05:50 AM



User(s) browsing this thread: 2 Guest(s)