I have a 520 x 520
mat
matrix with 2
on the diagonal and 1
off-diagonal. If I do inv(mat)*mat
, I do not get an identity matrix. I get 1
on the diagonal but -0.000000001, -0.000000002, or 0.000000004. Why is that?
Asked
Active
Viewed 19 times
0

Plug4
- 3,838
- 9
- 51
- 79
-
Take a look at the answer in the duplicate I have linked. You will see why `inv(mat)*mat` is not desired, and that you should really be using `mat \ mat` instead (which should give you identity). – rayryeng Jan 28 '15 at 06:49
-
Oh I see! thanks for answer and sorry for the duplicate. – Plug4 Jan 28 '15 at 06:56
-
Not a problem at all :) This is a common question that people ask. I marked it as a duplicate so that people who come here will know the answer immediately. I had to do a bit of digging to find it. No need to apologize! Good luck! – rayryeng Jan 28 '15 at 07:03