Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Diag_matrix Calculator

Diag_matrix

Function: diag_matrix (<d_1>, <d_2>,...,<d_n>) Return a diagonal matrix with diagonal entries <d_1>, <d_2>,...,<d_n>. When the diagonal entries are matrices, the zero entries of the returned matrix are zero matrices of the appropriate size; for example:

          (%i1) diag_matrix(diag_matrix(1,2),diag_matrix(3,4));

[ [ 1 0 ] [ 0 0 ] ] [ [ ] [ ] ] [ [ 0 2 ] [ 0 0 ] ]

          (%o1)                       [                    ]
                                      [ [ 0  0 ]  [ 3  0 ] ]
                                      [ [      ]  [      ] ]
                                      [ [ 0  0 ]  [ 0  4 ] ]
          (%i2) diag_matrix(p,q);

                                             [ p  0 ]
          (%o2)                              [      ]
                                             [ 0  q ]

(%o1)                                true
(%i2) 

Diag_matrix Example

Related Examples

diag_matrix-matrix-transpose

a:matrix([-1,2,0,-1],...

a.transpose(a);

b.diag_matrix([2,4,2,...

Calculate

diag_matrix-matrix

a: matrix([6, 1, 8], ...

matrix([a,a]);

diag_matrix(p,q);

Calculate

diag_matrix-matrix

m:matrix([1,2,3,4]);

diag_matrix(m);

Calculate

diag_matrix-matrix-sin

diag_matrix(2*n,2*l,r...

Calculate

diag_matrix-matrix-transpose

a:matrix([-1,2,0,-1],...

a.transpose(a);

diag_matrix([2,4,2,1]);

Calculate

diag_matrix-matrix-transpose

a:matrix([-1,2,0,-1],...

a.transpose(a);

a.diag_matrix(2,4,2,1...

Calculate

diag_matrix-matrix

m:matrix([1,2,3,4]);

diag_matrix(m);

Calculate

diag_matrix-matrix

a: matrix([6, 1, 8], ...

matrix([a,a]);

diag_matrix(p,q);

Calculate

diag_matrix-matrix

a: matrix([6, 1, 8], ...

diag_matrix(a,a);

diag_matrix(p,q);

Calculate

diag_matrix-matrix

m:matrix([1,2,3,4]);

diag_matrix(m);

Calculate