I am trying to highlight elements of a matrix by drawing blocks around them. However some portion of blocks is not visible as you can see in the following image
I created this by using the code posted here: Highlight elements in the matrix
How do I adjust the coordinates of these boxes so that they look like concentric rectangles.
MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows,matrix,positioning}
\begin{document}
\begin{tikzpicture}
\matrix [matrix of math nodes,left delimiter=(,right delimiter=)] (m)
{
8 &8 &1 &6 \\
3 &8 &5 &7 \\
4 &8 &9 &5 \\
};
\draw[color=red] (m-1-1.north west) -- (m-1-3.north east) -- (m-2-3.south east) -- (m-2-1.south west) -- (m-1-1.north west);
\draw[color=red,double,implies-](m-1-2.north) -- +(0,0.3);
\draw[color=blue] (m-1-1.north west) -- (m-1-2.north east) -- (m-2-2.south east) -- (m-2-1.south west) -- (m-1-1.north west);
\end{tikzpicture}
\end{document}

