Message Boards Message Boards

0
|
5474 Views
|
9 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Calculate the value of a Determinant

Posted 3 years ago

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?

$$\left| \begin{array}{ccccc} 1 & x & x^2 & \cdots & x^{n-1} \\ 1 & a_1 & a_1^2 & \cdots & a_1^{n-1} \\ \vdots & \vdots & \vdots & & \vdots \\ 1 & a_{n-1} & a_{n-1}^2 & \cdots & a_{n-1}^{n-1} \\ \end{array} \right|$$ That seems to have some problems.

POSTED BY: Power Conquer Li
9 Replies

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.

POSTED BY: Hans Dolhaine

What result do you expect, if you are not providing the actual matrix input?

POSTED BY: Daniel Lichtblau

But it can't calculate mm[n],can it?

POSTED BY: Power Conquer Li

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]];]
POSTED BY: Hans Dolhaine

That's true,but I want to know how can I calculate its value in Mathematica.

POSTED BY: Power Conquer Li

It's a Vandermonde matrix. The determinant is the product of differences between elements in the second column (subtracting lower-row elements from higher.)

POSTED BY: Daniel Lichtblau

I don't know the code, I am looking for the codes which can calculate the determinant.

POSTED BY: Power Conquer Li

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]
POSTED BY: Hans Dolhaine

This question in vague. What "problems" are you seeing? Provide details with code.

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract