In: Civil Engineering
Compute |A|, the determinant of A (note: rounding errors during computation may cause Matlab to return a value like 6.2137e-16 in place of 0; in such cases, write 0 as your answer; though not necessary, you can verify the answer by computing the value of the determinant by hand). State the Matlab function you use to compute the determinants.
Let the matrix be A
1 2 3
4 5 6
7 8 9
The row2 is a manipulation of R1 (R2 = R1+3) i.e., every element in row1 is added by 3 to get row2
Row3 is nothing but R3 = R1 +6 = R2+3 i.e every element of row2 added by 3 to get row3
The command used in the MatLab to obtain the determining of Matrix A is det(A) (Please observe the matlab code)
The below image shows the implementation of the determinant for the above matrix A.
The determinant in MatLab is -9.5162 * 10-16, which is almost zero.
This the MatLab code for computing the determinant
clear all
clc
A = [1 2 3;4 5 6;7 8 9];
a = det(A)
if a < 0.0005
a=0 % declaring the determinant as zero when the determinant is
less than 0.0005
end
By hand determinant is computed as follows
When the rank of the matrix is not equal to the size of the matrix, then a few rows are linearly dependent, which shall not give a full rank.
Here this matrix is having a rank of 2 instead of 3.
I hope you have understood.
All the BEst.!
Please do mention your questions in the comments section.