Hi guys.(adsbygoogle = window.adsbygoogle || []).push({});

So I got this assignment, where I have to create my own function, which can calculate the determinant of any n x n matrix.

The general formula we've been given is (recursive formula): [itex]det(A) = Sum[n,i=1] (-1)^{1+i} * a_{1 i} * det(A_{1 i})[/itex] where n is the length of the matrix.

The first lines are quite easy to compute: [itex]det(A) = Sum[n,i=1] (-1)^{1+i} * a_{1 i}[/itex]

However finding the determinant just seems like an impossible thing to do. It's fairly easy to calculate with a 2 x 2 matrix, but once it exceeds 2 x 2, you just get a new matrix instead of a number. I know you have to make some loop of some kind, but I just can't figure out how. We are, of course, not allowed to use the built in Det[...] function in any way. Otherwise it would had been completed in a few seconds

I know you have to use the recursive function inside the function, however that just brings up a million errores :)

So I hope there was some expert out there, who could give a hint or some help of some kind, so I get going with this assignment.

On the beforehand thanks.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Creating your own function Determinant in Mathematica

Loading...

Similar Threads - Creating function Determinant | Date |
---|---|

MATLAB help: Interpolating an array of data to create a function | Dec 29, 2012 |

Create function from a vector in matlab | Oct 25, 2012 |

Creating a general function handle | Aug 9, 2011 |

Create a function in MATLAB! | Jul 13, 2011 |

Creating a function from DSolve output | Jun 18, 2010 |

**Physics Forums - The Fusion of Science and Community**