cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Matrix Inverse

ChadG.
1-Newbie

Matrix Inverse

What is the difference between finding a matrix using symbolic processor and using =

I was trying to evaluate the inverse of TM

It worked when I used the symbolic however it did not converge when I used numeric evaluation or =

Matrix-Inverse.JPG

According to literature, this matrix should be evaluated using Gauss elemination.

5 REPLIES 5
VladimirN
24-Ruby II
(To:ChadG.)

Hello!

Could you attach your Mathcad file?

RichardJ
19-Tanzanite
(To:ChadG.)

The symbolic processor does not work the same way the numeric processor does. It's designed to manipulate expressions. If the input expression contains only integers then the output expression will contain only integers, and the solution is exact. If the input expression contains floating point numbers then it uses arbitrary precision arithmetic to calculate the output expression. The default precision is 20 decimal places, but you can change that using the float keyword (i.e. the float keyword does not just change the precision of the displayed result, it changes the precision used for the calculations!).

Gaussian elimination is used by the numeric processor. I don't know how the symbolic processor does it.

If I understand correctly. This means the symbolic processor calculated an approximate solution however the numeric could not reach a convergence since it requires higher precision!

It is weird that the numeric uses Gauss elmination since this is the recommended way of solving it (according to literature)

Please find attached mathcad files

RichardJ
19-Tanzanite
(To:ChadG.)

If I understand correctly. This means the symbolic processor calculated an approximate solution

No. The symbolic processor does not calculate the inverse the same way as the numeric processor. I said I didn't know how it did calculate it, but that was a dumb statement on my part. It does it the same way it does everything, which is by first rearranging the expression (i.e. symbolic math), and then simplifying (although maybe in practice it does this in more than just two stages; I'm not sure about that). So as a simpler example for a 3x3 matrix, see the attached worksheet. First it rearranges the expression. The fact that in your case the elements of the expression are floating point numbers is irrelevant. Then is simplifies. During the simplification step, since you have floating point numbers, it calculates each element of the inverse matrix using 20 digits of precision. You could increase or decrease that precision using the float keyword.

however the numeric could not reach a convergence since it requires higher precision!

It's not a question of what is required. The numeric processor uses about 16 digits of precision. That's what is available to it. According to the help it calculates the inverse using LU decomposition, which is a modified form of Gaussian elimination.

Anyway, the point is moot because the inverse is not the problem. It can't converge when it tries to calculate TM(n). If you right click and trace the error you will find it can't calculate one of the derivatives (not enough time to figure out why; sorry).

It is weird that the numeric uses Gauss elmination since this is the recommended way of solving it (according to literature)

If it's the recommended way of solving it why do you think it's weird that that's the way it does it?

VladimirN
24-Ruby II
(To:ChadG.)

Chad,

You can also read about the "inverse of a matrix" using Help in Mathcad ("Mathcad Help", key F1).

Top Tags