Skip to main content
19-Tanzanite
January 23, 2023
Question

Determinat of a Matrix Mathcad Prime 8 Strange Result

  • January 23, 2023
  • 1 reply
  • 4532 views

Hello,

 

CornelBejan_0-1674463934154.png

CornelBejan_1-1674463944323.png

 

Mathematica result:

CornelBejan_3-1674464026036.png

 

Maple result:

CornelBejan_4-1674464068837.png

 

Mathcad 11 result:

CornelBejan_5-1674464192543.png

 

Mathcad 15 result:

CornelBejan_6-1674464370601.png

 

Mathcad Prime 8 result:

CornelBejan_2-1674463970608.png

 

Why does Mathcad Prime give such a result when calculating the determinant of that matrix? Is this some bug from prime? or?


Mathcad Prime 8 file attached.

1 reply

25-Diamond I
January 23, 2023

In Maple you have a typo - first row, second column

Cornel19-TanzaniteAuthor
19-Tanzanite
January 23, 2023

CornelBejan_0-1674479226785.png

Did not influence pretty much...

Anyway, strange how Mathcad Prime calculates this determinant...

25-Diamond I
January 24, 2023

Here is my attempt for a function to calculate the determinant of a square matrix.

First we define utility functions to delete rows and columns of a matrix

Werner_E_0-1674526543977.png

Then the determinant is calculated by Lagrange expansion after the first column - done recursive until we arrive at an 1x1 matrix

Werner_E_1-1674526616732.png

I haven't tested thoroughly, but it seems to work quite well, BUT ... its VERY SLOW when evaluated symbolically!!

Furthermore something like "simplify" or "expand" is necessary as otherwise the result isn't really nice 😉

Werner_E_2-1674526755351.png

 

Have fun and use at your own risk!

 

EDIT: Added an alternative function to delete rows (and columns) which avoids the slow "submatrix" function but it did not speed up the calculation.