The probability of satisfying $a_1x_1 + a_2x_2 + ... \equiv a_{n+1} \mod p$ where p is prime The textbook I'm reading claims that the probability of finding a satisfying solution to $a_1x_1 + a_2x_2 + ... \equiv a_{n+1} \mod p$ where $a_1...a_{n+1}$ are constants is always $\frac{1}{p}$ if $p$ is prime. The textbook then moves on to a completely different topic. I'm not sure why it's the case? any insight on how to think about this? 
I can see that $a_1x_1 \equiv a_{n+1} \mod p$ has a probability of $\frac{1}{p}$ because there is only one possible solution. This is because $p$ is prime. But I don't know why it is the same probability when we involve more variables? 
Thanks
 A: All math modulo $p$.
To be extremely precise, you need this disclaimer:

If $a_1 = a_2 = \dots = a_n = 0$, then the probability is either $1$ (if $a_{n+1} = 0$) or $0$ (if $a_{n+1} \neq 0$).

Now that such a special case is out of the way, we can assume some $a_j \neq 0$.  Then we can rearrange the equation as
$$x_j = a_j^{-1} (a_{n+1} - \sum_{i = 1\\i \neq j}^n a_i x_i )$$
In other words, no matter how you choose the values of the other $x_i$, there is exactly one $x_j$ which satisfies the equation.  Thus the probability for a uniformly random vector is $1/p$.
(In fact this proof shows that you just need uniform randomness at one variable where the coefficient is non-zero... the other variables can be random in some non-uniform way, or chosen by an adversary, etc.)
You are absolutely right that $p$ being prime is used to provide the existence of the inverse $a_j^{-1}$.
(If $p$ is composite, the proof still works as long as you have a uniform random variable with a coefficient $a_j$ which has an inverse.  E.g. in modulo $6$, we have $1\times 1 = 5 \times 5 = 1$, so if any coefficient is $1$ or $5$, the probability will still be $1/p$.)
