3x3 matrix

What help do you need? Do you know mathematically how to calculate the determinate of a 3x3 matrix by using determinates of associated 2x2 matrices? Can you define a 3x3 matrix in the program and populate it from data entered by the user? Can you obtain the required 2x2 matrices from the entered 3x3 matrix in the program? Given a 2x2 matrix, can you write the code to determine the determinant? Have you designed the program specifying required functions, algorithms etc etc?

Post your current code.
a11 ( a22 a33 - a23 a32 ) + a12 ( a23 a31 - a21 a33 ) + a13 ( a21 a32 - a22 a31 )

(Expansion by cyclic permutation because it's easier to check. Alternative approach reverses the outside sign of the middle term and flips the terms in the bracket.)

Watch out for zero-based arrays in c++!
Last edited on
Topic archived. No new replies allowed.