It's easy to generate a 12x12 grid such that:
- Each row contains the numbers 1 - 12
- Each column contains the numbers 1 - 12
- No row or column contains the same number twice
I am trying to determine if it's possible to generate a 12x12 grid where each cell contains two numbers -- A RED number between 1 and 12 and a BLUE number between 1 and 12 -- for which the following is true:
- If you consider ONLY the RED numbers, the grid satisfies the three conditions above
- If you consider ONLY the BLUE numbers, the grid satisfies the three conditions above
- Every one of the 144 blue-red combinations is present in the grid.
I am pretty certain it's possible because I can do it with 3x3 and 4x4. Here is the 4x4, for example:
How can I generate the 12x12 grid?
UPDATE:
Arthur's answer below gave me enough info to create one. I am curious about an algorithm though. I'm guessing there is one based on the fact that this problem appears to fall into a documented category of problems (thanks Lord Shark the Unknown for point it out!!): https://en.wikipedia.org/wiki/Graeco-Latin_square
If anybody finds an algorithm I would love to see it.

Take your $4\times 4$ solution, then do it once more for 5-8, and once more for 9-12. Put them on top of one another. You now have a $12\times 4$ that is the start of a $12\times12$.
A $12\times12$ has $3\times 3$ blocks of size $4\times 4$. We have filled in the first three blocks. Call the pattern in the first block (your example) $\color{red}{A}\color{blue}{A}$, where the red $\color{red}{A}$ represents the pattern of the red numbers, and the blue $\color{blue}{A}$ represents the pattern of the blue numbers in that block. Similarly, call the other blocks $\color{red}{B}\color{blue}{B}$ and $\color{red}{C}\color{blue}{C}$.
Now fill in the rest of the large $3\times 3$ with your $3\times3$ solution on $A,B,C$, and then fill in for each $A,B,C$ the corresponding $4\times4$ pattern of coloured numbers. (If your $3\times 3$ solution doesn't start with the column $\color{red}{1}\color{blue}{1}, \color{red}{2}\color{blue}{2},\color{red}{3}\color{blue}{3}$, feel free to rearrange my block naming correspondingly.)