Post Reply 
HP-41 and 42s: AIP with or without sign?
06-08-2018, 11:45 PM
Post: #18
RE: HP-41 and 42s: AIP with or without sign?
(06-08-2018 01:17 PM)Ángel Martin Wrote:  Right now I have a 50-step short FOCAL program that calculates determinants of 2x2 and a 3x3 Complex Matrices. Working on the 4x4 case as we speak... [...] It uses the expressions based on the matrix Trace and integer powers; granted it's a round-about way to skin this cat bu the code efficiency and speed are unbeatable. Unfortunately there's no expression for the general "n" case, I wonder if such a formula would exist at all or if it's just a pipe dream.

Of course it does exist, the very link you include to the Wikipedia article gives the particular cases for 2x2, 3x3 and 4x4 and also the general formula. However, it gets very unwieldy very soon, beginning with 5x5, and so it ceases to be a feasible solution, the coefficients are difficult to obtain and the number of terms in the summation and the matrix powers required increase very quickly.

If I were to do it, I'd use the exact formula for 2x2 (2 multiplications and 1 subtraction), recursive expansion by minors for 3x3 (three 2x2 determinants), 4x4 (four 3x3 determinants = twelve 2x2 determinants ) and 5x5 (five 4x4 determinants = sixty 2x2 determinants) matrices, and LU-decomposition for 6x6 and beyond.

There's also the case of computing an exact integer determinant for integer matrices. As this is digressing way too far from the original subject of this thread ("HP-41 and 42s: AIP with or without sign?") I suggest you create a new thread to discuss the subject, if interested, and I'll contribute to it.

Best regards and have a nice weekend.
V.
.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-41 and 42s: AIP with or without sign? - Valentin Albillo - 06-08-2018 11:45 PM



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