Full Idea
Mathematical propositions are always judgements a priori, and not empirical, because they carry with them necessity, which cannot be taken from experience.
Gist of Idea
Mathematics cannot be empirical because it is necessary, and that has to be a priori
Source
Immanuel Kant (Prolegomena to Any Future Metaphysic [1781], 268)
Book Reference
Kant,Immanuel: 'Prolegomena to Any Future Metaphysic', ed/tr. Lucas,Peter G. [Manchester UP 1971], p.18
A Reaction
Presumably there are necessities in the physical world, and we might discern them by generalising about that world, so that mathematics is (by a tortuous abstract route) a posteriori necessary? Just a thought…