# Determinate of a Matrix of any (square) order

1. Aug 21, 2008

### sciwizeh

Hello, I'm new to this site.

I am trying to write a program that will deal with matrices, my problem is in finding a determinate, it would be easy if I limit the usage to 2x2 and 3x3, for which I already know the algorithms. I think that limiting the usage in that way would limit the usefulness of the program. Is there an "easy to program" algorithm for an nXn matrix? I saw something about getting it to upper triangle and multiplying the diagonal numbers together does this work for all matrices?

2. Aug 21, 2008

### NoMoreExams

I believe so: http://en.wikipedia.org/wiki/Determinant, you can find this quote:

If A is a triangular matrix, i.e. A_{i,j} = 0 \, whenever i > j or, alternatively, whenever i < j, then $$\det(A) = A_{1,1} A_{2,2} \cdots A_{n,n}$$ (the product of the diagonal entries of A).

But maybe you'll enjoy this paper http://www.axler.net/DwD.pdf :)

3. Aug 21, 2008

### sciwizeh

Thanks. That wikipedia article was kind of confusing, at least for me. OK that means I just need to make the program do Gaussian Elimination, which shouldn't be too hard, I hope.