Understanding Batch Gradient Descent: A Key Method in Machine Learning Optimization