[step:Encode the Latin squares as an orthogonal array]Let $S:=\{1,\dots,n\}$ be the common symbol set, after relabelling symbols if necessary. We use the standard definitions of a [Latin square](/page/Latin%20Square) and of [orthogonal Latin squares](/page/Orthogonal%20Latin%20Squares). For each $k\in\{1,\dots,m\}$, view the Latin square $L_k$ as a map
\begin{align*}
L_k:S\times S &\to S.
\end{align*}
Define the column index set
\begin{align*}
C:=\{\rho,\kappa\}\cup\{1,\dots,m\},
\end{align*}
where $\rho$ denotes the row-coordinate column, $\kappa$ denotes the column-coordinate column, and $k\in\{1,\dots,m\}$ denotes the symbol column coming from $L_k$.
Define an array map
\begin{align*}
A:S\times S\times C &\to S
\end{align*}
by declaring the row-coordinate value
\begin{align*}
A(i,j,\rho)&:=i,
\end{align*}
the column-coordinate value
\begin{align*}
A(i,j,\kappa)&:=j,
\end{align*}
and, for each $k\in\{1,\dots,m\}$, the Latin-square value
\begin{align*}
A(i,j,k)&:=L_k(i,j).
\end{align*}
We claim that for any two distinct columns $c,d\in C$ and any ordered pair $(a,b)\in S\times S$, there is exactly one cell $(i,j)\in S\times S$ such that
\begin{align*}
A(i,j,c)=a,\qquad A(i,j,d)=b.
\end{align*}
If $(c,d)=(\rho,\kappa)$, the unique cell is $(a,b)$; if $(c,d)=(\kappa,\rho)$, the unique cell is $(b,a)$. If one column is a coordinate column and the other is $k$, the Latin property gives uniqueness in each ordered placement. When $(c,d)=(\rho,k)$, the conditions are $i=a$ and $L_k(a,j)=b$, so the row $a$ of $L_k$ contains the symbol $b$ at exactly one column $j\in S$. When $(c,d)=(k,\rho)$, the conditions are $L_k(i,j)=a$ and $i=b$, so the row $b$ of $L_k$ contains the symbol $a$ at exactly one column $j\in S$. The two cases involving $\kappa$ are analogous but use columns of $L_k$: for $(c,d)=(\kappa,k)$ one fixes $j=a$ and finds the unique $i\in S$ with $L_k(i,a)=b$, while for $(c,d)=(k,\kappa)$ one fixes $j=b$ and finds the unique $i\in S$ with $L_k(i,b)=a$. If $c=k$ and $d=\ell$ are two distinct Latin-square columns, then orthogonality of $L_k$ and $L_\ell$ says exactly that the map $S\times S\to S\times S$ sending $(i,j)$ to $(L_k(i,j),L_\ell(i,j))$ takes each ordered pair in $S\times S$ exactly once.[/step]