how many points belong to the quadric $x_0^2+x_1^2+x_2^2+x_3^2=0$ in $\mathbb{P}_3$ over $\mathbb{F}_9$ I have a problem with the following question: how many points belong to the quadric $x_0^2+x_1^2+x_2^2+x_3^2=0$ in $\mathbb{P}_3$ over $\mathbb{F}_9$. 
How I tried to solve this problem. Here we have $9^4$ sets of $x_i$, but for every set we can choose only 3  first values ($x _0$,$x_1$ and $x_2$), then we can count $x_3$ for every triplet. So we have $9^3$ sets. Then for every set of $x _0$, $x_1$, $x_2$, $x_3$ which is solution $ax _0$, $ax_1$, $ax_2$, $ax_3$ is also a solution ($a$ is a non zero element of $\mathbb{F}_9$). So we have $(9^3-1)/8=91$ options. But it is still too much! And I don't know any other ways of counting the amount of points. 
Sorry for my English, thank you! 
 A: The idea of @user670344:
Over every finite field $F$ the equation $a^2 + b^2 = -1$ has a solution. For the matrix $A = \left(\begin{matrix} a & -b \\  b & a\end{matrix}\right)$ we have $A^t \cdot A = - I_2$. We conclude that the quadratic forms $x^2 + y^2$ and $- x^2 - y^2$ are equivalent.  Therefore, over any finite field the quadratic forms $x_0^2 + x_1^2 + x_2^2 + x_3^2$ and $x_0^2 - x_1^2 + x_2^2 - x_3^2$ are equivalent.
If  $\operatorname{char} F\ne 2$  then the last form is equivalent to $Q=y_0 y_1 - y_2 y_3$.
Now, over any field, the zero set of $Q$ in $\mathbb{P}_3(F)$ is in bijection with $\mathbb{P}_1(F) \times \mathbb{P}_1(F)$ by the map
$$([a_0\colon a_1], [b_0, b_1])\mapsto [a_0 b_0\colon a_2 b_2 \colon a_0 b_1 \colon a_1 b_0]$$
(a matrix $2\times 2$ of rank $1$ is a product of matrices  $2\times 1$ and $1\times 2$).
Conclusion: over any field of odd cardinality $q$ the quadric $Q$ has $(q+1)^2$ elements.
A: You can try a brute force approach: Simply have a small computer program iterate over all the possible values for your $x_i$. For example in Sage:
from itertools import product
F9 = FiniteField(9)
len([(a,b,c,d) for a,b,c,d in product(F9, repeat=4) if a*a+b*b+c*c+d*d==0])

You will find 801 combinations. One of them is the null vector. And for each of the other values, you get $9-1=8$ possible representations of each point. So you have 100 points on your quadric. Of course if you already use Sage for finite field arithmetic (as I do because I'm lazy), you can leave the rest to it, too:
P3.<x0,x1,x2,x3> = ProjectiveSpace(3, F9)
s = P3.subscheme(x0^2+x1^2+x2^2+x3^2)
s.count_points(1)         # 1 because we want this for field of size 9^1
len(s.rational_points())  # without len this gives you the coordinates

