Skip to main content
Best answer by Werner_E

Just the determinant?

So how about a small modification in Alvaro's RREF?

Werner_E_0-1680316267529.png

Sure could be done more efficient, but for a quick hack it seems to work OK. No error  check (matrix square, etc.) is done. I simply changed the program to return 0 if no suitable pivot element could be found.

It also works symbolically, at least as long as only numbers are used. It fails symbolically when variables are used because the if-conditions can't be evaluated symbolically without knowing their actual values.

 

2 replies

ttokoro
21-Topaz I
21-Topaz I
March 30, 2023

Your code is ok. But your data A is not able to make A^-1 because the 0 0 3 9 and 0 0 5 15 are same.

ttokoro_0-1680219369354.png

 

 


image.pngimage.pngimage.pngimage.pngimage.png

t.t.
lvl10720-TurquoiseAuthor
20-Turquoise
March 31, 2023

Many thanks for your response, Ttokoro. My Mathcad 15 with your code is the following :

I.PNG

 

                                                    ___

 

II.PNG

  

     But I still got stuck to keep going to write a code for symbolic evaluate a DETERMINANT of a matrix above. My question is "How to write a code for SYMBOLIC evaluate a DETERMINANT of a matrix and with a Gauss-Jordan method or any other idea."

    Best Regards.

         Loi.

lvl10720-TurquoiseAuthor
20-Turquoise
March 31, 2023

   And a similar code using Gauss-Jordan method, in the forum, is :

 

III.png

 

 

  But I would like to have a symbolic evaluate result is : ==> 0

Werner_E25-Diamond IAnswer
25-Diamond I
April 1, 2023

Just the determinant?

So how about a small modification in Alvaro's RREF?

Werner_E_0-1680316267529.png

Sure could be done more efficient, but for a quick hack it seems to work OK. No error  check (matrix square, etc.) is done. I simply changed the program to return 0 if no suitable pivot element could be found.

It also works symbolically, at least as long as only numbers are used. It fails symbolically when variables are used because the if-conditions can't be evaluated symbolically without knowing their actual values.

 

lvl10720-TurquoiseAuthor
20-Turquoise
April 1, 2023

2.png

 

   I really appreciate your time and help, Werner. ðŸ˜Š ðŸ¤” ðŸ™„ especially your explanation. 

And I guess now it's time keep going with Alvaro's RREF and modify his CODE for inverse of a square matrix. ( I guess I would still be helped more ... ).

 Thanks again,

    Best Regards.

        Loi. 

lvl10720-TurquoiseAuthor
20-Turquoise
April 1, 2023

A small modification in Tom Gutman's det( ) ?

 

3.png

 

for symbolic evaluate result.