I have been given a set of points $(x_i,y_i)$ for $i = 1...N$. I am trying to fit a general line model onto the points with the following constraint:
$a^2+b^2+c^2 = 1$
I have also been given that using the Algebraic distance function $d = ax_i+by_i+c$ we are defining the error function as $E = \sum_{i=0}^N (ax_i+by_i+c)^2 -λ(a^2+b^2+c^2-1)$ where $\lambda$ is the Lagrange multiplier.
Finally, I am asked to derive the line equation for the parameters $a,b,c$.
I know that my solution will be in the following form:

I know I need to compute the partial derivative of E with respect to something, however, computing the partial derivative with respect to $a,b,c$ would only give me three solutions. How am I supposed to get 9 solutions to fill the 3x3 matrix?