There are two mammals that lay eggs?

As I mentioned above, most modern taxonomists classify animals based on shared common ancestry, not based on a few key characteristics like milk glands, fur, or the presence or absence of mammalian-style inner ear bones. Many modern taxonomists prefer to use the name Mammalia for the crown group of living mammals and the extinct forms that lie within the group comprising living mammals.

Therefore, if monotremes had become extinct before being discovered by Western science, and we continued to use this system today, I think the answer is no: monotremes would not be classified as mammals under phylogenetic taxonomy.

If you’re defining “mammal” based on key characters as in the old days, you have to decide which ones. Fur? Milk? Jaw structure? Depending on which of these, or which combination you use, monotremes and several different prehistoric groups will fall into or out of Mammalia. I’m not sure if it’s possible to determine the presence or absence of milk glands in fossil forms, and it’s rare to find preserved fur, but these can often be inferred by phylogenetic position.

For example, if monotremes were known only from fossils, we wouldn’t be able to guess that multituberculates had milk glands (as we can now), but we’d infer that monotremes and multis had fur, because some docodont fossils do, and docodonts are more primitive in their skeletal anatomy.

Their jaws are standard mammalian - there is a single bone in the lower jaw, and the joint is between the dentary and squamosal bones. In reptiles the lower jaw is made up of several bones, and the joint is between the quadrate and articular. The Wiki article merely says that the jaws are somewhat different from those of other mammals, not that they are non-mammalian.

Traditionally, for fossil forms the defining criterion for mammals has been having this kind of jaw articulation. Therefore, if monotremes were known only from fossils they would be classified as mammals by definition.

As has been said, whether monotremes are classified as mammals depends on which characters you base the line between mammals and not-mammals. But according to traditional taxonomy, they are certainly mammals. According to cladistics, they are also closer to other mammals than to any other living group.