Why is the notion of a function as a relation important? I am reading Bartle and Sherbert's "Intro to Real Analysis" and in motivating the definition of a function as a relation they make the statement, "To the mathematician of the the early nineteenth century, the word "function" meant a definite formula .... This understanding excluded the case of different formulas on different intervals, so that functions could not be defined "in pieces" ". (They then go on to make some generalizations about problems with distinguishing between a function and its values and the difficulty with interpreting the phrase "rule of correspondence") 
I find this statement unconvincing for 2 reasons: first, we commonly define piecewise functions (like signum for example), and nobody really has any trouble understanding what is meant by this. Secondly, it seems like whenever I try to work a proof using the definition of a function as a relation, it seems much more difficult and complicated. 
Are there applications or maybe areas of math one encounters later, where it is genuinely useful to view functions from this point of view, or is this more like a "Bourbaki" definition for purists. The only case I can see where this definition is actually useful at the level of math I'm studying is if I simply want to draw a graph of some general function (without a formula) and claim it is a function (b/c it is a subset of the Cartesian plane, which by observation, I can see passes the vertical line test).
Thanks,
Matt
 A: First of all, in set theory it is very useful to see functions as sets of ordered pairs. This allows us to use $\subseteq$ to order them, and this is used in forcing quite often, and forcing is one of the main corner stones of modern set theory.
Secondly, if you want to put your mathematics on a certain foundation, you want to be able and formalize it in some context. Function, indeed any mathematical object, needs to be formalized in a rigorous way. It's not enough that we understand what does it mean, it is important that we are able to say "There is an object in our universe which represents this notion".
Moreover this opens the door for a possibly terrifying understanding. Almost no function from $\Bbb R$ to itself is continuous. We can develop the notion of "almost all" and show that almost all continuous functions are not differentiable, and from those which are almost none is differentiable with a continuous derivative, and so on.
If a function was just "some formula using some basic and elementary operations, perhaps piecewise" then we wouldn't be able to have this understanding. We couldn't have said that most continuous functions don't have a derivative.
And finally, this allows the extension of the notion of "function" from just real values to an arbitrary notion. If we have two spaces, then we can say what is considered a function between them, this awesome generality is exactly the heart and soul of mathematics. It is what mathematics strives to be, and where it thrives the most.
A: I think you need to understand the historical perspective. Although I am not a historian of mathematics, from whatever sources I have read on this topic I find that before the concept of function was formulated in set theoretic terms (like a relation with some specific properties) a function was supposed to be given by a formula which consisted of algebraic/trigonometric/etc operations.For example $f(x) = x^{2}/(1 + x)$ used to be a function, but the following example could not be called a function: $f(x) = 0$ when $x$ is rational and $f(x) = 1$ if $x $ is irrational.
During the time when mathematicians were studying Fourier series and its implications they found they had to deal with many weird kind of functions which could possibly never be represented by a formula yet possessed Fourier series (which are basically sums of sines and cosines). Then there were many more issue involved with the concept of integral of a function and it turned out that many weird discontinuous kinds of functions were integrable. These difficulties led to the notion of function as a relation (or a rule of correspondence) and the need for a formula was removed. In this regard I advise that you do read the marvelous books "A Radical Approach to Real Analysis" and "A Radical Approach to Lebesgue's Theory of Integration" by David M. Bressoud. These two books deal in detail with the problems which mathematicians faced with intuitive definition of a function based on the formula.
I also understand that you don't find any issue with defining a function without a formula precisely because mathematicians have already drilled this set theoretic definition into our books and minds for 1 or 2 centuries. But before such notions were developed it was very difficult to deal with pathological functions.
