Construct hadamard matrix of order 12 How do you construct a hadamard matrix of order 12?
Thank you!
 A: One possibility of constructing such Hadamard matrix is to use Paley construction.
In this construction we use a finite field with $q$ elements and:  


*

*For $q\equiv3\pmod4$ we get a matrix of order $(q+1)$.

*For $q\equiv1\pmod4$ we get a matrix of order $2(q+1)$. 


So for $q=5$ or $q=11$ we get a $12\times12$-matrix.
This construction is described also in the book van Lint J., Wilson R. A course in combinatorics, see Theorem 18.5. 
A: *

*A recursive method to construct Hadamard matrices of order $4.3^n$, $n\geq 1$, with the matrices for even $n$ having the additional property of being regular, was provided in the paper "A recursive construction for new symmetric designs" by Ionin and Kharaghani. 


(A regular Hadamard matrix is one where the row sums and column sums are constant)
Theorem 2.1 in the paper states,

Let matrices $A_n$ and $B_n$ be defined recursively for $n\geq 1$ by $A_n = B_{n-1} \otimes I$ and $B_n = A_{n-1} \otimes J+B_{n-1} \otimes Q$. Then for each $n\geq0$, $H_n = A_n + B_n$ and $H^{'}_n = A_n - B_n$ are Hadamard matrices and $H_{2n}$ is a regular Hadamard matrix. Furthermore, each row of every matrix $H_n$ can be represented as a $1\times 4$ block-matrix $[H_{n1}H_{n2}H_{n3}H_{n4}]$, where each block is  a $1 \times 3^n$ matrix, which in turn can be represented as a block-matrix $[X_1,X_2, \cdots ,X_{3^{n-1}}]$ with each block being a row of $\pm J$ or a row of $\pm(I+Q).$

with
$Q =
\left(
\begin{matrix}
0 & - & 1 \\
1 & 0 & - \\
- & 1 & 0 \\
\end{matrix}
\right)
$, 
$A_0 =
\left(
\begin{matrix}
- & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
\end{matrix}
\right)
$, 
$B_0 =
\left(
\begin{matrix}
0 & 1 & 1 & 1 \\
1 & 0 & - & 1 \\
1 & 1 & 0 & - \\
1 & - & 1 & 0 \\
\end{matrix}
\right)
$
$I$ is the identity matrix of order $4.3^n$ and $J$ is the matrix of all ones of order $4.3^n$
This should give you a family of pairs of Hadamard matrices for each value of n. 


*

*Another way to construct a Hadamard matrix of order 12 could be this:


Find a Generalized Hadamard matrix $GH$ of order 12 over an elementary abelian group of order 4 ($\mathbb{Z_{2}} \times \mathbb{Z_{2}}$). Denote the elements of the group as the set of vectors of dimension 2 over $GF(2)$.
As an example,
$EA_(4)$ = $\{(1,1),(1,-),(-,1),(-,-)\}$, the group operation is the component-wise product of two vectors.
The $GH$ matrix can be "split" to obtain 2 matrices. First, consider the matrix formed by taking the first element of each vector seperately, and another matrix formed by taking the second element of each vector seperately.
For eg.
for $GH(12,EA(4)) = [GH_{ij}]$, $1 \leq i \leq 12, 1 \leq j \leq 12$,
(The notation refers to the Generalized Hadamard matrix of order 12 over an elementary abelian group of order 4);
Form two matrices $H^1$ and $H^2$ of order 12, such that,
if $GH_{ij}$ = $(a,b)$, then $H_{ij}^1 = a$ and $H_{ij}^2 = b$.
Both $H^1$ and $H^2$ are Hadamard matrices.
You can find an example of $GH(12,EA(4))$, due to Jennifer Seberry here.
I'm not sure if this method will yield $k$ Hadamard matrices for every $GH(n,EA(2^k))$, $n$ divisible by $2^k$. I don't have a constructive proof of this yet, but I guess you can try and prove it by assuming that every element of an $EA(2^k)$ corresponds to a column of an Hadamard matrix of order $2^k$ obtained using Sylvester's construction.   
Cheers!
A: I'll translate what is said in the document I gave you the link for (from Hadamard's work). He explains how to construct a Hadamard matrix of order 12 (although he doesn't call them Hadamard matrices :))
Basically he starts by saying that columns must be groupped 3 by 3 in 4 seperate groups.
Next, he describes the first $3$ lines:


*

*The first line only has $1$'s.

*The second line has only $1$'s in the first two groups and $(-1)$'s in the last two groups

*The third line has alternating $1$'s and $(-1)$'s


And finally, he describes how the last $9$ lines are arranged:
Each of these lines is constructed in such a way that:


*

*The first and last groups each have $2$ positive elements and $1$ negative element.

*The second and third groups each have $1$ positive element and $2$ negative elements.


Note that in every line, each group has one element which sign is different from the two other elements in the group.
Also, these lines have to verify the following table:
$$\begin{array}{cc}1 & 1 & 1 & 1 \\ 1 & 2 & 2 & 2 \\1 & 3 & 3 & 3 \\ 2 & 1 & 2 & 3 \\ 2 & 2 & 3 & 1 \\ 2 & 3 & 1 & 2 \\ 3 & 1 & 3 & 2 \\ 3 & 2 & 1 & 3 \\ 3 & 3 & 2 & 1\end{array}$$
Where:


*

*Each $i$-th column of the table represents the $i$-th column group of the matrix.

*The numbers indicate the rank of the element which sign is different from the two other elements of the group


Note: He also has a similar approach for Hadamard matrices of order $20$ if you're interested ;)
