Why were computers invented?
Computers were made to do the very tedious computations of everyday life and business. The first calculators performed computations in seconds that would take someone using a slide rule minutes if not hours to do. Calculations for NASA entry and exit trajectories would take days or even weeks to calculate by hand and the first mainframe computers would do the calculations in minutes.
"The Father of Computers" Charles Babbage who invented the 1st mechanical Computer.. in 1834 he dreamt of designing mechanical calculating machines. "... I was sitting in the rooms of the Analytical Society, at Cambridge, my head leaning forward on the table in a kind of dreamy mood, with a table of logarithms lying open before me. Another member, coming into the room, and seeing me half asleep, called out, "Well, Babbage, what are you dreaming about?" to which I replied "I am thinking that all these tables" (pointing to the logarithms) "might be calculated by machinery. "
The British government first financed the project but then later cut off support. Babbage went on to design his much more general analytical engine but later returned and produced an improved design (his "Difference Engine No. 2") between 1834 and 1869.
Meanwhile Ada Lovelace is credited as the "first Computer programmer" since she was writing programs -that is, manipulating symbols according to rules-for Babbage's machine. The rest Followed.
The first programmable electronic digital computer was invented by Tommy Flowers to help break German "Fish" teletype ciphers during World War 2. Ten of these were built before the end of the war, also making it the first computer built in a quantity larger than one until 1952 when Remington Rand began making the UNIVAC i.
Laptop computers, as we now know them, were invented because the existing computers were not portable enough for people of that time. Before lugable/portable/laptop computers came the desktop,er, computer that is. There is still some discussion on who invented Desktop computer with many names mentioned. You would need to go back in History to the Second World War to work out who invented Mainframe computers but some did and they came before desktop computers.