1
$\begingroup$

Please refer to https://en.wikipedia.org/wiki/Hadamard_matrix for the Sylvester's construction of Hadamard matrix.

Given a Hadamard matrix $H\in R^{n\times n}$, then how to get the value of $H_{ij}$ via a math function like $f(i,j)$?

$\endgroup$
1
$\begingroup$

I think that it looks as follows: Let $n=2^k$ and write the indices (from $0$ to $2^{k}-1$) in binary form: $i=i_0+2i_1+ ... 2^{k-1} i_{k-1}$ and $j=j_0+2j_1+ ... 2^{k-1} j_{k-1}$. Then $$ f(i,j)=\left( -1 \right)^{i_0j_0 + ... + i_{k-1}j_{k-1}} $$

$\endgroup$
  • $\begingroup$ Thanks. Yes this is correct. But I also remember that it can use i, j and 'mod' operation to get the desired answer. Now I just forgot.... $\endgroup$ – olivia Nov 4 '16 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.