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!
Write $\hat{d}{}^i$ for $d^i/|d^i|$. Thus we can remove the factor of $dis^2$ from the original equation by replacing each $d^i$ with $\hat{d}{}^i$. Now let $\otimes$ denote the outer product. Furthermore note that the vector $\hat{d}{}^i(\hat{d}{}^i\cdot\vec{c})$ can actually be rewritten as the product $(\hat{d}{}^i\otimes\hat{d}{}^i)\vec{c}$, and similarly for the $a^i$s - I recommend checking this yourself for good exercise. Now we can define the matrix $P=\sum_{i=0}^mw^i(I-\hat{d}{}^i\otimes\hat{d}{}^i)$ and the vector $\vec{\alpha}=\sum_{i=0}^m\vec{a}{}^i$. Let $I$ be the identity matrix. Then the original equation can be abridged to just $P(\vec{c}-\vec{\alpha})=\vec{0}$. You write $\vec{x}=\vec{c}$ and desire the equation $A\vec{x}=\vec{b}$. You should be able to see what you want to do from there.