$\underset{x\in \mathbb{R}^n}{\min}\frac{1}{2}||r(x)||^2_2$ , where
$$ ⁍ $$
$r_i(x):\mathbb{R}^n→\mathbb{R}$
$i=1 \ldots m$
m outputs, n inputs
Special case: Linear Least-Sq:
$\begin{aligned}r(x)=\begin{bmatrix}r_1(x) \\ r_2(x)\\ \vdots\\ r_m(x)\end{bmatrix}& =\begin{bmatrix}b_1-a^T_1x \\ b_2-a^T_2x\\ \vdots\\ b_m-a^T_mx\end{bmatrix}=[b_i-a^T_ix]^m_{i=1}\\ &=b-Ax\end{aligned}$
where $A=\begin{bmatrix}-a^T_1-\\-a^T_2-\\ \vdots\\ -a^T_n-\end{bmatrix}$, and $A$ is $m \times n$
$m>n$: overdetermined
$m<n$: underdetermined
More generally, nonlinear model:
$r_i(x)=b_i-f_i(x)$, $f_i(x):\mathbb{R}^n→\mathbb{R}$
Example: position estimation→ “sensor localization”
nonlinear LS form: to obtain position estimate
$\underset{x\in \mathbb{R}^2}{\min}\sum_{i=1}^m(\lVert x-b_i\rVert_2-s_i)^2$
m beacons $b_i \in \mathbb{R}^2$, $i=1 \ldots m$