In linear algebra, two matrices and are similar if there exists an invertible matrix such that .