Basic Question Concerning Elementary Functions I have a homework problem which says

If $f(x) = \dfrac{x^2 - x}{x - 1}$ and $g(x) = x$. Is it true that $f = g$?

What do they mean by saying is it true that $f = g$? Aren't these two functions completely different from each other? Let's say it's true,then what reasoning should I give?
I'm not sure how to even get started. Please help.
 A: The answer depends crucially on the denotation of the terms elementary function and function.  
Other answers have already explained what happens when said rational functions are viewed as (set-theoretic) functions. Here I discuss a more formal algebraic viewpoint, which is useful to keep in mind even when approaching analytic problems (e.g. below).
In algebra (and differential algebra), to obtain maximal generality (universality)  such polynomial and rational "functions" are interpreted formally. In this case polynomials are not functions but instead are formal expressions (elements of certain free algebras). In turn, rational "functions" are also formal (not functional) objects, namely elements of the fraction field of formal polynomials. Thus, in $\rm\:\mathbb Q(x)\:,\:$ the fraction field of the polynomial ring $\rm\:\mathbb Q[x]\:,\:$ it is true that $\rm\ x\ =\ (x^2-x)/(x-1)\ $ since one can always cancel nonzero elements from fractions. More explicitly, if $\rm\ x,\:f\in F\: $ a field (or domain) then $\rm\: x\ne 1\ $ and $\rm\ (x-1)\ f\ =\ x^2-x\ \ \Rightarrow\ \ f\: =\: x\ $ by cancelling $\rm\ x-1\ne 0\:.\:$   
It's remarkable that such formal algebra frequently enables slick proofs of results that would be cumbersome analytically. In particular,  "generic" or "universal"  proofs can yield quite nontrivial results, e.g. one can "generically" algebraically cancel "apparent singularities" in one fell swoop, before evaluation - thus avoiding alternative  topological arguments (e.g. by density). For example, see this slick proof of Sylvester's determinant identity $\rm\ det\ (I+AB)=det\ (I+BA)\ $ that proceeds by universally cancelling $\rm\ det\ A\ $ from the $\rm\ det\ $ of $\rm\ \  (1+A\ B)\ A\ =\ A\ (1+B\ A)\:,\:$ thus trivially eliminating the "apparent singularity" at $\rm\ det\ A\: =\: 0\:.\:$ For further discussion see here.
NOTE $\ $ It is worth emphasizing that this equality, like many equalities, is a simple consequence of a uniqueness theorem, thus yielding yet another example of the power of uniqueness theorems for proving equalities. For the ring-theoretic property of being a domain is equivalent to the uniqueness of solutions to linear equations $\rm\ a\ x = b,\ a\ne 0\:.\: $ Your equality is a consequence of this simple uniqueness theorem, viz. both $\rm\:x\:$ and $\rm\:(x^2-1)/(x-1)\:$ are solutions $\rm\:f\:$ of $\rm\ (x-1)\ f\ =\ x^2-x\:,\:$ and $\rm\: x\ne 1\:,\:$ hence  they are equal by uniqueness. Normally one deduces this using an equivalent property, namely that a ring is a domain iff all nonzero elements are cancellable. Thus in a domain one may deduce such equalities by cancelling nonzero factors from both sides of an equation. But it is essential to stress the uniqueness viewpoint since this applies in much more general contexts which may not enjoy an equivalent reformulation via cancellation, e.g. see above linked posts.
While such remarks may seem rather trivial if interpreted only in a specific ring, e.g. the ring of real rational functions (formal or functional), they are quite nontrivial when interpreted more generally, as illustrated quite forcefully in the above example employing formal vs. functional matrices and determinants - by working over a ring where the matrix entries are indeterminates. The abstraction from polynomial functions to formal polynomials, while it may seem rather impotent at first glance, yields great power when exploited to the hilt by universal reasoning. Alas, such universal viewpoints don't always receive the emphasis that they rightfully deserve in first algebra courses (if they did, my trivial remark here would not be one of my highest-voted posts!)
A: Hint: can $f$ be simplified? (yes)
You can compare the simplified version of $f(x)$ with $g(x)$, and you'll see they are they same; $f$ and $g$  have equal values at any point $x$ where they are both defined.
Does this mean $f$ and $g$ are equal as functions?
Look at the original definition of $f$ and ask yourself: "do $f$ and $g$ have the  same domains"?
Actually, all you have to do is ask yourself that last question.  

They are attempting to trick you here:
You might make the observation that
$$
f(x)={x^2-x\over x-1}={x(x-1)\over x-1};
$$
and then be tempted to cancel the $x-1$ terms.

If you did, you might    say: "$f(x)=x$" and then conclude that $f$ and $g$ are equal as functions.
This conclusion would be incorrect, because you can only do that cancellation above if $x-1$ is non-zero; that is, if $x\ne1$. 
In fact, $x=1$ is not  in the domain of $f$. (It is true that $f(x)=x$ when $x$ is in the domain of $f$, but just writing the rule $f(x)=x$ does not define the same function as what you started with. )
Two functions are equal if the have the same domain, range, and the same rule.
So, since $x=1$ is not in the domain of $f$ but is in the domain of $g$, the functions $f$ and $g$ are different.
A: Since the functions have different domains they are not the same. The domain of $f$ is $[x\in R:x\neq1]$  where as the domain for $g$ is $[x\in R]$
