(a) Given a configuration of $n$ points $\mathbf{a}_1, \ldots, \mathbf{a}_n$ in the plane, explain how to find the point $\mathrm{x} \in \mathbb{R}^2$ that minimizes the total squared distance $\sum_{i=1}^n\left\|\mathbf{x}-\mathbf{a}_i\right\|^2$.
(b) Apply your method when (i) $\mathbf{a}_1=(1,3), \mathbf{a}_2=(-2,5) ;($ ii $) \mathbf{a}_1=(0,0), \mathbf{a}_2=(0,1), \mathbf{a}_3=(1,0)$; (iii) $\mathbf{a}_1=(0,0), \mathbf{a}_2=(0,2), \mathbf{a}_3=(1,2), \mathbf{a}_4=(-2,-1)$.