Let $$A = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & b \\ \end{pmatrix} $$
and
$$ B= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & \frac{c}{2} \\ 0 & 0 & \frac{c}{2}& 0 \\ \end{pmatrix} $$
be two matrices. Find conditions on $b$ and $c$ such $P^tAP = B$ (i.e.$A$ and $B$ are congruent matrices) where $P$ is invertible matrix and $P^t$ = transpose of $P$.
I know that if $A$ and $B$ are congruent then their determinants have same sign. $|A| = b$ and $|B| = -\frac{c^2}{4}$ then there are two cases arise Case 1, $c = b = 0$ Case 2, if $c \neq 0$ then $b > 0$ Is same sign of determinants is sufficient condition to make $A$ and $B$ congruent. Provide me alternate solution if you have.