This is the first rigorous selfcontained treatment of the theory of deep learning. Aimed at scientists instructors and students interested in artificial intelligence and deep learning it demonstrates many applications in physics chemistry and biomedicine. It includes a full set of exercises and encourages outofthebox thinking.