It is an open question whether it is best to introduce formal mathematical definitions before or after the object to be defined has been explored in a classroom setting. The prevailing Math Education injunction is that formal definitions are to appear after exploration (if at all). I tend to take the opposite view, if for no reason other than that these “explorations” are easily botched, from both a mathematical and pedagogic perspective.
In thinking about the sequence of formal definition presentation, it is useful to distinguish between two ideas. There is a difference between “exploring the mathematical object before formalizing the definition” and “motivating a formal definition before writing it down.”
The first one is no good, because mathematical objects have no empirical reality outside of our definitions of them. You can experience a tree without knowing how biologists classify them. You go up to the damn tree and check it out. On the other hand, mathematical objects are figments of our imagination. They exist only in our heads. You can’t go up to a ratio and check it out, you have to imagine it. Absent a formal definition, there is no way to be sure that the thing you’re imagining in your head and the thing I’m imagining in my head are the same thing. And if what I am imagining and what you are imagining are not the same thing then we cannot communicate. So, were you to say “sort these cards into ratios and not ratios” without first saying what a ratio is (that is, without a definition), that would be an impossible task. Without a definition, you can sort the cards however you want. Without a definition, there is no criteria by which to judge correctness. You relegate mathematics to a matter of taste. And then when a student has the wrong “taste” and is corrected, what you have successfully done is positioned the math teacher as the capricious arbiter of truth, rather than teach the student that they are responsible for figuring out what is true by using their own powers of reason. It’s mathematics by fiat, and it is a good way to make obedient workers, but not a good way to make educated citizens. NOTHING LESS THAN THE FATE OF OUR COUNTRY IS AT STAKE.
Now, motivating a definition, on the other hand, is very desirable! Part of what it means to know something in mathematics is to know why that thing is needed, what its purpose is, how it is connected to other math &etc. Why bother even having something like “slope”? Well, we wanna be able to talk about how “tilted” a line is, and compare how tilted one line is to how tilted a different line is. Doing that sort of thing before a formal definition is probably fine sometimes. Do the motivation before and then the thing can be formally defined with little fanfare. We need to be careful to pull off the mathematics properly, but what else is new.
So for me, it’s not really a question of “do they get the formal definition up front, or not?” It’s more a question about whether we are asking our students to do reasonable things, or if we’re asking them to read our minds. Mathematics is a hard enough game without playing “hide the ball” on top of it.