Matrix problems related to pole assignment Let $$
A=\left[ \begin{matrix}
 A_1&  A_3\\
 0&  A_2\\
\end{matrix} \right]\quad \text{and} \quad B=\left[ \begin{array}{c}
 B_1\\
 B_2\\
\end{array} \right],
$$and for any eigenvalue $s$ of $A$, we have
$$
\mathrm{rank}\,\left[ A-sI_n,B \right] =n.
$$
Prove there are a real matrix $K\in \mathbb{R}^{r\times n}$ and invertible matrix $T\in \mathbb{R}^{n\times n}$, such that
$$
T\left( A+BK \right) T^{-1}=\left[ \begin{matrix}
 A_1&  0\\
 0&  \bar{A}_2\\
\end{matrix} \right] ,\qquad TB=\left[ \begin{array}{c}
 \bar{B}_1\\
 B_2\\
\end{array} \right],
$$
where $A\in \mathbb{R}^{n\times n},B\in \mathbb{R}^{n\times r}$. Meanwhile,  $\bar{A}_2$ and $\bar{B}_1$ is real matrix of the proper dimension, $\bar{A}_2$ and $A_1$ Have eigenvalues that are not identical to each other.
This problem is about controllability of linear system and pole assignment, so I think we may try controllability canonical form, or let $K=(K_1,K_2)$, then determine the $K_1,K_2$ and $T$, but it seems so difficult.
 A: The statement about the rank of $\left[A - s\,I, B\right]$ implies that the pair $(A,B)$ is controllable. Therefore the poles of the resulting matrix should be able to be placed anywhere. The similarity transformation should allow us to separate the eigenvalues/modes and therefore achieve the stated goal
$$
T \left(A + B\,K\right) T^{-1} = 
\begin{bmatrix}
A_1 & 0 \\ 0 & \bar{A}_2
\end{bmatrix}, \quad 
T\,B = 
\begin{bmatrix}
\bar{B}_1 \\ B_2
\end{bmatrix},
$$
given that
$$
A = 
\begin{bmatrix}
A_1 & A_3 \\ 0 & A_2
\end{bmatrix}, \quad
B = 
\begin{bmatrix}
B_1 \\ B_2
\end{bmatrix}.
$$
For solving this it is easier to separate the problem in smaller problems. For this I will define $T$ and $K$ as
$$
T = 
\begin{bmatrix}
T_1 & T_2 \\ T_3 & T_4
\end{bmatrix}, \quad
K = 
\begin{bmatrix}
K_1 & K_2
\end{bmatrix}.
$$
The last goal requires
$$
T\,B = 
\begin{bmatrix}
T_1\,B_1 + T_2\,B_2 \\ T_3\,B_1 + T_4\,B_2
\end{bmatrix} = 
\begin{bmatrix}
\bar{B}_1 \\ B_2
\end{bmatrix}.
$$
The bottom half of this goal might have infinitely many solution if there is any overlap in the span of $B_1$ and $B_2$. But this problem should be solvable in general, in which case $T_3=0$ and $T_4=I$ should always solve it. Using this then the inverse of $T$ can shown to be
$$
T^{-1} = 
\begin{bmatrix}
T_1 & T_2 \\ 0 & I
\end{bmatrix}^{-1} = 
\begin{bmatrix}
T_1^{-1} & -T_1^{-1}\,T_2 \\ 0 & I
\end{bmatrix}.
$$
Since nothing is specified about $\bar{B}_1$ then $T_1$ and $T_2$ could be anything for now as long as $T_1$ is invertible. The left hand side of the first goal can now be written as
$$
T \left(A + B\,K\right) T^{-1} = 
\begin{bmatrix}
T_1\,A_1\,T_1^{-1} + \bar{B}_1\,K_1\,T_1^{-1} & T_1\,A_3 + T_2\,A_2 - T_1\,A_1\,T_1^{-1}\,T_2 + \bar{B}_1\left(K_2 - K_1\,T_1^{-1}\,T_2\right) \\
B_2\,K_1\,T_1^{-1} & A_2 + B_2\left(K_2 - K_1\,T_1^{-1}\,T_2\right)
\end{bmatrix}.
$$
It can be shown that the top and bottom left half can be set equal to the goal by using $T_1=I$ and $K_1=0$. This allows the top and bottom right of the first goal equation to be simplified to
$$
\begin{bmatrix}
A_3 + T_2\,A_2 - A_1\,T_2 + \bar{B}_1\,K_2 \\
A_2 + B_2\,K_2
\end{bmatrix} = 
\begin{bmatrix}
0 \\
\bar{A}_2
\end{bmatrix}.
$$
For the bottom half of this equation you could just use a pole placement algorithm to find $K_2$, such that none of the poles match those of $A_1$. This should be possible since the pair $(A_2,B_2)$ should be controllable. The top half can then be rewritten as
$$
A_3 + T_2\,\bar{A}_2 - A_1\,T_2 + B_1\,K_2 = 0,
$$
which can be transformed into a Sylvester equation
$$
A\,X + X\,B = C,
$$
with $X = T_2$, $A = -A_1$, $B = \bar{A}_2$ and $C = -A_3 - B_1\,K_2$. This equation has an unique solution for $X$ when $A$ and $-B$ do not have a common eigenvalue. This is an identical constraint as mentioned by your problem statement.
So to solve this problem you can first do a pole placement with the pair $(A_2,B_2)$ to find $K_2$, avoiding the eigenvalues of $A_1$. And then solve a Sylvester equation after substituting in this obtained $K_2$ in order to find $T_2$. Using these values then the final solution can then be expressed using
$$
T = 
\begin{bmatrix}
I & T_2 \\ 0 & I
\end{bmatrix}, \quad
K = 
\begin{bmatrix}
0 & K_2
\end{bmatrix}.
$$
