Despite his lack of a formal education, from his youth Leonardo showed a profound grasp of mathematics. He used his knowledge of optics for both art and engineering. He designed aqueducts and bridges. He even built a bathroom for the Duchess and stage-managed the feasts, balls and lavish spectacles of the Duke. It was as if he was intoxicated with knowledge of all sorts. He investigated steam as a locomotive power in navigation, magnetic attraction, and the circulation of the blood. He even developed a prototype for a motorcar.