I have read everywhere that the resolution of the linear system
$$Ax+b=0$$
where $A\in S_n(\mathbb R)$ and $b\in \mathbb R^n$ is equivalent to the resolution of the following optimization problem:
$$f(x)=\frac 12\langle Ax,x\rangle+\langle b,x\rangle.$$
Which means that if $x\in \mathbb R^n$ minimize the function $f(x)=\frac 12\langle Ax,x\rangle+\langle b,x\rangle$, then $x$ is solution of the linear sytem $Ax+b=0$ where $A\in S_n(\mathbb R)$.
I do not understand why this should be true... Can someone please explain it?