IsSimilar - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


LinearAlgebra

  

IsSimilar

  

determine if two Matrices are similar

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

IsSimilar(A, B, out, options)

Parameters

A

-

square Matrix

B

-

square Matrix

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'

Description

• 

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.

Examples

withLinearAlgebra:

IsSimilar2,0|I,2,1,I|0,1

false

(1)

ADiagonalMatrix5,12,13

A50001200013

(2)

B5,0,0|3,12,0|4,4,13

B534012−40013

(3)

q,PIsSimilarA,B,output=query,C

q,Ptrue,1−11073400−1

(4)

A=P1·B·P

50001200013=50001200013

(5)

AMatrix1,0,0,0,sqrt22,sqrt22,0,sqrt22,sqrt22

A−1000222202222

(6)

BMatrix1,0,0,0,1,0,0,0,1

B1000−1000−1

(7)

evalNormalizer

procoptionbuiltin=normal,remember,system;end proc

(8)

LinearAlgebra:-IsSimilarA,B

false

(9)

Normalizerradnormal

Normalizerradnormal

(10)

LinearAlgebra:-IsSimilarA,B

true

(11)

See Also

LinearAlgebra[Eigenvalues]

LinearAlgebra[SmithForm]

Matrix

Normalizer

type[float]