# Matrix congruence

In mathematics, two square matrices * A* and

*over a field are called*

**B****congruent**if there exists an invertible matrix

*over the same field such that*

**P****P**^{T}=**AP****B**

where "T" denotes the matrix transpose. Matrix congruence is an equivalence relation.

Matrix congruence arises when considering the effect of change of basis on the Gram matrix attached to a bilinear form or quadratic form on a finite-dimensional vector space: two matrices are congruent if and only if they represent the same bilinear form with respect to different bases.

Note that Halmos defines congruence in terms of conjugate transpose (with respect to a complex inner product space) rather than transpose,[1] but this definition has not been adopted by most other authors.

## Congruence over the reals

Sylvester's law of inertia states that two congruent symmetric matrices with real entries have the same numbers of positive, negative, and zero eigenvalues. That is, the number of eigenvalues of each sign is an invariant of the associated quadratic form.[2]

## References

- Halmos, Paul R. (1958).
*Finite dimensional vector spaces*. van Nostrand. p. 134. - Sylvester, J J (1852). "A demonstration of the theorem that every homogeneous quadratic polynomial is reducible by real orthogonal substitutions to the form of a sum of positive and negative squares" (PDF).
*Philosophical Magazine*.**IV**: 138–142. Retrieved 2007-12-30.

- Gruenberg, K.W.; Weir, A.J. (1967).
*Linear geometry*. van Nostrand. p. 80. - Hadley, G. (1961).
*Linear algebra*. Addison-Wesley. p. 253. - Herstein, I.N. (1975).
*Topics in algebra*. Wiley. p. 352. ISBN 0-471-02371-X. - Mirsky, L. (1990).
*An introduction to linear algebra*. Dover Publications. p. 182. ISBN 0-486-66434-1. - Marcus, Marvin; Minc, Henryk (1992).
*A survey of matrix theory and matrix inequalities*. Dover Publications. p. 81. ISBN 0-486-67102-X. - Norman, C.W. (1986).
*Undergraduate algebra*. Oxford University Press. p. 354. ISBN 0-19-853248-2.