# If $(x_i,y_i) , i=1,2,3$ does not satisfy a linear equation then it must satisfy a quadratic one

Let $(x_i,y_i) \in \mathbb{Z}/3\mathbb{Z}\times \mathbb{Z}/3\mathbb{Z}$ for $i=1,2,3$ be three distinct points, then if these points do not satisfy a linear equation like $$ax+by = c$$ for $(a,b)\in \mathbb{Z}/3\mathbb{Z}\times \mathbb{Z}/3\mathbb{Z} \setminus \{(0,0)\}$ and $c \in \mathbb{Z}/3\mathbb{Z}$ then they satisfy a quadratic equation like: $$(x-a)^2 + (y-b)^2= c$$ where $a,b \in \mathbb{Z}/3\mathbb{Z}$ and $c \in \mathbb{Z}/3\mathbb{Z} \setminus \{0\}$

### Proof

When expanding the quadratic equation above one gets ($\tilde c = a^2+b^2-c)$:

$$\begin{cases} x_1 a+y_1 b + \tilde c = -x_1^2-y_1^2\\ x_2 a+ y_2 b + \tilde c = -x_2^2-y_2^2\\ x_3 a+ y_3 b + \tilde c = -x_3^2 -y_3^2 \end{cases}$$

When the deteriminant of the above would be 0, then $(x_i,y_i), i=1,2,3$ would satisfy

$$(y_2-y_3)x+(x_3-x_2)y = x_3y_2-x_2y_3$$ which contradicts the claim that it does not satisfy any linear equation of this form.

This means the determinant is non-zero and then it leads to a unique solution $a,b,\tilde c$.

### Question

Can someone clarify how one derives: $$(y_2-y_3)x+(x_3-x_2)y = x_3y_2-x_2y_3$$

I guess the claim is actually: the rank of the system of equations is 3 which would result in a unique solution (for $a,b,\tilde c$). Let the rank be less than 3 then

$$\begin{vmatrix} x_1 & y_1 & -x_1^2-y_1^2 \\ x_2 & y_2 & -x_2^2-y_2^2\\ x_3 & y_3 & -x_3^2-y_3^2 \end{vmatrix} = 0$$

And then I should be able to derive the equation from this determinant, but I haven't been able to do so.

I've also tried a (eq 2) $-$ (eq 3), but that didn't really resulted in anything useful.

• I think there are some typos at the RHS of your system of equations. – paf Aug 13 '16 at 20:10
• Moreover, you may note that if $x\in\Bbb Z/3\Bbb Z$, then $x=0$ or $x^2=1$. – paf Aug 13 '16 at 20:13
• Woops fixed the typo's, thnx. How can $x^2=0 \vee x^2 = 1$ be used? – dietervdf Aug 13 '16 at 20:15
• @paf As Batominowski's answer shows, this result is valid in all fields with characteristic not equal to $2$, so one shouldn't need to use that. @${}$dietervdf A readability tip - unless you're working in the context of symbolic logic, you should avoid using the vee symbol $\vee$ to mean 'or'. Use the word 'or' instead. – John Gowers Aug 13 '16 at 22:29
• @Batominovski The second one is actually a fake non-working reference. There's some empty MathJax - ${}$ - between the @ sign and the name. – John Gowers Aug 13 '16 at 22:35

Geometric Solution

Replace $3$ by $p$, where $p=0$ or $p$ is an odd prime natural number, and $\mathbb{F}_3=\mathbb{Z}/3\mathbb{Z}$ by any field $\mathbb{K}$ of characteristic $p$. The affine space $\mathbb{K}\mathbb{A}^2$ is equipped with the standard inner product $\langle\_,\_\rangle$: $$\big\langle\left(u_1,v_1\right),\left(u_2,v_2\right)\big\rangle=u_1u_2+v_1v_2$$ for all $u_1,u_2,v_1,v_2\in \mathbb{K}$.

Let $A_i:=\left(x_i,y_i\right)$ for $i=1,2,3$. The (signed) area of the triangle $A_1A_2A_3$ is $$\Delta:=\frac{x_2y_3-x_3y_2+x_3y_1-x_1y_3+x_1y_2-x_2y_1}{2}\,.$$ If the $A_i$'s are collinear, which happens when $$\Delta=0\,,$$ then we are done. In fact, the three points satisfy a single linear equation $$\left(y_2-y_1\right)\,\left(x-x_1\right)-\left(x_2-x_1\right)\,\left(y-y_1\right)=0\,.$$

If $\Delta\neq 0$, then we can find perpendicular bisectors (with respect to $\langle\_,\_\rangle$) of $A_2A_3$, $A_3A_1$, and $A_1A_2$ (noting that bisection is possible as the field has characteristic not equal to $2$). These perpendicular bisectors must concurrent at a point $O=(a,b)$. It follows easily that there exists $c\in\mathbb{K}$ with $$\left(x_i-a\right)^2+\left(y_i-b\right)^2=c$$ for every $i=1,2,3$. Indeed, $$a=\frac{\left(y_2-y_3\right)\left(y_3-y_1\right)\left(y_1-y_2\right)-x_1^2\left(y_2-y_3\right)-x_2^2\left(y_3-y_1\right)-x_3^2\left(y_1-y_2\right)}{4\Delta}$$ and $$b=\frac{\left(x_2-x_3\right)\left(x_3-x_1\right)\left(x_1-x_2\right)-y_1^2\left(x_2-x_3\right)-y_2^2\left(x_3-x_1\right)-y_3^2\left(x_1-x_2\right)}{4\Delta}\,,$$ which gives $$c=\frac{\left(\left(x_2-x_3\right)^2+\left(y_2-y_3\right)^2\right)\left(\left(x_3-x_1\right)^2+\left(y_3-y_1\right)^2\right)\left(\left(x_1-x_2\right)^2+\left(y_1-y_2\right)^2\right)}{16\,\Delta^2}\,.$$

Note that, if the roots of $z^2+1=0$ are not in $\mathbb{K}$, then $c\neq 0$. In particular, when $p=3$ and $\mathbb{K}=\mathbb{F}_3$, we always have $c\neq 0$. Otherwise, $c$ can be $0$. An example is when $p=5$, $\mathbb{K}=\mathbb{F}_5$, $\left(x_1,y_1\right)=0$, $\left(x_2,y_2\right)=(1,2)$, and $\left(x_3,y_3\right)=(2,1)$, where $\Delta=1$, $a=0$, $b=0$, and $c=0$ (this is one weird circle---it passes through its center and is essentially the union of two lines intersecting at the center).

I haven't thought about this question when the characteristic of $\mathbb{K}$ is $2$. There is probably a counterexample (i.e., there may exist three non-collinear points which are not cyclic).

P.S.: The midpoint of $(u,v)$ and $(u',v')$ is given by $\left(\frac{u+u'}{2},\frac{v+v'}{2}\right)$. Hence, the perpendicular bisector of the segment connecting $(u,v)$ and $\left(u',v'\right)$ is given by the equation $$\left(u-u'\right)\,\left(x-\frac{u+u'}{2}\right)+\left(v-v'\right)\left(y-\frac{v+v'}{2}\right)=0\,.$$