add documentation for hadamard and magic matrix