The common answer is: from the soil, which is wrong.
The mass of the tree comes from the wood (cellulose), and cellulose (by weight) is carbon. Carbon comes from the air (CO2).
The first question you want to ask, right now, is why this now obvious answer wasn't obvious to begin with. More specifically, why you know the word "photosynthesis" but not how to apply it, at all.
Why were we taught photosynthesis? First, most of us don't remember anything about it anyway. If we do, we have recollections of certain unconnected concepts:
- sun gives "energy"
- plants "take up" "sunlight"
- they "breathe" CO2 and "release" O2
- It's good to talk to plants
The quotes serve to suggest we don't even really know the meaning of the terms we learned.
None of those statements are informative, nor can the be applied to reality (e.g. answering the above question.) It's not that you forgot; it's unlikely you could have answered that question even back when you were learning photosynthesis.
Yet-- and this is the point-- the word "photosynthesis" is in your head. You learned a made up word, an artificial carve out of what is really a fluid physical process. You didn't learn any of the reality.
So, on the one hand, we actually didn't learn anything. And, on the other hand-- the worse hand-- we actually think we know something. Not just ignorant; but ignorant and deluded.
But "tree mass comes from the air" isn't actually right, either. Some trees are more than 50% water by mass, so the mass of a tree would indeed come from the ground. (No partial credit: if you said "from the ground" but were thinking "minerals" you were still wrong.)
Indeed, this question reveals that even with a general background in science, and two acceptable answers, most people still get it wrong. So what, exactly, was the point of the general background in science, let alone photosynthesis?
In other words, you don't really appreciate that a) a tree has water mass; b) air has mass.
I state it here, and you "know" it, but that's not the same as it being a fundamental part of your worldview, the way "the sun is hot" or "the earth revolves around the sun" does, fundamentals that allow you to make guesses about reality. That's what science should have given you; instead, it gave you a hodgepodge of disconnected linguistic propositions that neither describe reality nor predict reality.
"Where do plants get their energy?" "Photosynthesis." Nothing happened there, except words.
Here's an example: if, prior to this post, I had asked why a helium balloon, despite weighing something, floats, you'd have to reason out an answer. But just my saying, "air has mass" makes the question easier to answer. You already know air has mass, you don't need me to tell you; but you don't feel it-- that's why my telling you here makes a difference.
I hardly need point out how a discussion about global warming is vastly altered if it is intuitively understood that trees get their carbon from the air.
But, actually, both of those answers are wrong: the question itself is meaningless. It is too vague, allows for multiple different interpretations and answers, is simultaneously misleading and oversimplified.
The bigger problem-- and this applies not only to science but to any field furthered by a dialectic-- is that we demand precision in answers, and allow-- expect-- imprecision in the questions.
"Where does the dry mass of a tree come from?" would be a little better. Etc. But no one worries about this; indeed, many shrug their shoulders, "yeah, the question is vague, but we all know what it means." Well, evidently not.
It barely requires exposition that psychiatry suffers greatly from this problem, the haziest and laziest of terms and definitions magically generating concrete and specific responses. Internist asks me, "I have a patient who is bipolar, what should I do?" If I say anything other than "Depakote" or equivalent, he thinks I'm being an ass. But my answer is 100x less relevant than understanding what he means by either "bipolar," "patient," or "do."
Politics, I need not point out, is worse. The most asinine questions are expected to generate meaningful responses. "Should we bail out General Motors?" Which one of those words actually means what you say it means? Who is "we?" What's a "bail out?" "General Motors" the whole company, the pension division, the new plant they opened in Russia, what? But if you ask for any clarification, you're being difficult. You don't get it.
A final analogy may be here helpful. You may also (not) remember from school "significant digits." For example, 3 + 4.2 = 7. Since "3" only has one significant digit (3.0 is a more precise number with 2 significant digits) the answer itself can have no more than one significant figure. Importantly, it's not that "7" is an okay answer, but really 7.2 is more precise. 7.2 is wrong, because that 3 could have been 3.4, 2.6, etc.
Or, more generally, an answer cannot be more precise than its data. Or its question.
The first business of science education should not be to help us answer questions, but to help us ask questions.