Are they the same function?
$$y=\frac{x^2}{x}$$ and $$y=x$$
For the first function, if we don't divide both the numerator and the denominator by x, then the domain of it is the real line except the point x = 0, which is different from the domain of the second function.