i need help please!!!!!!!!!!!!!!
Write a program that finds the inverse matrix to the given matrix of size 3x3.
In the calculation you need the function to calculate the determinant of the matrix 3x3. This matrix A = [[a, b, c], [d, e, f], [g, h, i]] is given by the formula
detA = a*e*i+b*f*g+c*d*h-a*f*h-b*d*i-c*e*g.
In the calculation you will also need Transposed matrix of cofactors. This is for matrix A = [[a, b, c], [d, e, f], [g, h, i]] is defined as:
Acoftran = [[e*i-f*h, c*h-b*i, b*f-c*e], [f*g-d*i,a*i-c*g,c*d-a*f],[d*h-e*g,g*b-a*h,a*e-b*d]]
The inverse matrix is calculated by the following formula:
Ainv = (1/detA) * Acoftran
The formula above says that we need each item in the Acoftran multiplied by the number (1/detA). When the determinant is equal to 0, then the inverse matrix does not exist? This should be checked and display the appropriate message.
The outcome should be all numbers displayed with two decimals. Make the most beautiful display.
INVERSE MATRIX
Enter 3x3 matrix - the first line:
first number: 0
second number: 2
third number: 4
Enter 3x3 matrix - second line:
first number: 1
second number: 2
third number: 2
Enter 3x3 matrix - third line:
first number: 2
second number: 2
third number: 2
You entered the following matrix:
0 2 4
1 2 2
2 2 2