I want to draw a math matrix in TikZ, where I can draw helping partition lines. So far I found it pretty simple to just draw a matrix with brackets.
\begin{tikzpicture}
\matrix [matrix of math nodes,left delimiter={[},right delimiter={]}]
{
1 & 2 & 1 & 0 & 0 & 10 \\
3 & 2 & 0 & 1 & 0 & 20 \\
-2 & -10 & 0 & 0 & 1 & 0 \\
};
\end{tikzpicture}
However, I would like to partition the matrix with a vertical line between columns 5 and 6, and a horizontal line between rows 2 and 3. Furthermore it could nice to have "identification variables" outside the brackets (top).



scopeand adding e.g.node distance=.3cmas an option to thescopeenvironment. The alignment can be improved by changing the anchor of the nodes tobase. For me it didn't work to put this in the options to thescopeenvironment (not sure why), but addinganchor=baseto all the nodes worked fine. – Torbjørn T. Aug 26 '11 at 17:23