So i understand that given a Matrix A, and a vector B, you can work out a controllability matrix G such that


 G = [B , AB, A^2B, A^3B,...]
and then the controllability depends on whether G is of full rank or not etc.


But what happens when A is an nxn matrix but B is not a 1xn vector, but instead a 2xn vector?
For example (and this is a completely made up example) -


 A=\begin{bmatrix} 2 & 1& 1 \\4 &3 &1\\ 2& 8 &9 \end{bmatrix}
and
B= \begin{bmatrix} 1 & 3\\ 2&1 \\ 1&5\end{bmatrix}


how is G formed from this?


to save you having to work out:
AB =\begin{bmatrix}  5 & 12\\    11&    20\\    27  &  59\end{bmatrix} \mathrm{and} A^2B=\begin{bmatrix} 48 &  103\\    80  & 167 \\   341  & 715\end{bmatrix}


Then the same question for observability
 \theta = \begin{bmatrix} C \\ CA \\ CA^2 \\ :\end{bmatrix}<br />
using the same A above, and  C= \begin{bmatrix} 2 &2 &4 \\ 1&2&1\end{bmatrix}
how is
 \theta formed?


Again, to save you having to work out
CA=    \begin{bmatrix} 20 &   40&    40\\    12&    15&    12\end{bmatrix} \mathrm{and} CA^2 = \begin{bmatrix}280 &  460   &420\\   108 &  153&   135\end{bmatrix}