How to find Inverse of a matrix of 3x3? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to find Inverse of a matrix of 3x3?

do it for me

31st Jan 2017, 11:37 AM
Bilal Ahmed
Bilal Ahmed - avatar
1 Answer
0
1. Create a programm that calculates the determiant (not really challenging when you just use 3x3 matrices). 2. Check if your matrix is invertible. You do this by checking if the determinant is 0 or not. 3. If it is invertible, calculate the inverse by using a formula beginning with 1/det(A), check it in the internet. Remarks: 1. I would implement the whole thing using templates. 2. I would use the C++11 container std::array<T,n>. If you know the concrete size there is no need for using std::vector<T>
31st Jan 2017, 11:59 AM
~datell