# Solving a system of equations with one variable in denominator

I have a system of equations in a program I'm writing. It's of the form: $$\left\{ \begin{array}{c} \frac{a_1}{x}+b_1 y+c_1 z=d_1 \\ \frac{a_2}{x}+b_2 y+c_2 z=d_2 \\ \frac{a_3}{x}+b_3 y+c_3 z=d_3 \end{array} \right.$$ $$a_n$$, $$b_n$$, $$c_n$$ and $$d_n$$ are known coefficients.

I'm going to use Gauss-Jordan elimination to solve it. But I'm not sure how exactly I should form the matrix with $$x$$ being in the denominator. I guess I could just put in $$a_n$$ like the other coefficients and take the inverse of the solution for the first variable to get the value of $$x$$. But it feels like I'm missing something and that it might be an extra step I could avoid somehow. What would be the "correct" way to do this?

• You can always define $w = 1/x$ and use $w, y, z$ as the variables. After you find the value of $w$, you can calculate $x$ from it. Jun 6, 2020 at 15:55

Simple, take $$\frac{1}{x}=u$$, the you have three linear simultaneous equations in $$u,y,z$$, which can be solved by Cramer's method:$$\frac{u}{|A_1|}=\frac{y}{|A_2|}=\frac{z}{|A_3|}=\frac{1}{|A|}, x=\frac{1}{u}, u \ne 0$$. See Cramer's method in:
$$\begin{bmatrix} 1/x \\ y \\ z\end{bmatrix}$$