HP Forums
Matrices - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Matrices (/thread-20629.html)



Matrices - Quadratica - 10-11-2023 12:11 AM

In CAS mode I entered elements into a matrix (2x2), some elements are irrational numbers (sqrt(2) etc). when I perform operations on the matrix the output is in decimal form. Is there some way to display the resultant matrix with exact terms ?

Thank you.


RE: Matrices - komame - 10-11-2023 06:08 AM

Show an example and a screenshot. Without an example, it's hard to guess where the problem is on your end.

Piotr


RE: Matrices - Quadratica - 10-11-2023 11:43 AM

Image attached.


RE: Matrices - komame - 10-11-2023 12:02 PM

The problem arises from the fact that you used the M1 variable, which is a built-in global variable for HOME (not CAS), and it only stores numerical values in matrices. Create your own variable, e.g. "mat1" (preferably in lowercase, as is customary in CAS, though uppercase would also work) and do the same thing, and you'll see there won't be an issue. Alternatively, you can perform the calculations directly without using variables.


RE: Matrices - Quadratica - 10-11-2023 12:17 PM

Thank you komame, your suggestion works.