In Mathematica, we can find the value of a determinant by the built-in function Det, but how can I find a value of a determinant like this one?
That seems to have some problems.
In Mathematica, we can find the value of a determinant by the built-in function Det, but how can I find a value of a determinant like this one?
That seems to have some problems.
This question in vague. What “problems” are you seeing? Provide details with code.
I am afraid there is no simple closed expression for the determinant:
mm[n_] := Table[If[i == 1, x^j, a[i - 1, j]^j], {i, 1, n}, {j, 0, n - 1}]
mm[3] // MatrixForm
Collect[Det[mm[4]], x]
I don’t know the code, I am looking for the codes which can calculate the determinant.
It’s a Vandermonde matrix. The determinant is the product of differences between elements in the second column (subtracting lower-row elements from higher.)
That’s true,but I want to know how can I calculate its value in Mathematica.
Make your matrix
mm[n_] := Table[If[i == 1, x^j, a[i - 1, i]^j], {i, 1, n}, {j, 0, n - 1}]
mm[3] // MatrixForm
and calculate its determinant
det[m_] := Product[
(m[[j, 2]] - m[[i, 2]]), {i, 1, Length[m] - 1}, {j, i + 1, Length[m]}]
Example
det[mm[5]] - Det[mm[5]] // Expand
The det-method is (of course) considerably faster
Timing[det[mm[10]];]
Timing[Det[mm[10]];]
But it can’t calculate mm[n],can it?
What result do you expect, if you are not providing the actual matrix input?
Are you kidding? What do you expect?
The general determinant is
Product [ (m[[ j, 2 ]] - m[[ i, 2 ]]), {i, 1, Length[ m ] - 1}, {j, i + 1, Length[ m ]} ]
What do you want to calculate then ?
You must at least specify n.