Platypus are mammals indeed. They are very strange ones though.
First of all, they lay eggs.
No other group of mammals apart from the Echidnas do that. These are primitive mammals that also do not have teats.
Secondly, they also feed their young milk which drips from hair near their mammary glands.
Thirdly, they have poison glands in their hooves which is very rare in the mammalian world.
For more on platypus please check our article