Some results in mathematics have the force of real truths, being independent of interpretation or context. When we state that 2 + 2 = 4 we know that this will be correct for any intelligent entity able to count. In algebra, given an equation, say, x + 3 = 4, we know that there is only one solution, x = 1. The same with Euclidean geometry that we learn in high school. Given certain axioms (assertions taken to be true that are the starting point to obtain results), we can prove a series of theorems that are unique. For example, that the sum of the internal angles of a triangle is 180 degrees, or that the circumference of a circle of radius R is 2πR.
This sort of crystal clear application of reason brings a deep sense of control: given certain rules, we know how to obtain results that are true. The temptation to then equate mathematics with a synonym of truth is enormous: if Nature follows mathematical laws, we should be able to understand it in absolute terms. But can we actually take this step and affirm that mathematics is a criterion for truth in the natural world?
The power of mathematics comes from its context-independence. Even if mathematical concepts were originally derived from the need to measure distances or time intervals, or to count cattle or to compute its value, once created they are used in whatever situation that they are applicable. A triangle is a triangle on Mars, in Ancient Greece or in Los Angeles. Mathematics is a game that follows pre-determined rules. The innovation that we witness comes from the rules themselves (also created), allied to human inventiveness. The same happens in a game of chess: the rules are rigid, but no two games are identical.
In fact, the same happens with most competitive sports as well. What makes a game exciting is precisely the variability that unfolds from the same set of rules. Math and sports are expressions of our controlled creativity. The beauty of a play comes from the unexpected use of this creativity within the patterns allowed by the rules. In soccer, for example, a goal scored with the hand doesn't count; but a goal scored from a beautiful kick to the top corner of the goal frame is beautiful.
In mathematics we can invent strange worlds, geometries in more than three dimensions, different notions of infinity, or concepts such as points or lines, that have no volume and yet determine the properties of space. These rules and abstractions are creations of the human mind, tools we use to order the reality we perceive. The same way that a soccer game can only be played right if the rules are followed, the "truths" in mathematics only make sense within the conceptual structure where they were created. Since we are the ones that create these structures, mathematics is a human invention, a projection of our way of thinking about the world. Other intelligences can invent their own mathematics; dictionaries translating the two can be invented, each culture explaining its "truth" to the other.
The difference between math and Nature is that Nature follows only its own rules, making the natural sciences a game we can play along with but not invent in our own fashion.
UPDATE (added on March 14th): Some readers have asked for a few sources on the math as invention vs. discovery controversy. Here are a few, although this list is far from complete!
1. Is God a Mathematician? by Mario Livio. A balanced historical survey of the question.
2. Why Beauty Is Truth: The History of Symmetry by Ian Stewart. The author makes the case for mathematics as a criterion for truth in the natural world.
3. Incompleteness: The Proof and Paradox of Kurt Gödel by Rebecca Goldstein. An excellent biography of the enigmatic mathematician exploring the many philosophical implications of Gödel's revolutionary work.
4. Truth or Beauty: Science and the Quest for Order, by David Orrell. An argument against the Platonist (but not Plato's) notion that math's beauty is truth.
5. Gödel's Way: Exploits into an Undecidable World, by Gregory Chaitin. The celebrated mathematician explores Gödel's incompleteness theorem and its implications.
6. A Mathematician's Apology, by G. H. Hardy. A beautiful and moving portrait of a pure mathematician's mind and work.
7. A Tear at the Edge of Creation, by Marcelo Gleiser. My own work, where I present an argument against the notion that mathematical symmetry is synonym with truth when it comes to Nature.
Although symmetry is a fundamental tool in our approximate descriptions of natural phenomena, asymmetries are the engine that forge the complex structures that we see, from the Big Bang and matter to life itself.