设 $A=\left(\begin{array}{ll}1 & 2 \\ 2 & 1\end{array}\right)$ ,则在实数域上与 $A$ 合同的矩阵为
$\text{A.}$ $\left(\begin{array}{cc}-2 & 1 \\ 1 & -2\end{array}\right)$
$\text{B.}$ $\left(\begin{array}{cc}2 & -1 \\ -1 & 2\end{array}\right)$
$\text{C.}$ $\left(\begin{array}{ll}2 & 1 \\ 1 & 2\end{array}\right)$
$\text{D.}$ $\left(\begin{array}{cc}1 & -2 \\ -2 & 1\end{array}\right)$