Can we always let two uncommute hermitian matrices $A$ and $B$ commute by enlarge the dimension? For example, we have two hermitian matrices $$A=\left( \begin{matrix}
 1&  0\\
 0&  -1\\
\end{matrix} \right) ,B=\left( \begin{matrix}
 0&  1\\
 1&  0\\
\end{matrix} \right) .$$
And for this special case, I can find another two hermitian matrices by placing $A$ and $B$ as the principal submatrix commute as follows:
$$\tilde{A}=\left( \begin{matrix}
 1&  0&  -1\\
 0&  -1&  1\\
 -1&  1&  0\\
\end{matrix} \right) ,\tilde{B}=\left( \begin{matrix}
 0&  1&  1\\
 1&  0&  1\\
 1&  1&  0\\
\end{matrix} \right) .$$
I wonder if there exists general theorems guarantee that we can always find two enlarged commuting hermitian matrix like this?
 A: Here is a partial answer. Every pair of Hermitian $n\times n$ matrices can be embedded, as leading principal submatrices, in a pair of commuting Hermitian $m\times m$ matrices when $m\ge 2n-1$.
For convenience, I will call your two matrices $A_1$ and $A_2$ (instead of $A$ and $B$). When $c>0$ is sufficiently large, $A_1+cI_n$ is positive definite. Hence $A_1+cI_n$ and $A_2+cI_n$ are simultaneously diagonalisable by congruence. That is, there exists a nonsingular matrix $P$ and two real diagonal matrices $D_1$ and $D_2$ such that $A_i+cI_n=PD_iP^\ast$ for each $i$. By absorbing an appropriate positive factor into $P$ and its inverse factor into $D_1$ and $D_2$, we may assume that $\|P\|_2=1$. Hence $\operatorname{rank}(I_n-P^\ast P)\le n-1\le\min(m-n,\,n)$ and there exists an $(m-n)\times n$ matrix $Q$ such that $Q^\ast Q=I_n-P^\ast P$. Thus $\pmatrix{P\\ Q}$ has orthonormal columns and we can complete it to a unitary matrix $U=\pmatrix{P&\ast\\ Q&\ast}$. Now
\begin{aligned}
H_i:=U\left[\pmatrix{D_i\\ &0}-cI_m\right]U^\ast
&=U\pmatrix{D_i\\ &0}U^\ast-cI_m\\
&=\pmatrix{P\\ Q}D_i\pmatrix{P^\ast& Q^\ast}-cI_m\\
&=\pmatrix{PD_iP^\ast&\ast\\ \ast&\ast}-cI_m\\
&=\pmatrix{A_i+cI_n&\ast\\ \ast&\ast}-cI_m\\
&=\pmatrix{A_i&\ast\\ \ast&\ast}.\\
\end{aligned}
Hence $H_1$ and $H_2$ are two commuting Hermitian matrices with $A_1$ and $A_2$ as their respective leading principal submatrices.
