My understanding of axioms is that they are self evident truths that require no proof, which in my mind is similar to a dogmatic belief in the sense that dogma is a set of beliefs or doctrines that are established as undoubtedly in truth.
Axiom is a statement taken to hold within a particular theory. One can combine the axioms to prove things within that theory. One may add or remove axioms to the theory to get another theory:
Euclid: ... 5. If a line segment intersects two straight lines forming two interior angles on the same side that sum to less than two right angles, then the two lines, if extended indefinitely, meet on that side on which the angles sum to less than two right angles.
Lobachevsky: ... what Euclid says except (5)
Dogmas are axioms of cultural, religious, political theories. Again, one may add or remove dogmas to get a new theory, e.g.:
Arius: ...the Son is not unbegotten ... before he was begotten, or created, or purposed, or established, he was not.
Nicean Council: ... those who say: 'There was a time when he was not;' ... are condemned by the holy catholic and apostolic Church.
The difference is that it is perfectly ok to handle different sets of axioms in, say, mathematics and prove a theorem in Euclidean geometry one day and a theorem in Lobachevskian the next - just remembering when the fifth postulate does or doesn't hold, but it's not considered acceptable to hold several sets of dogmas at once. Life of Pi provides an illustration of the controversy of such a stance (the main character is Hindu, Muslim and Catholic simultaneously and his brothers-in-dogmas don't like to share him with the competition).
I'm sure early geometers were much more religious about their axiom-dogmas than the modern mathematicians, but I have no proof.
An axiom is something that is self-evidently true; it is so obvious that there is no controversy about it. In mathematics, you just have to accept some very basic notions in order to avoid circular reasoning. These can't be proven, but they can always (and often very easily) be observed.
Example from Euclid's Elements:
Things that are equal to the same thing are also equal to one another (Transitive property of equality).
If equals are added to equals, then the wholes are equal.
If equals are subtracted from equals, then the remainders are equal.
Things that coincide with one another equal one another (Reflexive Property).
The whole is greater than the part.
Or an example from propositional logic:
- A is true
- B is true
- A&B is true
A dogma refers to (usually a religious) teaching that is considered undoubtedly and absolutely true. It is something you accept without any direct observation; dogmas are accepted by faith only.
I should add that some people would say that there is no difference between axioms and dogmas, because 'self-evident truths' are in some sense based on faith; that is that you accept on faith that anything that seems obvious and self-evident is true. An interesting read on this subject is Wittgenstein's On Certainty. I also want to stress that I don't mean to say that an axiom is "better" than a religious dogma (or vice versa for that matter).
In religions, some (should be majority) people accept the existence of God by belief. while some minority of them accept God by observation (thru meditation, etc). By believing, the faith can be shaken. By direct experience (the perfect balance of mindfulness and concentration), it is just there, there is no doubt about it.
When starting with a set of axioms, you might end up with a contradiction. This indicates that one of the axioms are wrong. You then figure out which one it is, and reject it. (This is a simplification, but sufficient in answering this question.)
When you are not allowed to reject the axiom even when you have successfully shown it to be false, the axiom you are not allowed to reject is now dogma.