Consider the matrix form $A\mathbf{x} = \mathbf{b}, \ A\in \mathbb{R}^{m\times n}$. Consider the matrix form
\begin{equation*}
A\mathbf{x} = \mathbf{b}, \quad A\in \mathbb{R}^{m\times n}
\end{equation*}
of a linear system of $m$ equations in $n$ unknowns $\mathbf{x} = (x_1,\ldots,x_n)$.
1. Show that if $\mathbf{x}_p$ and $\mathbf{x}_p'$ are solutions of this system, then
\begin{equation*}
\mathbf{x}_p-\mathbf{x}_p'\in \text{null}(A).
\end{equation*}
Suppose that $\mathbf{x}_p$ and $\mathbf{x}_p'$ are solutions to $A\mathbf{x} = \mathbf{b}$, i.e. $A\mathbf{x}_p = \mathbf{b} = A\mathbf{x}_p'$. Then $A(\mathbf{x}_p-\mathbf{x}_p') = A\mathbf{x}_p-A\mathbf{x}_p' = \mathbf{b}-\mathbf{b} = 0$, and so $\mathbf{x}_p-\mathbf{x}_p'\in \text{null}(A)$ as required.
2. Show that if $\mathbf{x}_p$ is a solution and $\mathbf{x}_b\in \text{null}(A)$, then $\mathbf{x}_p+\mathbf{x}_b$ is a solution.
Suppose that $\mathbf{x}_p$ is a solution to $A\mathbf{x} = \mathbf{b}$, i.e. $A\mathbf{x}_p = \mathbf{b}$, and if $\mathbf{x}_b\in \text{null}(A)$, then $\mathbf{x}_p+\mathbf{x}_b$ is a solution because $A(\mathbf{x}_p+\mathbf{x}_b) = A\mathbf{x}_p+A\mathbf{x}_b = A\mathbf{x}_p = \mathbf{b}$.
3. Conclude that the set of all solutions is
\begin{equation*}
\mathbf{x}_p+\text{null}(A),
\end{equation*}
provided that there is at least one solution $\mathbf{x}_p$. Give an example where there are no solutions.
I am having trouble with this question. I'm not sure if this helps but if $v$ is a solution (by part 1.), $x:= v-u\in \text{null}(A)$. But $v = (v-u)+u = x+u$.
Thanks!
 A: Yes. Your idea in (3.) completes the problem. Here is a just a formal reorganization of it:
If $\text{Sol}_{\mathbf{A}, \mathbf{b}}$ is your solution set to $\mathbf{A}\mathbf{x} = \mathbf{b}$, then your work from (2.) shows that $\big(\mathbf{x}_p + \text{null}(A)\big) \subseteq \text{Sol}_{\mathbf{A}, \mathbf{b}}$.
Conversely if $\mathbf{s} \in \text{Sol}_{\mathbf{A}, \mathbf{b}}$ is any arbitrary solution, then your idea shows that $\mathbf{s}_0 = \mathbf{s} - \mathbf{x_p} \in \text{null}(A)$ and you can rewrite $\mathbf{s}$ as $\mathbf{s} = \mathbf{x}_p + \mathbf{s}_0 \in \big(\mathbf{x}_p + \text{null}(A)\big)$. So $\text{Sol}_{\mathbf{A}, \mathbf{b}}  \subseteq \big(\mathbf{x}_p + \text{null}(A)\big)$.
Hence $\text{Sol}_{\mathbf{A}, \mathbf{b}} = \big(\mathbf{x}_p + \text{null}(A)\big)$.
A: Let $v $ be a solution of $A\mathbf{x} = \mathbf{b}$. So, $Av=\mathbf{b}=A\mathbf{x_p}$, which implies $v-\mathbf{x_p}\in\textrm{null}(A) $. Hence  $v-\mathbf{x_p}=n $ or, $v=\mathbf{x_p}+n $, where  $n\in\textrm{null}(A) $.
A: You have essentially finished the proof. You have proved that any solution $u$ of the form $u =v-x=u+(-x)$ where $-x \in null(A)$ (because $x \in null (A)$. Conversely any vector of this form is a solution.  For example where there is no solution take $A=0$ and $b \neq 0$. 
A: If $v$ is a solution, then put $u=v-x_p$ and show that $v-x_p \in \text{null}(A).$ Hence
\begin{equation*}
v \in x_p+\text{null}(A).
\end{equation*} 
