LinearAlgebra
IsSimilar
determine if two Matrices are similar
Calling Sequence
Parameters
Description
Examples
IsSimilar(A, B, out, options)
A
-
square Matrix
B
out
(optional) equation of the form output = obj where obj is one of 'query' or 'C', or a list containing one or more of these names; selects result objects to compute
options
(optional); constructor options for the transformation Matrix 'C'
The IsSimilar(A, B) function returns true if A and B are similar.
Two Matrices, A and B, are said to be similar if there exists an invertible Matrix C such that C·A=B·C.
Floating-point entries in either of the Matrices are converted to rationals before proceeding.
If out is included in the calling sequence, then only those objects specified are returned, as an expression sequence. The returned objects may be the Boolean response to the query and/or the similarity transformation Matrix C. If both objects are requested, they are returned in the order specified in the output list.
If A and B are not similar and the Matrix C is requested, then the returned Matrix C is not a similarity transformation Matrix for A and B and the query, if requested, returns false.
The options option provides additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions['C']=[...], where [...] represents a Maple list. If a constructor option is provided in both the calling sequence directly and in an outputoptions['C'] option, the latter takes precedence (regardless of the order).
Assignment to Normalizer of a stronger normalization routine can provide better zero recognition during this calculation than is provided by the default normal routine. Such an assignment to Normalizer or Testzero may be necessary for input which is not of type ratpoly.
with⁡LinearAlgebra:
IsSimilar⁡2,0|I,−2,1,I|0,−1
false
A≔DiagonalMatrix⁡5,12,13
A≔50001200013
B≔5,0,0|3,12,0|4,−4,13
B≔534012−40013
q,P≔IsSimilar⁡A,B,output=query,C
q,P≔true,1−110−73400−1
A=P−1·B·P
50001200013=50001200013
A≔Matrix⁡−1,0,0,0,−sqrt⁡22,−sqrt⁡22,0,−sqrt⁡22,sqrt⁡22
A≔−1000−22−220−2222
B≔Matrix⁡1,0,0,0,−1,0,0,0,−1
B≔1000−1000−1
eval⁡Normalizer
procoptionbuiltin=normal,remember,system;end proc
LinearAlgebra:-IsSimilar⁡A,B
Normalizer≔radnormal
true
See Also
LinearAlgebra[Eigenvalues]
LinearAlgebra[SmithForm]
Matrix
Normalizer
type[float]
Download Help Document