Importance of dot product in machine learning