Apologies if this has already been asked - I could not find it.
The following is an example of what goes wrong:
In this example I would like it to look just like a regular 2x3 table, but I think the problem is that draw starts from the end of the math, not the end of the cell. (I'd prefer to not just use tabular as I will be arrows between columns ultimately)
\begin{tikzpicture}
\matrix[matrix of math nodes,nodes in empty cells,nodes={anchor=center},text depth=0.5ex,text height=2ex,inner sep=2pt,row sep=1.5em,column sep=1.5em,] (M)
{
0 & 0 & 0 \\
a+b+c+d+e & a+b+c+d+e & a+b+c+d+e \\
} ;
\draw[] (M-1-1.north west) -- (M-1-3.north east);
\draw[] (M-2-1.north west) -- (M-2-3.north east);
\draw[] (M-2-1.south west) -- (M-2-3.south east);
\draw[] (M-1-1.north east) -- (M-2-1.south east);
\draw[] (M-1-2.north east) -- (M-2-2.south east);
\draw[] (M-1-3.north east) -- (M-2-3.south east);
\end{tikzpicture}