Pivot-ing of matrix does not work
|
06-25-2024, 03:33 PM
Post: #1
|
|||
|
|||
Pivot-ing of matrix does not work
pivot(matrix,n,m) throws an error message: "Error: Bad Argument Type".
Even the simple example from the "Help" or the manual p.527 does not work !?! Any ideas or is it a bug ? (SW version 2023 04 13) Regards Andreas |
|||
06-25-2024, 04:01 PM
Post: #2
|
|||
|
|||
RE: Pivot-ing of matrix does not work
It only works when 'Exact' mode is turned on in CAS settings (checked in VC 14425).
- neek |
|||
06-25-2024, 09:33 PM
Post: #3
|
|||
|
|||
RE: Pivot-ing of matrix does not work
While the type of operation pivot is doing is certainly entirely appropriate in some problem domains (when you don't have division, or are wanting to avoid it), I would think this too often runs counter to the assumptions (/ teachings) of introductory linear algebra courses (when using the phrase “Gaussian elimination” and the matrices are matrices of real numbers). So it would seem that something should be adjusted here. (At a minimum, perhaps just the help text.) (Some might teach a Gaussian elimination of this form, but many do not, in introductory linear algebra courses.)
|
|||
06-26-2024, 06:36 AM
Post: #4
|
|||
|
|||
RE: Pivot-ing of matrix does not work
Ok, let's divide by the pivot after linear combination.
|
|||
06-26-2024, 02:03 PM
Post: #5
|
|||
|
|||
RE: Pivot-ing of matrix does not work
@neek: Thank you very much for the quick answer. It works also with V14730.
@Jeff: As you stated, a hint in the help file / manual would have instantly solved the problem. The "good ol' HP49G" even warns you with a beep when CAS wants you to use exact calculation. It's a shame that the last edition of the manual of a top notch pocket calculator is now SEVEN years old. At the Moravia web site the manual to download is even NINE years old... and no perspective for an update. Thanks Andreas |
|||
06-26-2024, 03:08 PM
Post: #6
|
|||
|
|||
RE: Pivot-ing of matrix does not work
Though it does not help in this case, even the hp folks said that the help system was way more current than the manual.
|
|||
06-27-2024, 05:27 AM
Post: #7
|
|||
|
|||
RE: Pivot-ing of matrix does not work
(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. |
|||
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): & here I was... resisting... resisting... resisting... mentioning Bareiss. Yes, it's a standard way to control the growth of integer matrix elements during elimination. So it's great you brought it up You gave me a good laugh (much appreciated!) tonight! I'm glad I resisted! (Post edited as I had U+1F602 [FACE WITH TEARS OF JOY] instead of , but it seems such emoji can't be included directly in posts. Too much joy for mybb to encode succinctly?) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)