linalg(deprecated)
issimilar
determine similarity of matrices
Calling Sequence
Parameters
Description
Examples
issimilar(A, B)
issimilar(A, B, 'P')
A
-
square matrix
B
'P'
(optional) assigned a transformation matrix
Important: The linalg package has been deprecated. Use the superseding command, LinearAlgebra[IsSimilar], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The function issimilar(A, B) returns true if A is similar to B and false otherwise.
If called in the form issimilar(A, B,'P'), then P will be assigned a transformation matrix such that A=inverse⁡P⁢B⁢P.
This function is part of the linalg package, and so can be used in the form issimilar(..) only after performing the command with(linalg), or with(linalg,issimilar). This function can always be accessed in the long form linalg[issimilar](..).
with⁡linalg:
A≔matrix⁡3,3,1,2,3,4,5,6,7,8,9
A≔123456789
B≔diag⁡eigenvalues⁡A
B≔0000152+3⁢332000152−3⁢332
issimilar⁡A,B,P
true
print⁡P
16−1316−512+7⁢33132−16+33198112−17⁢33396512+7⁢3313216+33198−112−17⁢33396
map⁡normal,evalm⁡P−1&*B&*P
123456789
See Also
Domains
evala
Issimilar
LinearAlgebra
mod
Download Help Document