The recent film Hidden Figures dramatically illustrates how prejudice that denies equal educational and career opportunities to minorities, women, and the poor is not only immoral but nonsensical, depriving our nation of the brainpower and talents of extraordinary people.

The lesson of the film, which has been nominated for three Academy Awards, including Best Picture, is clear: we must continue to tear down barriers unrelated to ability that block people from reaching their full potential.

Hidden Figures is based on the true story of three brilliant black female mathematicians who grew up in poor families and battled sexism and racism to play vital roles in NASA’s “manned” space program in the 1960s. The film shows that when NASA finally recognized that the women America treated like second-class citizens actually had first-class minds, everyone benefitted.

How sad it would have been if these extraordinary women — Katherine Johnson, Dorothy Vaughan, and Mary Jackson — had spent their lives like many of their peers as maids, cleaning women, or waitresses. And how much sadder that millions of other Americans capable of graduating from college were denied the chance for a higher education and good jobs because of their race, gender, or family income.

Unfortunately, not enough progress has been made in building the talents of Americans in the STEM fields that NASA found so valuable.

The good news is that school districts, governments, colleges, and foundations support challenging STEM programs for students from low-income families, including many minorities. These programs are expensive, but the investment is critical to maintaining America’s prominence in science and technology.

An excellent example is Bridge to Enter Advanced Mathematics, which began in New York City’s middle schools in 2011. Its goal is to prepare students from low-income backgrounds for college and careers in STEM fields.

The Jack Kent Cooke Foundation, which I head, has awarded nearly $1.3 million in grants to BEAM since 2012. The program has provided hundreds of low-income middle school students in New York City with intensive summer math enrichment, year-round mentoring and weekly advising to boost their math skills.

The results have been exceptional. Students who are tested on the 8th-grade exam of the American Mathematics Competitions Program immediately before and after participating in BEAM’s three-week summer program show a significant increase in their problem-solving skills in that short period, jumping 10 to 20 percentile points when compared to students in the same grade nationally. Alumni have gone on to attend the most selective high schools in the city and to participate in other highly selective math competitions and programs. We’re confident that these students will do great things in STEM in the years ahead.

Many more programs like BEAM are needed across the country if we are to ensure that the “hidden figures” of today get the chance to become leaders in the STEM fields tomorrow. These programs will reduce the disparities that unfairly increase unemployment and reduce educational attainment by family income and race.

Indeed, unequal education undermines who we are as a people. For example, the U.S. Bureau of Labor Statistics reported that unemployment rates in December were highest for those with the least education. While only 2.5 percent of college graduates were unemployed, the figure was twice as high — 5.1 percent — for high school graduates and jumped to 7.9 percent for high school dropouts.

Moreover, the unemployment rate is misleading for low-income individuals. Jason Furman, the chairman of the Council of Economic Advisors under President Obama, recently wrote that there are 8 percent fewer participants in the labor force than there were in 1953. These people are involuntarily unemployed and have stopped looking for work. Which means you can add 8 percent whenever the Labor Department announces the unemployment rate. Little wonder so many people feel they have missed out on the apparent prosperity about them.

When using family income to measure the college graduation rate, a White House report in 2014 found that only about 10 percent of people from low-income families have a bachelor’s degree by age 25, but five times as many people from high-income families have such degrees. Unless that changes through effective policy-making, poverty will continue to be passed down from one generation to the next as if it were a genetic condition.

Which leads to an obvious conclusion: increasing high school and college graduation rates will decrease the unemployment rate and the poverty rate. As a result, government spending on financial aid to low-income college students can reduce government spending on unemployment benefits and on assistance programs in the future.

The true events depicted in “Hidden Figures” add to the long list of indisputable evidence showing that powerful brains can be found in every group of people. The film is a reminder of the need to provide all Americans with education ladders — with limits set not by their demographic group but by how high they’re capable of climbing.

Former New York City Schools Chancellor Harold O. Levy is executive director of the Jack Kent Cooke Foundation, which has awarded more than $152 million in scholarships to nearly 2,200 high-achieving students from low-income families and more than $90 million in grants to organizations that serve such students.

Former New York City Schools Chancellor Harold O. Levy is executive director of the Cooke Foundation, which has awarded more than $152 million in scholarships to nearly 2,200 high-achieving students from low-income families and more than $90 million in grants to organizations that serve such students.