# What is abstraction?

I'm not clear on what the term abstraction really means. It seems to mean different things in different contexts.

I'm a programmer, and when I think of abstraction, the first thing I think of is something that feels like _composition_. Suppose you are a parent and want to teach your child how to brush their teeth. To do that, you break the task "brush your teeth" into subtasks like 1) prepare your toothbrush, 2) actually brush your teeth, 3) rinse your mouth and 4) clean your toothbrush. In programming, you would break the `brushTeeth` method into helper methods like `prepareToothbrush`, `actuallyBrushTeeth`, `rinseMouth` and `cleanToothbrush`. And you would call `brushTeeth` an abstraction, because it is composed of subtasks. My understanding is that this doesn't just apply to programming: in the real world, if you told your child "brush your teeth", that would also be an abstraction for "prepare your toothbrush, actually brush your teeth, rinse your mouth, and then clean your toothbrush".

But there's something else that I think of when I think of the term "abstraction". Suppose I have a program that has people, dogs, and cats. All three have heights, weights and names, so I create an _animal_ class, and I say that people, dogs and cats are more specific versions of an animal. My understanding is that this too would be an abstraction. In programming, _and_ in the real world. My understanding is that the idea of an animal is an abstraction over the idea of a human, dog or cat.

But there seems to be something very different about each of the two situations. In the first, we would say that the "brush your teeth" abstraction is _composed_ of the subtasks, but we wouldn't say that "animal" is composed of humans, dogs and cats in the second. And we would say that the idea of an animal is _a more general version_ of the idea of a human, dog and cat, but we wouldn't say that "brush your teeth" is a more general version of preparing your toothbrush or rinsing your mouth.

The first example seems to be about composition, and the second about generality, so I'm confused as to what _abstraction_ really is.

And if we look at yet more contexts, there seems to be more inconsistency in how the term is used. [In semantics and philosophy](https://en.wikipedia.org/wiki/Abstract_and_concrete), "abstract" means something that you can't perceive with one of your five senses; the opposite of "concrete". A tennis ball is concrete because you can see it and touch it, but "tennis" is an abstract concept that you can't see or touch. But this use of the word doesn't distinguish between _degrees_ of abstraction. According to this use of the word, something either is abstract, or it isn't. But with the first two examples, there's clearly levels of abstraction.

And the semantics and philosophy version of abstraction seems like it matches the use of the term in the context of art. In the context of art, art is abstract when it doesn't depict concrete things. Eg. a painting that tries to depict fear is abstract because fear is an abstract concept, not a concrete thing, whereas a portrait of Lisa Gherardini (the Mona Lisa) is not abstract art, because it depicts a concrete thing.

As for the term "abstract" in the context of academic papers, that seemings like it might just be a butchering of the term. It's a summary. If you were to _summarize_ the task of brushing your teeth, you wouldn't say "here's a container that is composed of the subtasks". If you were to summarize the idea of an animal, that would just be a different thing than saying that it is a more general version of a human, dog and cat.

In the context of math, abstract math is a field of study. I don't know much about it, but from the googling I've done, it seems to be about, well, dealing with questions that are more abstract. More abstract in the sense of generalness, like how an animal is more general than a human. For example, algebra is more abstract than arithmetic. Arithmetic says that `1 + 1 = 2`, `2 + 2 = 4` , and `3 + 3 = 6`. _Algebra_, says that `n + n = 2n`. `n` is more general than `1` in the same sense that "animal" is more general than "human". Well, it seems that way at least.

Bret Victor has an essay called [Up and Down the Ladder of Abstraction](http://worrydream.com/LadderOfAbstraction/) where he talks about abstraction as moving away from the concrete by removing concrete properties. The more concrete properties you remove, the more abstract it becomes. He uses the example of a car moving along a curved road according to a certain algorithm. The concrete version of this is a given car on a given curved road pointed in a given direction. You can make it more abstract by looking at the system not at a given point in time, but at _all possible_ points of time, and that will give you a line describing where the car would be at all points in time.

![](http://funkyimg.com/i/2Pday.png)

This view of abstraction seems consistent with the idea of abstraction being about making something more general. We said "let's not look at the car being at this point in particular, let's look at all possible points more generally". With the math example we said "let's not look at the number 1 in particular, let's look at any possible number more generally". With the animal example, we said "let's not look at a humans in particular, let's look at organisms with any possible \[whatever\] more generally".

These usages of the term "abstraction" seem to be about how general a thing is, where something that is more general has less properties specified, and something that is more specific has more properties specified. But if that is what abstraction is about, why call it abstraction? Why not call it generalization? And if it is indeed about specifying less properties, what word do we use to distinguish between concrete things in the physical world that we can detect with our senses, and things that we can't detect with our senses, that we'd call abstract in the [context of semantics and philosophy](https://en.wikipedia.org/wiki/Abstract_and_concrete)?

I don't mean to imply that abstraction actually _is_ used inconsistently. Just that it seems that way to me, and I _definitely_ notice I am confused.