Equality of signature of two matrices The following question seems to be true but I'm unable to prove. Any help in this direction is welcome. Thank you. 


Let $n \geqslant 2$ and let $A,B\in GL_n(\mathbb{R})$ be two symmetric, invertible matrices with the same leading $(n-1)\times (n-1)$ principal submatrices and let us suppose that $\det A$, $\det B$ have the same sign. Is it true that $A,B$ have same signature? Note that, we are not assuming the leading $(n-1)\times (n-1)$ principal submatrix to be invertible. 

 A: We can prove this as a consequence of the Cauchy interlacing theorem.  Let $M$ be the leading $(n - 1) \times (n - 1)$ matrix that $A$ and $B$ have in common, and let $\mu_1 \leq \mu_2 \leq \cdots \leq \mu_{n-1}$ denote its eigenvalues.  The eigenvalues $\lambda_1 \leq \cdots \leq \lambda_n$ of $A$ must satisfy
$$
\lambda_1 \leq \mu_1 \leq \lambda_2 \leq \cdots \leq \lambda_{n-1} \leq \mu_{n-1} \leq \lambda_n.
$$
If $M$ has $0$ as an eigenvalue, then we find that the signature of $A$ is forced (so that $A$ and $B$ necessarily have the same signature.
In the case where $M$ has all positive eigenvalues, the sign of $\det(A)$ is the sign of $\lambda_1$, and the sign of the remaining eigenvalues are forced.  The case where $M$ has all negative eigenvalues is similar.
In the remaining case, we have $\mu_j < 0 < \mu_{j+1}$ for some $j$.  In this case, we find that
$$
\operatorname{sgn}(\det(A)) = \det(M) \cdot \operatorname{sgn}(\lambda_{j+1}),
$$
and the signs of all remaining eigenvalues are forced.
A: Here's a different proof which leans on continuity and Sylvester's Law of Inertia (which is one way of proving Cauchy Interlacing)  
1.) via orthogonal similarity transforms, assume WLOG that $A = \left[\begin{matrix}D & * \\* & *\end{matrix}\right]$ -- for diagonal matrix $D$. The matrix $B$ has the same form.  Further assume WLOG that $\det(D) \neq 0$ -- as alluded to in the comments we can get to this by continuity to estimate the signature of $A$ and $B$. Our non-singular $D$ is fixed, and its diagonal has some minimum modulus value $c \gt 0$.  
2.) let $E(\tau) = \left[\begin{matrix} I_{n-1} & 0 \\0 & \tau\end{matrix}  \right]$ for $\tau \in [0,1]$
For positive $\tau$ this is known as an elementary matrix of the 3rd type.  
3.) Then for $\tau =0$ we have
$E(\tau)AE(\tau)^T = E(\tau)BE(\tau)^T$ 
4.) And for $\tau \in (0,1]$
$\text{sign}\Big(\det\big(E(\tau)AE(\tau)^T\big)\Big) = \text{sign}\Big(\det\big(E(\tau)BE(\tau)^T\big)\Big)$ 
5.) for $0\lt \tau\lt\delta$
$E(\tau)AE(\tau)^T$ has its 'first' $n-1$ eigenvalues with with the same signs as $D$ (by topological continuity of eigenvalues and continuity of matrix multiplication there must be a $\delta \gt 0$ neighborhood where all eigenvalues change by $\lt c$ in modulus).  The $n$th eigenvalue's sign is then implied by the sign of the determinant. That is $\text{sign of nth eigenvalue }  = \text{sign}\Big(\frac{\det\big(E(\tau)AE(\tau)^T\big)}{\det\big(D\big)}\Big) = \text{sign}\Big(\frac{\det\big(A\big)}{\det\big(D\big)}\Big)$ 
The same applies for $E(\tau)BE(\tau)^T$, which implies $E(\tau)AE(\tau)^T$ and $E(\tau)BE(\tau)^T$ have the same signature for $\tau \in(0,\delta)$.  
But by by Sylvester's Law of Inertia these are each congruent to $A$ and $B$.  Since congruence is an equivalence relation, $A$ and $B$ have the same signature.  
