Sponsored links: Algebra eBooks
 

Related

vandermonde_matrix

Run Example
(%i1)m: vandermonde_matrix([0,1,2,3,4]);
                             [ 1  0  0   0    0  ]
                             [                   ]
                             [ 1  1  1   1    1  ]
                             [                   ]
(%o1)                        [ 1  2  4   8   16  ]
                             [                   ]
                             [ 1  3  9   27  81  ]
                             [                   ]
                             [ 1  4  16  64  256 ]
(%i2) m: addcol(m,[0,1,2,3,4]);
                           [ 1  0  0   0    0   0 ]
                           [                      ]
                           [ 1  1  1   1    1   1 ]
                           [                      ]
(%o2)                      [ 1  2  4   8   16   2 ]
                           [                      ]
                           [ 1  3  9   27  81   3 ]
                           [                      ]
                           [ 1  4  16  64  256  4 ]
(%i3) triangularize(m);
                            [ 1  0  0  0    0   0 ]
                            [                     ]
                            [ 0  1  1  1    1   1 ]
                            [                     ]
(%o3)                       [ 0  0  2  6   14   0 ]
                            [                     ]
                            [ 0  0  0  12  72   0 ]
                            [                     ]
                            [ 0  0  0  0   288  0 ]
(%i4) 
Run Example
? vandermonde_matrix;

 -- Function: vandermonde_matrix ([<x_1>, ..., <x_n>])
     Return a <n> by <n> matrix whose <i>-th row is `[1, <x_i>,
     <x_i>^2, ... <x_i>^(<n>-1)]'.


(%o1)                                true
(%i2) 
Run Example
m: vandermonde_matrix([0,1,2]);
                                  [ 1  0  0 ]
                                  [         ]
(%o1)                             [ 1  1  1 ]
                                  [         ]
                                  [ 1  2  4 ]
(%i2) triangularize(m);
                                  [ 1  0  0 ]
                                  [         ]
(%o2)                             [ 0  1  1 ]
                                  [         ]
                                  [ 0  0  2 ]
(%i3) 

Related Help

Help for Vandermonde_matrix