 He was educated from 1801 to 1809 by , who was also in charge of the education of William's brother, the Crown Prince Frederick William.At age twelve, his father appointed him an officer in the Prussian army.The year 1806 saw the defeat of Prussia by France and the end of the Holy Roman Empire.