Mechanical engineering is a discipline of engineering that applies the principles of engineering, physics and materials science for analysis, design, manufacturing, and maintenance of mechanical systems. It is the branch of engineering that involves the production and usage of heat and mechanical power for the design, production, and operation of machines and tools.  It is one of the oldest and broadest engineering disciplines. The engineering field requires an understanding of core concepts including mechanics, kinematics, thermodynamics, materials science, structural analysis, and electricity.
Mechanical engineers use these core principles along with tools like computer-aided engineering, and product lifecycle management to design and analyze manufacturing plants, industrial equipment and machinery, heating and cooling systems, transport systems, aircraft, watercraft, robotics, medical devices, weapons, and others. Mechanical engineering emerged as a field during the industrial revolution in Europe in the 18th century; however, its development can be traced back several thousand years around the world.
Mechanical engineering science emerged in the 19th century as a result of developments in the field of physics. The field has continually evolved to incorporate advancements in technology, and mechanical engineers today are pursuing developments in such fields as composites, mechatronics, and nanotechnology. Mechanical engineering overlaps with aerospace engineering, metallurgical engineering, civil engineering, electrical engineering, petroleum engineering, manufacturing engineering, chemical engineering, and other engineering disciplines to varying amounts.
Mechanical engineers may also work in the field of Biomedical engineering, specifically with biomechanics, transport phenomena, biomechatronics, bionanotechnology and modeling of biological systems, like soft tissue mechanics. Mechanical engineering finds its application in the archives of various ancient and medieval societies throughout mankind. In ancient Greece, the works of Archimedes (287 BC–212 BC) deeply influenced mechanics in the Western tradition and Heron of Alexandria (c.10–70 AD) created the first steam engine.  In China, Zhang Heng (78–139 AD) improved a water clock and invented a seismometer, and Ma Jun (200–265 AD) invented a chariot with differential gears.
The medieval Chinese horologist and engineer Su Song (1020–1101 AD) incorporated an escapement mechanism into his astronomical clock tower two centuries before any escapement can be found in clocks of medieval Europe, as well as the world's first known endless power-transmitting chain drive.
 During the years from 7th to 15th century, the era called the Islamic Golden Age, there were remarkable contributions from Muslim inventors in the field of mechanical technology. Al-Jazari, who was one of them, wrote his famous Book of Knowledge of Ingenious Mechanical Devices in 1206, and presented many mechanical designs. He is also considered to be the inventor of such mechanical devices which now form the very basic of mechanisms, such as the crankshaft and camshaft. 
Important breakthroughs in the foundations of mechanical engineering occurred in England during the 17th century when Sir Isaac Newton both formulated the three Newton's Laws of Motion and developed Calculus, the mathematical basis of physics. Newton was reluctant to publish his methods and laws for years, but he was finally persuaded to do so by his colleagues, such as Sir Edmund Halley, much to the benefit of all mankind. Gottfried Wilhelm Leibniz is also credited with creating Calculus during the same time frame.
During the early 19th century in England, Germany and Scotland, the development of machine tools led mechanical engineering to develop as a separate field within engineering, providing manufacturing machines and the engines to power them.  The first British professional society of mechanical engineers was formed in 1847 Institution of Mechanical Engineers, thirty years after the civil engineers formed the first such professional society Institution of Civil Engineers.  On the European continent, Johann von Zimmermann (1820–1901) founded the first factory for grinding machines in Chemnitz, Germany in 1848.
In the United States, the American Society of Mechanical Engineers (ASME) was formed in 1880, becoming the third such professional engineering society, after the American Society of Civil Engineers (1852) and the American Institute of Mining Engineers (1871).  The first schools in the United States to offer an engineering education were the United States Military Academy in 1817, an institution now known as Norwich University in 1819, and Rensselaer Polytechnic Institute in 1825. Education in mechanical engineering has historically been based on a strong foundation in mathematics and science.
 Education Degrees in mechanical engineering are offered at universities worldwide. In Brazil, Ireland, Philippines, Pakistan, China, Greece, Turkey, North America, South Asia, India, Dominican Republic and the United Kingdom, mechanical engineering programs typically take four to five years of study and result in a Bachelor of Engineering (B. Eng), Bachelor of Science (B. Sc), Bachelor of Science Engineering (B. ScEng), Bachelor of Technology (B. Tech), or Bachelor of Applied Science (B. A. Sc) degree, in or with emphasis in mechanical engineering.
In Spain, Portugal and most of South America, where neither BSc nor BTech programs have been adopted, the formal name for the degree is "Mechanical Engineer", and the course work is based on five or six years of training. In Italy the course work is based on five years of training, but in order to qualify as an Engineer you have to pass a state exam at the end of the course. In Greece, the coursework is based on a five year curriculum and the requirement of a 'Diploma' Thesis, which upon completion a 'Diploma' is awarded rather than a B. Sc.
In Australia, mechanical engineering degrees are awarded as Bachelor of Engineering (Mechanical) or similar nomenclature although there are an increasing number of specialisations. The degree takes four years of full-time study to achieve. To ensure quality in engineering degrees, Engineers Australia accredits engineering degrees awarded by Australian universities in accordance with the global Washington Accord. Before the degree can be awarded, the student must complete at least 3 months of on the job work experience in an engineering firm.
Similar systems are also present in South Africa and are overseen by the Engineering Council of South Africa (ECSA). In the United States, most undergraduate mechanical engineering programs are accredited by the Accreditation Board for Engineering and Technology (ABET) to ensure similar course requirements and standards among universities. The ABET web site lists 302 accredited mechanical engineering programs as of 11 March 2014.  Mechanical engineering programs in Canada are accredited by the Canadian Engineering Accreditation Board (CEAB), and most other countries offering engineering degrees have similar accreditation societies.
Some mechanical engineers go on to pursue a postgraduate degree such as a Master of Engineering, Master of Technology, Master of Science, Master of Engineering Management (MEng. Mgt or MEM), a Doctor of Philosophy in engineering (EngD, PhD) or an engineer's degree. The master's and engineer's degrees may or may not include research. The Doctor of Philosophy includes a significant research component and is often viewed as the entry point to academia.  The Engineer's degree exists at a few institutions at an intermediate level between the master's degree and the doctorate.