# Controllable and Uncontrollable subspaces

Show that there is a basis in $\mathcal{X}$ in which $A$ and $B$ have matrices of the form $$A = \begin{bmatrix} A_1 && A_3 \\ 0 && A_2 \end{bmatrix} , B = \begin{bmatrix} B_1 \\ 0\end{bmatrix},$$ where $(A_1,B_1)$ is controllable. Describe $\langle A | \mathcal{B} \rangle$ in this basis.

Notation : $\dot{x}(t) = Ax(t)+Bu(t), \quad x\in \mathcal{X},$ $\quad \mathcal{B} = \mathrm{Im}(B)$ $$\langle A | \mathcal{B} \rangle = \mathcal{B} + A\mathcal{B} + \cdots + A^{n-1}\mathcal{B}$$

I need help to prove the first part.

I begin with assumption that $\exists$ a tranformation $z = T x$ such that $$\dot{z}(t) = T^{-1}ATz(t) + T^{-1}Bu(t)$$

But I am not sure how to proceed further.

Let the controllability matrix $$\mathcal{C}=[\matrix{B & AB & \cdots & A^{n-1}B}]$$ Assume that $rank(\mathcal{C})=r\leq n$. Then, there are $r$ linearly independent column of $\mathcal{C}$ which we may denote as $q_1, q_2,\cdots,q_r$. Augment those columns with $n-r$ columns $q_{r+1},\cdots,q_n$ such that the $n\times n$ matrix $$Q:=\left[\matrix{q_1 & q_2 & \cdots & q_r & q_{r+1} & \cdots & q_n}\right]$$ be invertible. The desired transformation is $$T:=Q^{-1}$$ Proof: Since the columns of $B$ are columns of $\mathcal{C}$ they belong in the subspace spanned by $\{q_1,\cdots,q_r\}$ and therefore $$B=\left[\matrix{\sum_{i=1}^r{b_{1i}q_i} & \cdots & \sum_{i=1}^r{b_{mi}q_i} }\right]\\=\left[\matrix{q_1 & \cdots & q_r & q_{r+1} & \cdots & q_n}\right]\left[\matrix{b_{11} & b_{21} & \cdots & b_{m1}\\ b_{12} & b_{22} & \cdots & b_{m2}\\ \vdots & \vdots & \ddots & \vdots\\ b_{1r} & b_{2r} & \cdots & b_{mr}\\ 0 & 0 &\cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 &\cdots & 0}\right]=Q\left[\matrix{B_1\\0}\right]$$ i.e. $$TB=Q^{-1}B=\left[\matrix{B_1\\0}\right]$$ Also we have that $$AQ=\left[\matrix{Aq_1 & Aq_2 & \cdots & Aq_r & Aq_{r+1} & \cdots & Aq_n}\right]$$ Note that the following property holds:
**P1) The first $r$ columns of $AQ$ defined by $Aq_i$ ($i=1,\cdots,r$) also belong in the subspace spanned by $\{q_1,\cdots,q_r\}$. **
This is due to the special form of $\mathcal{C}$. Since $q_i$ ($i=1,\cdots,r$) are columns of $\mathcal{C}$ then $Aq_i$ are columns of the matrices $A^{j}B$ ($j=0,1,\cdots,n$) and therefore they are either columns of $\mathcal{C}$ or columns of $A^nB$. From the Cayley-Hamilton theorem $A^nB$ is a linear combination of $A^jB$ ($j=0,1,\cdots,n-1$) from which we yield $P1$.
Then, $$AQ= \left[\matrix{\sum_{i=1}^r{a_{1i}q_i} & \cdots & \sum_{i=1}^r{a_{ri}q_i} & \sum_{i=1}^n{a_{r+1,i}q_i} & \cdots & \sum_{i=1}^n{a_{ni}q_i}}\right]\\=\left[\matrix{q_1 & \cdots & q_r & q_{r+1} & \cdots & q_n}\right]\left[\matrix{a_{11} & a_{21} & \cdots & a_{r1} & a_{r+1,1} & \cdots & a_{n1}\\ a_{12} & a_{22} & \cdots & a_{r2} & a_{r+1,2} & \cdots & a_{n2}\\ \vdots & \vdots & \ddots & \vdots & \vdots & \ddots & \vdots\\ a_{1r} & a_{2r} & \cdots & a_{rr} & a_{r+1,r} & \cdots & a_{nr}\\ 0 & 0 &\cdots & 0 & a_{r+1,r+1} & \cdots & a_{n,r+1}\\ \vdots & \vdots & \ddots & \vdots & \vdots & \ddots & \vdots\\ 0 & 0 &\cdots & 0 & a_{r+1,n} & \cdots & a_{n,n}}\right]=Q\left[\matrix{A_1 & A_3\\0 & A_2}\right]$$ or equivalently $$TAT^{-1}=Q^{-1}AQ=\left[\matrix{A_1 & A_3\\0 & A_2}\right]$$