how would I go about finding the determinant of a 5x5 matrix (not using a calc)
Printable View
how would I go about finding the determinant of a 5x5 matrix (not using a calc)
i'm not exactly sure, but i believe there's a general recursive-type way of finding any determinant:
Let total = 0;
Choose the first row.
For each number in that row, find the determinant of the smaller 4(n-1)x(n-1) matrix made up of the nxn matrix without the row and column the chosen number is in.
Find the determinant of this, and multiply this by the chosen number.
if the number is the 2nd/4th/6th etc in the row, take this product from total. If it is 1st/3rd/5th etc, add it.
The final total will be the determinant.
Code:| 1 2 3 4 5 |
| 2 3 4 5 6 | | 3 4 5 6 | | 2 4 5 6 |
| 5 4 3 2 1 | = 1 * | 4 3 2 1 | - 2 * | 5 3 2 1 | + 3 * ...
| 4 3 2 1 0 | | 3 2 1 0 | | 4 2 1 0 |
| 1 3 5 7 9 | | 3 5 7 9 | | 1 5 7 9 |
gausselimination.
take each row starting from the second and subtract a multiple of the first row to get 0 in the first column, then do so starting from the third row and subtrating a multiple of the second row to get 0 in the second column etc.. you should end up with an echelon matrix (upper right triangluar matrix), the determinant is the product of the diagonale (which should be 0 if there is any linearity).
A search of this forum will turn up more on Gauss elimination for solving linear equations, inverting a square matrix, and/or evaluating determinant. One thread has an attached VB program for Guass elimination.
The Kedaman version of Gauss is good for the detrminant evaluation because it avoids division by zero if the matrix is ill conditioned.
ok thanks, i need the work for this though, so im thinking of writing a vb app which will show all the work for me, but im not sure how im going to put it together yet