0

Is there a way to find the negation (i.e. logical not) of a binary vector by doing some matrix-vector operation on the original vector?

Let's say we have a binary vector x = [1 0 1 1]. One can easily say that negation form of x is [0 1 0 0]. How can this be formulated through some matrix-vector operation?

Thank you in advance.

Ash
  • 117
  • 11

1 Answers1

0

Not directly. But if you can go to homogeneous coordinates (i.e., add a component of 1 at the end of the vector), your matrix looks as follows:

-1  0  0  0  0  …  1
 0 -1  0  0  0  …  1
 0  0 -1  0  0  …  1
 0  0  0 -1  0  …  1
 0  0  0  0 -1  …  1
 …  …  …  …  …  …  …
 0  0  0  0  0  …  1
Nico Schertler
  • 32,049
  • 4
  • 39
  • 70