Post Reply 
[VA] SRC #015 - HP-15C & clones: Big NxN Matrix Inverse & Determinant
09-07-2023, 07:15 PM
Post: #16
RE: [VA] SRC #015 - HP-15C & clones: Big NxN Matrix Inverse & Determinant
 
Hi, Jean-François,

(09-05-2023 11:19 AM)J-F Garnier Wrote:  Let's see how to solve a complex 6x6 system using Valentin's core code and a few glue commands: [...]

Really admirable, solving a 6x6 complex system of equations with such ease by using my matrix inversion routine plus a few commands executed directly from the keyboard and above all, lots of ingenuity. Very well done, J-F, thanks for sharing.

Quote:I would like very much to have a way to compute the determinant of a complex matrix in partitioned form. But I don't see any way to do it easily.

Determinants are overrated Wink. Other than being used to check whether a matrix is singular or to check the resultant of two polynomials or to solve a system using Cramer's rule, I don't know of many practical uses let alone uses of determinants of complex matrices, and the ones I've just mentioned are quite inefficient and best tackled using other means. Besides, usually you just need to check if it's zero or not, or at most its absolute value (condition numbers, etc.)

That said, computing the absolute value (modulus) of the determinant of a complex matrix is fairly trivial using partitioned real matrices, like this:

Let's have an NxN complex square matrix M = A + iB, where A, B are real square matrices holding the real/imaginary parts, respectively, of its elements. If we then construct this familiar 4-block partitioned real matrix
      M' = | A  -B |
           | B   A |

then SQR(DET(M')) is the absolute value of DET(M). Let's see a numeric example taken from here:
    We have
            | ( 1, 2) ( 2,  3) ( 3,  1) |    DET(M) = (44, -6)
        M = | (-1, 2) ( 2, -1) (-1, -1) | , 
            | ( 0, 3) (-2,  0) ( 2,  2) |    ABS((44,-6)) = 44.4072066223
    Now
                        |  1   2   3 |       | 2   3   1 |
        M = A + iBA = | -1   2  -1 | , B = | 2  -1  -1 |
                        |  0  -2   2 |       | 3   0   2 |
    So
                         |  1   2   3  | -2  -3  -1 |
                         | -1   2  -1  | -2   1   1 |    DET(M') = 1972
        M' = | A  -B | = |  0  -2   2  | -3   0  -2 | ,
             | B   A |   |  2   3   1  |  1   2   3 |    SQR(1972) = 44.4072066223
                         |  2  -1  -1  | -1   2  -1 |
                         |  3   0   2  |  0  -2   2 |

    which perfectly agrees and it's trivial to code for the HP-15C. Not exactly what you wanted but it might be a start for your ingenuity Smile.
Best regards.
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: [VA] SRC #015 - HP-15C & clones: Big NxN Matrix Inverse & Determinant - Valentin Albillo - 09-07-2023 07:15 PM



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