Several equivalence relations in mathematics are called

**similarity**.

## Geometry

Two geometrical objects are called **similar** if, loosely speaking, one can be obtained from the other by uniformly "stretching", i.e. one is congruent to an "enlargement" of the other. They have the same shape, or the mirror image of one has the same shape as the other.

For example, all circles are similar, as are all squares. Two triangles are similar if and only if they have the same three angles, the so-called "AAA" condition.

Formally, we define a **similarity** of a Euclidean space as a function *f* from the space into itself that multiplies all distances by the same positive scalar *r*, so that for any two points *x* and *y* we have

*d*(

*x*,

*y*)" is the Euclidean distance from

*x*to

*y*. Two sets are called

**similar**if one is the image of the other under such a similarity.

## Linear algebra

In linear algebra, two *n*-by-*n* matrices *A* and *B* are called **similar** if there exists an invertible *n*-by-*n* matrix *P* such that

*P*^{ -1}*AP*=*B*.

*similarity transformation*. Similar matrices share many properties: they have the same determinant, the same trace, the same eigenvalues (but not necessarily the same eigenvectors), the same characteristic polynomial and the same minimal polynomial. There are two reasons for these agreements:

- two similar matrices can be thought of as describing the same linear map, but with respect to different bases
- the map
*X*`|->`*P*^{-1}*XP*is an automorphism of the associative algebra of all*n*-by-*n*matrices

*A*, one is interested in finding a simple "normal form"

*B*which is similar to

*A*-- the study of

*A*then reduces to the study of the simpler matrix

*B*. For example,

*A*is called diagonalizable if it is similar to a diagonal matrix. Not all matrices are diagonalizable, but at least over the complex numbers, every matrix is similar to a matrix in Jordan form.

If in the definition of similarity, the matrix *P* can be choses to be a permutation matrix then *A* and *B* are *permutation-similar*; if *P* can be chosen to be a unitary matrix then *A* and *B* are *unitarily equivalent*. The spectral theorem says that every normal matrix is unitarily equivalent to some diagonal matrix.