Determinate of a Matrix of any (square) order

  • Level: Undergrad 
  • Thread starter Thread starter sciwizeh
  • Start date Start date
  • Tags Tags
    Matrix Square
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 3K views
sciwizeh
Messages
25
Reaction score
0
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?
 
Physics news on Phys.org
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 [tex]\det(A) = A_{1,1} A_{2,2} \cdots A_{n,n}[/tex] (the product of the diagonal entries of A).

But maybe you'll enjoy this paper http://www.axler.net/DwD.pdf :)
 
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.