Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks. In fact, $B_{13}$ must be 0. Let $P_1$ be a matrix consisting of columns that form a basis of the range of $A$. Let $P_2$ be a matrix consisting of columns that form a basis of the intersection of the kernel of $A$ and the range of $B$. Let $P_3$ be a matrix consisting of columns that form a basis of the intersection of the kernel of $A$ and the kernel of $B$. Then columns of $P=(P_1, P_2, P_3)$ form a basis of $\mathbb{R}^n$ in which $A$ and $B$ took the form you showed above. In particular, $B_{13} = P_1^T B P_3 = 0$ because $B P_3 = 0$.