i have an equation
$\sum_{i=0}^m [w^{(i)}[(c-a^{(i)})-\frac{d^{(i)}(c-a^{(i)})\cdot d^{(i)}}{dis^2}]]=0$ Where:
$a,b$ are two end points in a 3D Line. $d$ is a vector and vector $d=b-a$. the magnitude of the vector $|d|=dis$. I have many lines and therefore, i have many $a,b$ points. thats why above equation represent $a,d$ as $a^{(i)},d^{(i)}$ . However, this $dis$ is single scalar value and others have $3$ value components. this $\cdot$ is the dot product of the vector $c-a$ and vector $d$. $w^{(i)}$ is the weight (of a line).
As i said earlier, I have many points which represent different lines and thus i am using $a^{(i)}$ and $d^{(i)}$ to represent a point on a line and direction vector of line. but I have a one point which is outside to the lines and represent as $c$. Assume $i$ is lasting from $0$ to $m$. If I say the coordinates of points $a^{(i)},b^{(i)}$ are as $(x_1,y_1,z_1)^{(i)},(x_2,y_2,z_2){(i)}$ respectively. and the coordinate of point $c$ as $(x_0,y_0,z_0)$. then How do I convert this equation in to matrix form $[A][X] = [B]$. where $X$ represent the componenets of $c$ as this $(x_0,y_0,z_0)$ are unknown that i need to solve.
Please convert this equation to matrix form!