# The equivalent of multiplying by $-1$ in $GF(4)$?

In $$\mathbb{R}$$, we have the notion of multiplying an element by $$-1$$. For example:

$$12 \in \mathbb{R}$$, then $$12 \times (-1) = -12 \in \mathbb{R}$$,

$$7 \in \mathbb{R}$$, then $$7 \times (-1) = -7 \in \mathbb{R}$$.

Now, assume we are in $$GF(4)$$ and its definition is a standard definition with elements $$\{0, 1, \omega, \bar{\omega}\}$$. We will label them as $$\{0, 1, 2, 3\}$$, respectively:

$$\begin{array}{|c|cccc|}\hline + & 0 & 1 & 2 & 3\\\hline 0 & 0 & 1 & 2 & 3\\ 1 & 1 & 0 & 3 & 2\\ 2 & 2 & 3 & 0 & 1\\ 3 & 3 & 2 & 1 & 0\\\hline \end{array}\qquad \begin{array}{|c|cccc|}\hline - & 0 & 1 & 2 & 3\\\hline 0 & 0 & 1 & 2 & 3\\ 1 & 1 & 0 & 3 & 2\\ 2 & 2 & 3 & 0 & 1\\ 3 & 3 & 2 & 1 & 0\\\hline \end{array}\qquad \begin{array}{|c|cccc|}\hline \times & 0 & 1 & 2 & 3\\\hline 0 & 0 & 0 & 0 & 0\\ 1 & 0 & 1 & 2 & 3\\ 2 & 0 & 2 & 3 & 1\\ 3 & 0 & 3 & 1 & 2\\\hline \end{array}\qquad \begin{array}{|c|cccc|}\hline \div& 0 & 1 & 2 & 3\\\hline 0 & - & 0 & 0 & 0\\ 1 & - & 1 & 3 & 2\\ 2 & - & 2 & 1 & 3\\ 3 & - & 3 & 2 & 1\\\hline \end{array}\qquad$$

It is usually understood that $$-x$$ is the additive inverse so that for any element $$x \in GF(4)\,\,$$, $$x + (-x) = 0$$.

I am interested in multiplying by $$-1$$ in $$GF(4)$$ defined as the same mathematical meaning as ordinary multiplying by $$-1$$ in $$\mathbb{R}$$. How would I go about doing something like this?

In the case where you would like more context, this deals with finding determinant of a matrix with elements in $$GF(4)$$ and multiplying by $$-1$$ is a necessary condition.

• In the four-element field, $-1=1$, so multiplying by $-1$ is the same as doing nothing at all. Dec 31, 2020 at 18:16
• Who names the elements of the field with 4 elements $0,1,2,3$ ??? Dec 31, 2020 at 18:17
• It's misleading to label the elements of $\operatorname{GF}(4)$ as $\{0, 1, 2, 3\}$, since $0 = 1 + 1$ (which is usually taken to be the definition of $2$) and $1 = 1 + 1 + 1$ in $\operatorname{GF}(4)$. Dec 31, 2020 at 18:18
• In any field of characteristic $2$, the ordinary definition of $\det(A)=\sum_{\sigma\in S_n}\prod_{i=1}^n\operatorname{sgn}(\sigma)a_{i,\sigma(i)}$ is still valid but you can completely omit $\operatorname{sgn}(\sigma)$ because its value is $1$ no matter what, as $-1=1$.
– user700480
Dec 31, 2020 at 18:24
• @DanielHast For the purposes of computer implementations it is useful to represent elements of $GF(2^m)$ as blocks of $m$-bits, when the elements of $GF(4)$ are $00,01,10,11$. That way addition becomes bitwise XOR, an elementary operation readily available in all processors. So it is not unnatural to refer to those by the natural numbers they correspond to in base $2$. I do see your point. Many students working on such applications are not well enough versed in algebra, and the resulting confusion is terrible to behold. Plenty of evidence of that on this site. Jan 1, 2021 at 8:17

$${GF(4)= \{0,1,w,w^2\}}$$ Now, $${w+1=w^2}$$, so $${w^3=w \cdot w^2=w \cdot(1+w)=w+w^2=w + (1+w)=1}$$, so $${w^2}$$ is multiplicative inverse of $${w}$$.
• Now if you create the same field with $${Z_2[x]}$$ with irreducible polynomial $${X^2+X+1}$$, then you will have the set $${\{0,1,X,X+1\}}$$
• in $${GF(2^n)}$$ we consider $${1=-1}$$ , Hence $${X-1}$$ is same as $${X+1}$$ as mentioned by @Stinking Bishop
Well, $$GF(4)$$ has $$GF(2) = \{0,1\}$$ as a subfield. In this subfield, $$-1=1$$ as you work modulo 2.