# Revision history [back]

sage: A = matrix(QQ,[[1,0],[1,0]])
sage: B = matrix(QQ,[[0,0],[1,1]])
sage: b, P = A.is_similar(B, transformation=True)
sage: b
True
sage: P.inverse() * B * P == A
True


For more, you can use A.is_similar? to get:

Docstring:
Return "True" if "self" and "other" are similar, i.e. related by a
change-of-basis matrix.

INPUT:

* "other" -- a matrix, which should be square, and of the same
size as "self".

* "transformation" -- default: "False" - if "True", the output
may include the change-of-basis matrix (also known as the
similarity transformation). See below for an exact description.

sage: A = matrix(QQ,[[1,0],[1,0]])
sage: B = matrix(QQ,[[0,0],[1,1]])
sage: b, P = A.is_similar(B, transformation=True)
sage: b
True
sage: P.inverse() * B * P == A
True


For more, you can use A.is_similar? to get:

Docstring:
Return "True" if "self" and "other" are similar, i.e. related by a
change-of-basis matrix.

INPUT:

* "other" -- a matrix, which should be square, and of the same
size as "self".

* "transformation" -- default: "False" - if "True", the output
may include the change-of-basis matrix (also known as the
similarity transformation). See below for an exact description.

[...]