AlthoughThere is no formal definition that most people agree on. Hence here is what I, as a data science / machine learning consultant, think:
Artificial intelligence as a research field is only one partthe study of agents which sense and act autonomously in an environment and improve their situation according to some metric with their actions.
I don't like the AI fieldterm, let me also providebecause it is too broad / vague. Instead, look at the famous definition of machine learning by Tom Mitchell.:
A computer program is said to learn from experience $E$'E', with respect to some class of tasks $T$'T' and performance measure $P$'P' if its performance at tasks in $T$'T' as measured by $P$'P' improves with experience $E$E
There are other problems and techniques that areMachine learning is an important part of AI, such asbut not the only one. Search algorithms, SLAM, constrained optimization, and knowledge bases and automatic inference are also certainly part of AI.