In linear algebra, two n-by-n matrices A and B are called similar if for some invertible n-by-n matrix P. Similar matrices represent the same linear transformation under two different bases, with P being the change of basis matrix. The matrix P is sometimes called a similarity transformation. In the context of matrix groups, similarity is sometimes referred to as conjugacy, with similar matrices being conjugate.