I tried to draw the following diagram in LaTeX

I reference the method from here:
I can successfully compile the code from above link, but when I attempted to draw more lines between A and B by modifying the number in the:
\draw[shorten <=-1cm,shorten >=-1cm,-latex] (m-4-2.south west)--(m-4-2.south east);
\draw[shorten <=-1cm,shorten >=-1cm,-latex] (m-7-2.south east)--(m-7-2.south west);
I always got the error message said:
Package pgf Error: No shape named m-5-2 is known.
Any solution for this problem? Thanks.

m-4-2means: node in row 4 and column 2; if your matrix has no nodes in that cell, you get that error. – Claudio Fiandrino May 18 '14 at 06:51\nodeinside amatrix of nodes(see e.g. http://tex.stackexchange.com/questions/163319/compilation-problem-with-tikz-diagram/163571#163571). Is this the case? – Torbjørn T. May 18 '14 at 07:12