The theories of Keynesian economic, which were authored by John Maynard Keynes, are built upon classical economics, founded on the theories of Adam Smith, often known as the "father of capitalism." While Keynes differs from Smith, he and nearly all economic philosophers who followed Smith agree with some of that thinker's founding principles. Even economic philosophers who disagree with the morality of free markets tended to agree with the reality free market dynamics. To understand the similarities in Keynesian and classical economics, it's important to understand the basics of each and their relationship to one another.
Classical Economics: Adam Smith
Adam Smith is considered the founding father of laissez-faire economics. The 18th century philosoper wrote of the "invsible hand," or the effect of self-interest in the economy. Smith's theory says that individual pursuit of self-interest is good for society. In 1776, Smith published his most notable work, "The Wealth of Nations."
Keynes is widely thought of as the most influential economist of the 20th century because of the application of his theories in response to the Great Depression. His theories endorse government intervention in the free economy to stimulate demand for goods and services. The purpose of government intervention, for Keynes, was to stabilise prices and achieve full employment, where willing and able citizens could find work.
Adam Smith: A Building Block
Keynes doesn't disagree with Adam Smith; he expands on Smith's theories. Keynes and Smith are both capitalists and agree on basic tenants of capitalism, that a free market is an efficient means of allocating resources.
Anomalies in The Free Market
Keynes, just as other economist such as Milton Friedman who espouse supply-side intervention, is prescribing solutions to anomalies in the free market. Keynes addresses how to repair or refocus a free market that veers off course. Adam Smith, being a pioneer of economic philosophy, wasn't considering anomalies in free markets; he was defining free markets. Subsequent capitalist philosophers such as Keynes and Friedman expounded on the details and caveats of Smith's theories.