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:

Diagmatrix

Function: diagmatrix (<n>, <x>) Returns a diagonal matrix of size <n> by <n> with the diagonal elements all equal to <x>. diagmatrix (<n>, 1) returns an identity matrix (same as ident (<n>)).

m:matrix([3,2,0,0],[0,t+2,0,0],[0,0,t,t-3],[0,0,1,t]);
a:matrix([0,0,1,0],[0,1,0,0],[-1,0,0,1],[1,0,1,0]);
b:invert(a);
n:a.m.b;
s:n+transpose(n)-6*diagmatrix(4,1);
u:ev(s, t:3);
expand(charpoly(u, x));

<n> must evaluate to an integer, otherwise diagmatrix complains with an error message.

<x> can be any kind of expression, including another matrix. If <x> is a matrix, it is not copied; all diagonal elements refer to the same instance, <x>.

There are also some inexact matches for diagmatrix. Try ?? diagmatrix to see them.

(%o1)                                true
(%i2) 

Related Examples

diagmatrix

a: diagmatrix(10,0);

a[1,1]: 1;

a[2,2]: 1;

Calculate

diagmatrix-matrix

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

B[2][3];

C:diagmatrix(3,2);

Calculate

diagmatrix-expand-jacobian-matrix-phi-sin

A:matrix([0,-1/L1,0],...

B:matrix([1/L1, 0], [...

x:matrix([i_inv],[u_c...

Calculate

diagmatrix-display2d-factor-matrix-ratsimp-sqrt

display2d: falser2: x...

r: sqrt(r2);

cosr: x / r;

Calculate

diagmatrix

a: diagmatrix(10,0);

a[1,1]: 1;

a[2,2]: 1;

Calculate

diagmatrix-matrix

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

B[2][3];

C:diagmatrix(3,2);

Calculate

diagmatrix-matrix

A:matrix([0,-1/L1,0],...

cpolinom = det(diagm...

Calculate

diagmatrix-matrix

x: matrix ([a, a,0,0]...

i: diagmatrix (4, 1);

j: matrix ( [1,1,1,1]...

Calculate

diagmatrix-expand-jacobian-matrix-phi-sin

A:matrix([0,-1/L1,0],...

B:matrix([1/L1, 0], [...

x:matrix([i_inv],[u_c...

Calculate

diagmatrix-matrix

A:matrix([0,-1/L1,0],...

x: diagmatrix(3,1) + ...

Calculate