Inmathematics, twosquare matricesA andB over afield are calledcongruent if there exists aninvertible matrixP over the same field such that
where "T" denotes thematrix transpose. Matrix congruence is anequivalence relation.
Matrix congruence arises when considering the effect ofchange of basis on theGram matrix attached to abilinear form orquadratic form on afinite-dimensionalvector space: two matrices are congruent if and only if they represent the same bilinear form with respect to differentbases.
Note thatHalmos defines congruence in terms ofconjugate transpose (with respect to acomplexinner product space) rather than transpose,[1] but this definition has not been adopted by most other authors.
Sylvester's law of inertia states that two congruentsymmetric matrices withreal entries have the same numbers of positive, negative, and zeroeigenvalues. That is, the number of eigenvalues of each sign is an invariant of the associated quadratic form.[2]