We have
$$ C(x,y,z)= \frac{P(x,y,z)}{Q(x,y,z)} $$
where
$$P = \sum_{i=1}^{N}(a_i x + b_i y+ c_i z)^2 $$ $$Q = \sum_{i=1}^{N}(d_{i} x + e_{i} y+ f_{i} z)^2$$
and $a_i, b_i, c_{i}, d_{i}, e_{i}, f_{i}$ are constant parameters defined for $1\leq i,j \leq N$.
What are the values of for $x,y,z$ that minimize $C(x,y,z)$?
For a solution to the two dimensional case, see this.
EDIT:
In matrix form one could write this as $C(\mathbf{x})=\frac{\mathbf{x}^T\mathbf{P}\mathbf{x}}{\mathbf{x}^T\mathbf{Q}\mathbf{x}}$ where $\mathbf{x}$ is the $3$x$1$ vector of unknowns and $\mathbf{P}$ and $\mathbf{Q}$ are $3$x$3$ constant matrices. I hope this helps to simplify.
EDIT 2:
For the more general case, see this.