The past presidents of the United States have been comprised of villains and saviors, fools and sages — and innovators.

Some of the men who have defined the course of this country not only pursued the role of commander-in-chief, but also sought answers regarding how different aspects of STEM works. While these presidents are known most for their roles in politics, they were fascinated by and, in some cases, made valuable contributions to investing in America’s STEM interests.

John Quincy Adams, a graduate of Harvard College and the sixth United States president, also loved science, particularly astronomy. Through his dedication to developing a “lighthouse of the sky,” the U.S. Naval Observatory was created in 1830 as this country’s answer to those in Europe. Adams was also integral to the development of the Smithsonian, which was founded in 1846.

In 1849, before becoming the 16th president of the United States, Abraham Lincoln received Patent 6,469 for his invention intended to elevate boats over obstructions. “Buoying Vessels Over Shoals” was Lincoln’s answer after he traveled twice on boats whose paths became blocked. Dedicated to attaining knowledge when not working as a farmhand, Lincoln was self-educated. Lincoln signed into law a bill inducting the National Academy of Sciences in 1863, which eventually grew to include the branches of the National Academy of Engineering and National Academy of Medicine.

The 20th President of the United States James A. Garfield financed his own college education and graduated from Massachusetts’ Williams College in 1856, according to Frank Freidel and Hugh Sidey’s “The Presidents of the United States of America.” After serving as an Ohio state senator, he joined Congress for 18 years and won the 1880 presidential election. Though not a career mathematician, in 1876 Garfield developed a proof for the Pythagorean Theorem during his time in the House of Representatives, contributing a new perspective to an ancient mathematical concept.

Our 39th President of the United States James Earl Carter, Jr.— also known as Jimmy— attended Georgia Southwestern College and the Georgia Institute of Technology. Prior to becoming a naval submariner, Carter received a Bachelor of Science degree from the United States Naval Academy. During his time serving in the nuclear submarine program, he studied reactor technology and nuclear physics through Union College’s graduate studies program. During his time as president, Carter introduced the Department of Energy.

The STEM achievements of the past presidents of the United States are not limited to these men. Whether through study of STEM concentrations, or simply an interest in developing programs to improve education of their fellow Americans, other presidents have also been integral to our country’s advancements. Begin the conversation to show students that basic STEM literacy can open doors to almost any career path.