How to find the position of point S on a tetrahedron if all segments are known? I have been having this problem at work in this software I am writing.  This question looks like a homework question but it is not... I promise.  I took my problem and generalized it to a more simple form and here it is. 
Question: So I have this general triangle ABC and a point S which is not known but the lengths of the segments AS, BS & CS are known.  I have the positions of points A, B & C defined with respect to a euclidean coordinate system.  Without using numerical methods,  How does one calculate the position of point S?
Note: Currently I am using numerical methods to find the point and it works well, however it eats up far to much memory since these calculations are being done repeatedly in real time.  I have tried everything in my mathematics arsenal and any suggestions from you fine SE users.  Thanks in advance!

 A: I've been stewing on this and finally had something click. It's a surprisingly straightforward problem if you're familiar with directional cosines. 
First, put point A at the origin. Imagine AB along the x axis, AC in the x-y plane at some skewed angle, and AS pointing in some unknown direction up into the first quadrant. Call the angle between AB and AC $\theta_{BAC}$, and associate arbitrary directional cosines with AS. If we normalize the vectors, we will be left with 3 unit vectors, 
$$ \vec{AB} = \hat{x} \quad \vec{AC} = \cos\theta_{BAC}\hat{x} + \sin\theta_{BAC}\hat{y} \quad \vec{AS}= \cos\theta_1\hat{x} + \cos\theta_2\hat{y} + \cos\theta_3\hat{z} $$
Now take the dot product of $\vec{AS} \cdot \vec{AC}$. Call the angle between these two vectors $\theta_{SAC}$. Because the vectors are normalized, their magnitudes are 1, and the dot product simplifies to
$$ \cos\theta_{BAC}*\cos\theta_1 + \sin\theta_{BAC}*\cos\theta_2 = \cos\theta_{SAC}.$$
Solving for $\cos\theta_2$, we get
$$ \cos\theta_2 = \frac{1}{\sin\theta_{BAC}}(\cos\theta_{SAC} - \cos\theta_{BAC}*\cos\theta_1).$$
Now to bring this all back to your problem. First, we know the positions of points A, B, and C. This means we can compute the angle $\theta_{BAC}$. Also, if we know the lengths of every segment, we can use the law of cosines to compute the angles between segments $\vec{AB}$ and $\vec{AS}$ and segments $\vec{AC}$ and $\vec{AS}$. Lastly, realize that since $\vec{AB}$ is lined up with the x-axis, $\theta_{SAB}=\theta_{1}$. This gives us all the angles we need to compute $\cos\theta_2$. And once we have that, we can solve for the final directional cosine using the relation
$$ \cos^2\theta_1+ \cos^2\theta_2 + \cos^2\theta_3 = 1.$$
With three directional cosines we have the proper direction of $\vec{AS}$, and we just need to multiply this direction by the magnitude, which is given.
So in summation, with A as your point of origin and $\theta_{BAC}$ known, you use the law of cosines along with the known lengths to compute the last two angles at A. Then plug these in to find $\cos\theta_2$, and then use $\cos\theta_2$ and $\theta_{SAB}$ to find $\cos\theta_3$. 
You can make this approach a bit more general in the case where A is some arbitrary point and $\vec{AB}$ is pointing in some arbitrary direction. Go through the calculations to find the directional cosines, then make a unit vector out of it and multiply by the length of $\vec{SA}$. This gives you
$$ \vec{H} = \lvert \vec{SA} \lvert *( \cos\theta_1 \hat{d_1} + \cos\theta_2 \hat{d_2} + \cos\theta_3 \hat{d_3}).$$
If A,B,C are in the x-y plane the unit vector $\hat{d_3}$ corresponds to $\hat{z}$, but $\hat{d_1}$ and $\hat{d_2}$ correspond to directions other than the familiar cartesian coordinates. To find them, just normalize $\vec{AB}$ and then construct a perpendicular unit vector by rotating it ninety degrees. You'll get something like 
$$ \hat{d_1} = a\hat{x} + b\hat{y} \quad \hat{d_2} = -b\hat{x} + a\hat{y}.$$
Substitute these in the expression for $\vec{H}$ and you'll have $\vec{AS}$ in terms of cartesian coordinates. You'll still want to do a check that your signs are right. 
A: This is just a partial answer; a rephrasing of the question if you will.
If we write the point $A$ as the vector $A = (x_a, y_a, z_a)$, for example, and the length of the segment from $A$ to $S$ as $|AS|$, you're looking for the solution of a system of 3 nonlinear equations in 3 unknowns,
\begin{align*}
|AS|^2 = A\cdot A -2(A\cdot S) + S\cdot S\\
|BS|^2 = B\cdot B -2(B\cdot S) + S\cdot S\\
|CS|^2 = C\cdot C -2(C\cdot S) + S\cdot S\\
\end{align*}
Where $A\cdot S$ is the usual dot product; $$A \cdot S = (x_A, y_A, z_A) \cdot (x_S, y_S, z_S) = x_Ax_S + y_Ay_S + z_Az_S.$$
Now, dot products are very nice and linear, but I don't know of a nice way of solving this system. 
I'll play around with it, but hopefully somebody smarter than me will come along and point out a really nice way to solve this using linear algebra.
