Solving a non-linear, multivariable system of equations I'm researching the mathematics behind GPS, and at the moment I'm trying to get my head around how to solve the following system of equations:
$\sqrt{(x-x_1)^2+(y-y_1)^2+(z-z_1)^2}=r_1$
$\sqrt{(x-x_2)^2+(y-y_2)^2+(z-z_2)^2}=r_2$
$\sqrt{(x-x_3)^2+(y-y_3)^2+(z-z_3)^2}=r_3$
$(x,y,z)$ is the coordinates of a GPS receiver's location, with $(0,0,0)$ being the center of the earth.
$(x_1,y_1,z_1)$, $(x_2,y_2,z_2)$ and $(x_3,y_3,z_3)$ are the coordinates of each satellite. Hence these are just three distance formulas, where $r_1$, $r_2$ and $r_3$ are the distances from each satellite to the point $(x,y,z)$ on the Earth's surface. By assigning values for $r_1$, $r_2$, $r_3$ and coordinates of each satellite, I want to know how I can solve for the coordinates $(x,y,z)$.
I understand the Newton-Raphson Method for one variable, but I'm getting lost when it comes to using the Jacobian matrix for more than one. All I've been able to do it take the partial derivative for each variable, and then I'm not sure where to go.
For the purpose of this, use the following values. I've tested them on WolframAlpha, so I know that they work:
$r_1=20000$
$r_2=19000$
$r_3=19500$
$x_1=20000$
$y_1=19400$
$z_1=19740$ 
$x_2=18700$
$y_2=1800$
$z_2=18500$ 
$x_3=18900$
$y_3=17980$
$z_3=20000$

I think that you can make the problem simpler the solution of which not requiring Newton-Raphson or any root finder method; the solution is explicit and direct (it does not require any iteration). 
Start squaring the expressions to define $$f_i={(x-x_i)^2+(y-y_i)^2+(z-z_i)^2}-r_i^2=0$$ Now, develop $(f_2-f_1)$ and $(f_3-f_2)$ for example. As a result, you have two linear equations since terms $x^2,y^2,z^2$ disappear. You can solve these two equations for $y$ and $z$ and the result will write $y=\alpha_1+\alpha_2 x$,$z=\beta_1+\beta_2 x$. Report these expressions in $f_1$ which is a quadratic equation in $x$.
Using the numbers you gave, I found $$y=\frac{121160315}{7921}-\frac{4255 }{15842}x$$ $$z=-\frac{340394455}{7921}+\frac{43785 }{15842}x$$ and  the solution of $f_1=0$ is just $x=16276.24775$ from which $y=10924.45372$, $z=2011.526168$ (just as Amzoti found).
You must take care that there is a second root for the quadratic $x=27858.39152$ from which $y=7813.607758$, $z=34022.89878$.
Depending on the starting point chosen for Newton-Raphson, you would arrive to one of these two solutions.
