MATLAB: How can we perform 6×6 matrix without values to find the inverse and determination

MATLABmatrix

to create a 6×6 matrix and find the inverse and determination of the above matrix without any values
x=[a(1,1) a(1,2) a(1,3) a(1,4) a(1,5) a(1,6);
a(2,1) a(2,2) a(2,3) a(2,4) a(2,5) a(2,6);
a(3,1) a(3,2) a(3,3) a(3,4) a(3,5) a(3,6);
a(4,1) a(4,2) a(4,3) a(4,4) a(4,5) a(4,6);
a(5,1) a(5,2) a(5,3) a(5,4) a(5,5) a(5,6);
a(6,1) a(6,2) a(6,3) a(6,4) a(6,5) a(6,6)]
to find
| X | = ?
X-inv = 1/| X | (adj X)

Best Answer

You can do that using the Symbolic Math Toolbox. And you can check wether you have this toolbox or not using the simple command :
ver
If you do have it, then you have to define the arguements a(i,j) in slightly different manner using the underscore characters instead of comma, i.e. :
syms a_1_1 a_1_2 a_1_3 a_1_4 a_1_5 a_1_6
syms a_2_1 a_2_2 a_2_3 a_2_4 a_2_5 a_2_6
syms a_3_1 a_3_2 a_3_3 a_3_4 a_3_5 a_3_6
syms a_4_1 a_4_2 a_4_3 a_4_4 a_4_5 a_4_6
syms a_5_1 a_5_2 a_5_3 a_5_4 a_5_5 a_5_6
syms a_6_1 a_6_2 a_6_3 a_6_4 a_6_5 a_6_6
then redefine our matrix X using these arguements:
X = [a_1_1 a_1_2 a_1_3 a_1_4 a_1_5 a_1_6;...
a_2_1 a_2_2 a_2_3 a_2_4 a_2_5 a_2_6;...
a_3_1 a_3_2 a_3_3 a_3_4 a_3_5 a_3_6;...
a_4_1 a_4_2 a_4_3 a_4_4 a_4_5 a_4_6;...
a_5_1 a_5_2 a_5_3 a_5_4 a_5_5 a_5_6;...
a_6_1 a_6_2 a_6_3 a_6_4 a_6_5 a_6_6]
Then simply use the inv and det commands to determine what you seek for:
X_det = det(X);
X_inv = inv(X);
Keep in mind that the inverse answer will be very long and may extened beyond the matlab command window allowable space.