# Grid of grids in TikZ

How is it possible to make a grid of smaller grids, say 3x3, which are separated/ padded? (the small grids are also aligned vertically/horizontally in a grid). I believe we may use some form of \draw (x,y) grid (a,b) and \foreach loop, but I'm not sure how to combine that to make it. For instance, this code produces two grids next to each other but one of the edges is missing for some reason for me.

\documentclass{article}

\begin{document}
\begin{tikzpicture}

\draw [step=5mm, thick] (2.5 - 1.5, -2.5 + 1.5) grid (2.5 - 3, -2.5+ 3);

\draw [step=5mm, thick] (2.5*2 - 1.5, -2.5 + 1.5) grid (2.5*2 - 3, -2.5+ 3);

\end{tikzpicture}

\end{document}

• Your question leaves all the effort to our community, even typing the essentials of a TeX document such as \documentclass{}...\begin{document} etc. As it is, most of our users will be very reluctant to touch your question, and you are left to the mercy of our procrastination team who are very few in number and very picky about selecting questions. You can improve your question by adding a minimal working example (MWE) that more users can copy/paste onto their systems to work on. If no hero takes the challenge we might have to close your question. – Tiuri Nov 13 at 17:09

like this

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}

\foreach \xx in {0,1,...,5}{
\foreach \yy in {0,1,...,5}{
\draw [xshift={\xx*2cm},yshift={\yy*2cm},step=5mm, thick] (2.5 - 1.5, -2.5 + 1.5) grid (2.5 - 3, -2.5+ 3);
}
}

\end{tikzpicture}

\end{document}