I'm implementing a computer vision algorithm for 3D point reconstruction from photos (Tomasi-Kanade). For the last day I've been stuck on a linear algebra problem. The system that I want to solve has $3m$ equations, with $m$ as the amount of photos, for which I want to solve for $L$:
$$a_{i1}^T L a_{i1} = 1$$
$$a_{i2}^T L a_{i2} = 1$$
$$a_{i1}^T L a_{i2} = 0$$
where $a_{ij}$ is a $3$-vector and $L = C C^T$ where $C$ is a $3 \times 3$ matrix. To solve it, it should be in the form of $Ax = b$. Had $a_{ij}$ been an invertible matrix, the equations could be rewritten as follows
$$a_{ij}^T L a_{ij} a_{ij}^{-1} = c a_{ij}^{-1} \rightarrow a_{ij}^T L = c a_{ij}^{-1}$$
but this can't be done since they are vectors.
I'm sure there is a simple step to solve this, but my linear algebra is a lot worse than it used to be and I just can't wrap my head around it.
$L$ can be written in detail as $$ L = \begin{bmatrix} L_{11} & L_{12} & L_{13} \\ L_{12} & L_{22} & L_{23} \\ L_{13} & L_{23} & L_{33} \end{bmatrix}. $$ If $u = \begin{bmatrix} u_1 \\ u_2 \\ u_3 \end{bmatrix}$ then \begin{align} u^T L u &= u_1^2 L_{11} + u_2^2 L_{22} + u_3^2 L_{33} + 2 u_1 u_2 L_{12} + 2 u_1 u_3 L_{13} + 2 u_2 u_3 L_{23} \\ &= \begin{bmatrix} u_1^2 & u_2^2 & u_3^2 & 2 u_1 u_2 & 2 u_1 u_3 & 2 u_2 u_3 \end{bmatrix} \begin{bmatrix} L_{11} \\ L_{22} \\ L_{33} \\ L_{12} \\ L_{13} \\ L_{23} \end{bmatrix}. \end{align} This shows how to convert equations 1-3 to matrix notation.
Once you have computed $L$ (by finding a least squares solution to your system of equations), you can then get $C$ by computing the Cholesky factorization of $L$.