A shark is not considered a mammal. Sharks are considered members of the paraphyletic group of organisms that contain gills, or in other words, fish.
Sharks lack some of the defining traits of mammals. Although some sharks do give birth to live young, they are not cared for and fed like mammals. Sharks don't possess mammary glands, nor do they have bones. Their skeletons are made completely out of cartilage. Sharks also replace their teeth constantly, as opposed to mammals, which either replace their teeth once or not at all. Finally, sharks have the ability to breathe underwater, whereas mammals, even whales and dolphins, must breathe air.