Let A $\in$ K$^n$$^,$$^n$ be a symmetric matrix over a field K. Define f(A) = { t$^2$ det(A) : t $\in$ K } and g(A) = {$x^T$A$x$ : $x \in $ K$^n$ } .
WTS if A,B are congruent f(A) = f(B) and g(A) = g(B)
Does the Sylvester's Law of inertia apply in this question and how does it?
I have so far: A, B are congruent if there exists an invertible matrix P such that B = P$^T$AP. Hence f(B) = f(P$^T$AP) = { t$^2$ det(P$^T$AP) : t$\in$ K } ...
For g, a similar approach doesn't seem to work and I think I need to use that congruent matrices have the same inertia but I can't get my head around it
Observe that
$$A\cong B\iff \exists\,\;\text{invertible}\;P\;\;s.t.\;\;A=P^tBP\implies$$
$$\det A=(\det P)^2\det B\;,\;\;\text{ and then}$$
$$t^2\det A\in f(A)\implies t^2\det A=t^2((\det P)^2\det B)=(t\det P)^2\det B\in f(B)\implies$$
$$f(A)\subset f(B)$$
Try to complete this part now...
As for the other one:
$$x^tAx=x^t(P^tBP)x=(Px)^t B(Px)\implies g(A)\subset g(B)$$
and now try to complete also this part.