The discovery of new geometries in the nineteenth century showed that we ought not to be so certain that our geometry must be Euclidean. In the early twentieth century Einstein showed that our [universe’s] actual geometry was not Euclidean. So what are we to make of Kant’s certainty [that geometry was true a priori]? Einstein gave this diagnosis in his 1921 essay “Geometry and Experience.”
[A]n enigma presents itself which in all ages has agitated inquiring minds. How can it be that mathematics, being after all a product of human thought which is independent of experience, is so admirably appropriate to the objects of reality? Is human reason, then, without experience, merely by taking thought, able to fathom the properties of real things?
In my opinion the answer to this question is, briefly, this: as far as the propositions of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality…”
To restate Einstein’s point in terms closer to Kant’s terminology: in so far as geometry is synthetic its propositions are not certain; they are empirical claims about the world to be investigated by science like any other claim and we can never be absolutely certain of them. In so far as a geometry’s propositions are a priori, they are not factual claims about the world; they are “if-then” statement of logic within some logical system whose initial propositions are the postulates of the geometry.
— John D. Norton - Einstein for Everyone, ch. 15