Question: How to write a special matrix?

Hello everyone.  Let n be a positive number; I seek how to write the matrix Z\in M_{2^n,n} that is defined as follows:

for every i,j, Z_{ij}\in \{-1,1\}.

When I consider the 2^n rows of Z, I want to find ALL the possible sequences of length n with the entries +-1. A toy example, when n=2, is Z=\begin{pmatrix}1&1\\1&-1\\-1&1\\-1&-1\end{pmatrix}.

Thanks in advance;

Please Wait...