The program receives a 3 x 3 matrix and computes the determinant and prints the results. The user provides the values for the matrix.
We compiled the program using Dev-C++ 5.0 compiler, but you can use a different compiler such as Turbo C++ 3.0.
You must be familiar with the concept of the matrix and its determinant to understand this example. See the problem definition section for a brief introduction.
Learn following C programming concepts before you learn the example.
The determinant of a 3 x3 matrix is easy to calculate. Before we dive into the code, let’s understand the procedure to calculate the determinant of a 3 x 3 matrix.
Suppose you are given a 3 x3 matrix like one given below.
The next step is to find the co-factor of A11, A21 and A31.