Rational numbers are defined as equivalence classes of ordered pairs (less formally, "fractions") of integers, where $m_1n_2=m_2n_1$. This equivalence relation justifies the common practice of multiplying the numerator and denominator of a rational number by a common factor, $x$, to get another member of the equivalence class.
However, irrational numbers are often written like rational numbers (e.g., $\frac{\sqrt3}{2}$ often seen in trig), and it's common practice to multiply the numerator and denominator by a common factor, x, to get what's presumably an equivalent (irrational) number (e.g., $\frac{2\sqrt3}{4}$).
But if we do this, aren't we treating an irrational number like $\frac{\sqrt3}{2}$ as if it were a rational number? Where's the justification for this?
The justification is that $\frac{a}{b}$ means $a*b^{-1}$ from an algebraic point of view ($\mathbb R$ is a division ring). So $\frac{ax}{bx}$ means $ax*(bx)^{-1}$ and the equality is a consequence of $x*x^{-1}=1$.
But it seems that you think about the construction of irrationals. The real numbers can be built with Cauchy sequences of $\mathbb Q$ and explains why $\mathbb R$ is again a division ring.(see more here or here)
And the two definitions of $\frac{a}{b}$ are equivalents on Q because $b*\frac1{b}=\frac{b}{b}=\frac11=1$ so $\frac1{b}=b^{-1}$ and $\frac{a}{b}=a*\frac1{b}=a*b^{-1}$