### Related

? mode_identity;

Calculate

##### identity-matrix

q:matrix([a11,a12,a13...

d:identity(4);

Calculate

? mode_identity;

Calculate

##### identity-matrix

q:matrix([a11,a12,a13...

d:identity(4);

Calculate

##### identity-matrix-phi

Cphi: matrix([1,0,0...

Ctheta: matrix([ct,0,...

Cpsi: matrix([cs,ss...

Calculate

##### identity-matrix-phi

Cphi: matrix([1,0,0...

Ctheta: matrix([ct,0,...

Cpsi: matrix([cs,ss...

Calculate

##### identity-matrix-phi

Cphi: matrix([1,0,0...

Ctheta: matrix([ct,0,...

Cpsi: matrix([cs,ss...

Calculate

##### identity-matrix

q:matrix([a11,a12,a13...

d:identity(4);

Calculate

##### identity-matrix-phi

Cphi: matrix([1,0,0...

Ctheta: matrix([ct,0,...

Cpsi: matrix([cs,ss...

Calculate

? mode_identity;

Calculate

### identity

Run Example
```(%i1)? mode_identity;

-- Function: mode_identity (<arg_1>, <arg_2>)
A special form used with `mode_declare' and `macros' to declare,
e.g., a list of lists of flonums, or other compound data object.
The first argument to `mode_identity' is a primitive value mode
name as given to `mode_declare' (i.e., one of `float', `fixnum',
`number', `list', or `any'), and the second argument is an
expression which is evaluated and returned as the value of
`mode_identity'.  However, if the return value is not allowed by
the mode declared in the first argument, an error or warning is
signalled.  The important thing is that the mode of the expression
as determined by the Maxima to Lisp translator, will be that given
as the first argument, independent of anything that goes on in the
second argument.  E.g., `x: 3.3; mode_identity (fixnum, x);'
yields an error. `mode_identity (flonum, x)' returns 3.3 .  This
has a number of uses, e.g., if you knew that `first (l)' returned a
number then you might write `mode_identity (number, first (l))'.
However, a more efficient way to do it would be to define a new
primitive,

firstnumb (x) ::= buildq ([x], mode_identity (number, x));

and use `firstnumb' every time you take the first of a list of
numbers.

(%o1)                                true
(%i2) ```
Run Example
```Cphi:   matrix([1,0,0],[0,cp,sp],[0,-sp,cp]);
[ 1   0    0  ]
[             ]
(%o1)                           [ 0   cp   sp ]
[             ]
[ 0  - sp  cp ]
(%i2) Ctheta: matrix([ct,0,-st],[0,1,0],[st,0,ct]);
[ ct  0  - st ]
[             ]
(%o2)                           [ 0   1   0   ]
[             ]
[ st  0   ct  ]
(%i3) Cpsi:   matrix([cs,ss,0],[-ss,cs,0],[0,0,1]);
[  cs   ss  0 ]
[             ]
(%o3)                           [ - ss  cs  0 ]
[             ]
[  0    0   1 ]
(%i4) psidotvect: matrix([0],[0],[psidot]);
[   0    ]
[        ]
(%o4)                             [   0    ]
[        ]
[ psidot ]
[    0     ]
[          ]
[          ]
[    0     ]
(%i6) phidotvect: matrix([phidot],[0],[0]);
[ phidot ]
[        ]
(%o6)                             [   0    ]
[        ]
[   0    ]
(%i7) Ctheta.psidotvect;
[ - psidot st ]
[             ]
(%o7)                           [      0      ]
[             ]
[  ct psidot  ]
(%i8) phidotvect + Cphi.(thedotvect + Ctheta.psidotvect);
[     phidot - psidot st     ]
[                            ]
(%o8)                   [ cp thetadot + ct psidot sp ]
[                            ]
[ cp ct psidot - sp thetadot ]
(%i9) identity(3) + Cphi + Cphi.Ctheta;
[  ct + 4       3          3 - st     ]
[                                     ]
(%o9)               [ sp st + 3  2 cp + 3  ct sp + sp + 3 ]
[                                     ]
[ cp st + 3  3 - 2 sp  cp ct + cp + 3 ]
(%i10) ```
Run Example
```T:matrix([-lambda, lambda], [mu, -mu]);
[ - lambda  lambda ]
(%o1)                        [                  ]
[    mu      - mu  ]
(%i2) determinant(T);
(%o2)                                  0
(%i3) %%linsolve_by_lu(T,[0, 0]);
[ - lambda  lambda ]
(%o3)           %%linsolve_by_lu([                  ], [0, 0])
[    mu      - mu  ]
(%i4) A:s*identity(2) - T;
[ lambda + 2 s  2 s - lambda ]
(%o4)                   [                            ]
[   2 s - mu      2 s + mu   ]
(%i5) Ps: [1, 0].invert(A);
[                       2 s + mu                        ]
(%o5)  Col 1 = [ ----------------------------------------------------- ]
[ (2 s + mu) (lambda + 2 s) + (mu - 2 s) (2 s - lambda) ]
[                     lambda - 2 s                      ]
Col 2 = [ ----------------------------------------------------- ]
[ (2 s + mu) (lambda + 2 s) + (mu - 2 s) (2 s - lambda) ]
(%i6) M:matrix([-lambda_ac, 0, lambda_ac, 0], [lambda_ba, -(lambda_ba + lambda_bd), 0, lambda_bd], [0, lambda_cb, -lambda_cb, 0], [0, 0, lambda_dc, -lambda_dc]);
[ - lambda_ac             0              lambda_ac        0      ]
[                                                                ]
[  lambda_ba   - lambda_bd - lambda_ba       0        lambda_bd  ]
(%o6) [                                                                ]
[      0              lambda_cb         - lambda_cb       0      ]
[                                                                ]
[      0                  0              lambda_dc   - lambda_dc ]
(%i7) determinant(M);
(%o7) - lambda_ac (lambda_bd lambda_cb lambda_dc
+ (- lambda_bd - lambda_ba) lambda_cb lambda_dc)
- lambda_ac lambda_ba lambda_cb lambda_dc
(%i8) ```

### Related Help

Help for Identity