Ask Your Question

Vandermonde Matrix

asked 2022-03-19 13:15:01 +0200

anonymous user


updated 2022-03-19 14:47:21 +0200

slelievre gravatar image

The $n \times n$ Vandermonde matrix is the matrix $$ V_n = \begin{pmatrix} 1 & x_0 & x_0^2 & \dots & x_0^{n-1} \\ 1 & x_1 & x_1^2 & \dots & x_1^{n-1} \\ \vdots & \vdots & \vdots & & \vdots \\ 1 & x_{n-1} & x_{n-1}^2 & \dots & x_{n-1}^{n-1} \\ \end{pmatrix} $$

  1. Calculate $p =\det(V_7)$.

    Hint: work out what the code x = var('x', n=7) does.

  2. How many terms does the polynomial $p$ have?

    Hint: work out what the method number_of_operands does).

  3. Factor $p$.

  4. Based on the above calculations, make a guess for a general fact about the determinant of any Vandermonde matrix.

How would I solve this question? Or how would I at least get started on it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-03-19 15:28:59 +0200

dsejas gravatar image

Hello! Based on the statement of the question, this seems to be homework. It is important that you do it yourself without any help for two reason: (1) the exercise will show you some very important aspects and functionality of SageMath that you will find very useful in your professional life, and (2) if you can't solve this question by yourself, you won't be able to use the rest of SageMath efficiently (and---trust me on this---you really want to learn to use this beautiful piece of software).

However, I can give you some hints on how to proceed:

  1. The exercise is self-explanatory. For example, the first step should be to execute x = var('x', n=7) and explore the result. In an interactive session, you can write print(x) or just x to show the result on screen. I would also recommend, changing the 'x' and the n=7 in order for you to understand the general behaviour.

  2. SageMath is a mathematical software, and as such, it mostly uses mathematical notation: if there is a function called $det$ for matrices, changes are that Sage defines the function or method det. If you don't know how it works, you can always write something like det? (Concerning the previous point, you can also use var? in order to learn more about the command.) This is a convenient feature predefined in Sage.

  3. Your second step in solving the exercise should be call the method number_of_operands on the polynomial p. Since this is a method, you want to use the suffix dot notation: p.number_of_operands(). Once again, in case of doubt, call p.number_of_operands?

  4. Based on point 2, you should be able to deduce how to start on the factorization of p. Additional hint: you don't need to code a subroutine to factor it, Sage has one.

  5. These points should cover the behaviour of Sage regarding the commands. The fourth point of the question is simple observation and description of a property of Vandermonde matrices. You will have a pleasant surprise here.

  6. One reminder: there is a Sage function for creating matrices. It is called---creatively enough---matrix. You already know how to learn how it works.

  7. The Sage website ( has a list of great resources (most of them free) for learning it. I recommend Prof. Gregory Bard's book, "Sage for Undergraduates" for this kind of problems. It will give you an excellent introduction to the subject.

Hope this helps! Sorry for the long message.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-03-19 13:15:01 +0200

Seen: 361 times

Last updated: Mar 19 '22