First the derivative was used, then discovered, explored and developed, and only then, defined.
Some years ago while teaching the history of mathematics, I asked my students to read a discussion of maxima and minima by the seventeenth-century mathematician, Pierre Fermat. To start the discussion, I asked them, “Would you please define a relative maximum?” They told me it was a place where the derivative was zero. “If that's so,” I asked, “then what is the definition of a relative minimum?” They told me, that's a place where the derivative is zero. “Well, in that case,” I asked, “what is the difference between a maximum and a minimum?” They replied that in the case of a maximum, the second derivative is negative.
What can we learn from this apparent victory of calculus over common sense?
I used to think that this story showed that these students did not understand the calculus, but I have come to think the opposite: they understood it very well. The students' answers are a tribute to the power of the calculus in general, and the power of the concept of derivative in particular. Once one has been initiated into the calculus, it is hard to remember what it was like not to know what a derivative is and how to use it, and to realize that people like Fermat once had to cope with finding maxima and minima without knowing about derivatives at all.
Historically speaking, there were four steps in the development of today's concept of the derivative, which I list here in chronological order.