HP Forums
RREF with complex numbers not working properly - 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: RREF with complex numbers not working properly (/thread-19147.html)



RREF with complex numbers not working properly - AnalogJoe - 11-15-2022 03:20 PM

I have a singular matrix with complex numbers:

first row: [-0.3-0.6i, -0.6]
second row: [0.75, 0.3-0.6i]

if I use RREF with my Prime I get the identity matrix, which is not correct, making the same input in Matlab gives me the correct result which is [1, 0.4-0.8j; 0, 0].

Any ideas?


RE: RREF with complex numbers not working properly - roadrunner - 11-15-2022 11:27 PM

Try:

rref([[−0.3-0.6*i,−0.6],[0.75,0.3-0.6*i]],1)

-road


RE: RREF with complex numbers not working properly - AnalogJoe - 11-16-2022 05:03 AM

(11-15-2022 11:27 PM)roadrunner Wrote:  Try:

rref([[−0.3-0.6*i,−0.6],[0.75,0.3-0.6*i]],1)

-road

It worked! may I ask what is the ,1 for?


RE: RREF with complex numbers not working properly - roadrunner - 11-16-2022 12:48 PM

It's the number of columns that the reduction is done on. I attached the relevent info from the xcas manual.

-road

[attachment=11432]


RE: RREF with complex numbers not working properly - roadrunner - 11-16-2022 12:52 PM

Hmmm, it appears tha in exact mode you don't need the 1:

rref([[(-3-6*i)/10,-6/10],[75/100,(3-6*i)/10]])

also works.

-road


RE: RREF with complex numbers not working properly - AnalogJoe - 11-17-2022 11:11 PM

Thank you! I will take a look.