Artificial intelligence (AI) is a mechanism that incorporates human intelligence into machines through the use of algorithms. It basically allow computers to think like a human brain. Machine learning (ML) on the other hand, allows the computer to learn from its own experiences and improve its performance accordingly.
When you are looking at the question posed by artificial intelligence vs machine learning, you will understand that AI focuses on learning, reasoning and self-correction so that the computer can work at its maximum efficiency, while ML focuses on developing programs that access data that the machines can use for themselves. It allows the system to learn though experience without any human assistance. It uses statistical methods to enable the improvement in working.
AI uses a computer algorithm that shows intelligence in the making of decisions. ML uses an AI algorithm that allows the system to learn from data. AI requires a lot of complex mathematics. AI increases the chances of success but not of accuracy, whereas ML increases accuracy without caring about success.