How does machine learning differ from artificial intelligence?

Artificial intelligence (AI) originated as a computer science branch to automate things that people can do but computers can’t. To illustrate, one method of AI is to construct a computer program that follows domain expert-developed rules. Manually establishing rules, on the other hand, takes a long time and much effort.

Machine learning is a branch of artificial intelligence concerned with advancing technologies that enable computers to learn (predictive) models from data automatically. Yet, AI and ML do work well together.