If $A$, $B$ $\in K^{n \times n}$ are $n \times n$ matrices over a field $K$, then we say that $A$ and $B$ are congruent if there exists an invertible $P \in GL(n, K)$ such that $B = P^TAP$, where $P^T$ denotes the transpose of $P$.
Why do we require $P$ to be invertible?
Congruence of matrices is usually compared to similarity of matrices, where we say that $A$ and $B$ are similar if there exists an invertible $P \in GL(n, K)$ such that $B = P^{-1}AP$. Here it is obvious why we need $P$ to be invertible. However, in the case of congruent matrices, the invertibility requirement doesn't seem to be obvious.