The process behind $5 = \frac{2}{x} \Leftrightarrow \frac{2}{5} = x$ (Note: I didn't learn how to solve equations the conventional way; instead I was just taught to "move numbers from side to side", inverting the sign or the operation accordingly. I am learning the conventional way though because I think it makes the process of solving equations clearer. That being said, I apologize if this question is too "basic".)
I know that when I have an equality such as $5 = \frac{x}{2}$ I have to multiply both sides by 2 to get the answer.
However, what is the process behind $5 = \frac{2}{x} \Leftrightarrow \frac{2}{5} = x$ ?
I know that when I have an equation which the variable is in the denominator I have to move the numerator to the other side and make it the numerator and the number that's already there the denominator, but I don't really know why that is or how that's done "mathematically".
I have a theory:


*

*Invert both sides and then multiply both sides by 2;


Is this correct?
 A: You are allowed to invert both sides, given you invert the entire side, like such:
$$2 + x = \frac1y \rightarrow \frac{1}{2 + x} = y$$
A common mistake is to invert only one term. Note that "inverting" happens because we can multiply both sides of the equation by the product of both sides. Take for example:
$$\frac{1}{2 + x} = \frac{1}{y} \rightarrow \frac{y(2 + x)}{2 + x} = \frac{y(2 + x)}{y}\rightarrow y = 2 + x$$
We did the above by multiplying both sides by y(2 + x), which is allowed, as long as it is done to both sides. You can solve your example in the same way.
A: Multiply by $x$: $$5x=2$$
Divide by $5$: $$\frac{2}{5} = x$$
More generally, $$\frac{x}{b} = a \iff x=ab \iff \frac{x}{a} = b$$
A: We have that
$$5 = \frac2x.$$
Now multiply by $x$ on each side, and get
$$5x=2. $$ 
Next, divide by $5$ on each side, and get
$$x=\frac25. $$
A: From $5=\frac 2x$ to get $x=\frac 25$, you're multiplying both sides by $x$ to get $$5x=2$$
And dividing by $5$, we get $x=\frac 25$.
A: You can do it by means the second equivalence principle: "multiplying or dividing both sides of an equation by a non-zero constant" we obtain an equivalent equation. This is the basis of your calculations in the example $5=\frac{2}{x}$.
A: Other way for solving it is by the reciprocal or inverse process:
$5 = \frac{2}{x} \Rightarrow 5^{-1} = (\frac{2}{x})^{-1}$
$\frac{1}{5} = \frac{x}{2} \Rightarrow \frac{2}{5} = x$
A: Well...
$$\begin{equation}\begin{aligned}5 &= \frac{2}{x} &&\text{From question}\\5x&=2 &&\text{Multiply by x on each side}\\ x&=\frac{2}{5} &&\text{Divide by 5 on each side}
\end{aligned}\end{equation}$$
Or
$$\begin{equation}\begin{aligned}\frac{2}{5} &= x &&\text{From question}\\2&=5x &&\text{Multiply by 5 on each side}\\ \frac{2}{x}&=5 &&\text{Divide by x on each side}
\end{aligned}\end{equation}$$
