How to solve this vector equation for optical flow I am unable to solve for $\textbf{h}$ in the following equation $\sum\limits_{\textbf{x}=1}^n2\partial F(\textbf{x})/\partial\textbf{x}(F(\textbf{x}) + \textbf{h}^{T}\partial F(\textbf{x})/\partial \textbf{x} - G(\textbf{x})) = \textbf{0}$ where $\textbf{h}$ and $\textbf{x}$ are column vectors of same dimension. Vector $\textbf{x}$ takes $n$ instances of values. $G(\textbf{x})$ and $F(\textbf{x})$ are scalar valued fucntions, taking vectors as input and producing saclars as output. The equation belongs to the seminal paper of Lucas-Kanade Optical flow shown here (4th page top left). I tried simplyfying the problem to : solve for $\textbf{x}$ in $\textbf{x}^{T}\textbf{y} = c$ where $\textbf{x}$ and $\textbf{y}$ are column vectors of same dimension and $c$ is a scalar. $c$ and $\textbf{y}$ are known. I guess my simplifaction is not correct. 
 A: After skimming the paper, it appears the the authors are applying the {$F,G$} functions to a finite set of points {$x_k$} in the region of interest.  I'll propose a slight change of notation that made thing simpler (to my mind, at least).
Let's denote 
$$\eqalign{
F_k &= F(x_k) \cr
G_k &= G(x_k) \cr
g_k &= \frac{\partial F(x_k)}{\partial x} \cr
}$$
Where the last definition is the gradient of $F$, which is needed for a Taylor approximation used in the paper.
The Taylor approximation can be recast in the above notation as
$$\eqalign{
F(x_k+h) &= F_k + g_k^Th \cr
}$$
Now the paper minimizes the function 
$$\eqalign{
L &= \sum_{k=1}^M \big(g_k^Th + F_k-G_k\big)^2 \cr
dL &= \sum_{k=1}^M 2\,\big(g_k^Th + F_k-G_k\big)g_k^Tdh \cr
\frac{\partial L}{\partial h} &= \sum_{k=1}^M 2\,\big(g_k^Th + F_k-G_k\big)g_k^T \cr
}$$
Setting the derivative to zero, transposing, and solving for $h$ 
$$\eqalign{
\sum_{k=1}^M\big(g_kg_k^Th\big) &= \sum_{k=1}^M \big(G_k-F_k\big)g_k \cr
\Big(\sum_{k=1}^Mg_kg_k^T\Big)\,h &= v \cr
Bh &= v \cr
h &= B^{+}v \cr
}$$
So the solution vector is something like
$$\eqalign{
h &= \Big(\sum_{k=1}^Mg_kg_k^T\Big)^{+}\,\Big(\sum_{k=1}^M (G_k-F_k)g_k\Big)
}$$
