1

I'm trying to invert a matrix with some symbolic variables, but Matlab just returns 'FAIL'. I'm using inv(K). This is K that Matlab outputs after some computation:

K = 

[  11/80,   7/80, -11/80,  -7/80, 0, 0]
[   7/80,  11/80,  -7/80, -11/80, 0, 0]
[ -11/80,  -7/80,  11/80,   7/80, 0, 0]
[  -7/80, -11/80,   7/80,  11/80, 0, 0]
[      0,      0,      0,      0, 0, 0]
[      0,      0,      0,      0, 0, 0]

invK = inv(K);

FAIL

Note that my matrix in my script looks like this (for example):

K = [1,2,3;
     3,2,1;
     1,1,1];
Amro
  • 123,847
  • 25
  • 243
  • 454
user1114864
  • 1,734
  • 6
  • 26
  • 37
  • you use this format for defining a matrix or just did for representation purposes? I think you matrix definitions is not formal for Matlab, or am I wrong? – tartar Mar 29 '12 at 04:26
  • This is what Matlab outputs. See edit for what the matrix in my script looks like. – user1114864 Mar 29 '12 at 05:00

2 Answers2

5

That matrix is 6x6 but its rank is not more than three, therefore it is not invertible. Only full rank matrices can be inverted.

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
1

You could use pinv . It gives you the pseudo inverse. That might give you something. In case you are stuck with this and only this matrix. Else if you are learning about matrix inverses then you should go with the answer already here on the thread.

Sufiyan
  • 23
  • 4