---
title: "Discussion on \"Linear Regression from First Principles: Least Squares, Geometry and Gradient Descent\" | Hashnode"
description: "Discussion on \"Linear Regression from First Principles: Least Squares, Geometry and Gradient Descent\". Fitting a straight line is the oldest trick in machine learning and still the one most worth understanding completely. This article builds linear regression from a five-point example to the normal equations, shows why least squares is a projection and a maximum-likelihood estimate at the same time, trains it with gradient descent you can steer, and then puts it to work on a real dataset to see where it holds up and where it breaks."
url: "https://hashnode.com/posts/linear-regression/6af33e7475a9ec13b893f93b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Linear Regression from First Principles: Least Squares, Geometry and Gradient Descent](https://siddheshsawant.hashnode.dev/linear-regression?utm_source=hashnode&utm_medium=feed)

Fitting a straight line is the oldest trick in machine learning and still the one most worth understanding completely. This article builds linear regression from a five-point example to the normal equations, shows why least squares is a projection and a maximum-likelihood estimate at the same time, trains it with gradient descent you can steer, and then puts it to work on a real dataset to see where it holds up and where it breaks.

34m ago · 48 min read · siddheshsawant.hashnode.dev  
Read the article

-   [#machine-learning](https://hashnode.com/tag/machine-learning)
-   [#linear-regression](https://hashnode.com/tag/linear-regression)
-   [#optimization](https://hashnode.com/tag/optimization)
-   [#gradient-descent](https://hashnode.com/tag/gradient-descent)
-   [#statistics](https://hashnode.com/tag/statistics)
-   [#python](https://hashnode.com/tag/python)

## Written by

[Siddhesh Sawant](https://hashnode.com/@siddheshsawant)

@siddheshsawant · Mumbai, India

  
[View profile](https://hashnode.com/@siddheshsawant)

Breaking down complex software engineering concepts with code and real-world examples

Backend Engineer with 5+ years of experience building and scaling high-performance microservices for large-scale e-commerce platforms. Have Expertise in Java, Spring Boot, Python and event-driven architectures, with proven ownership in designing Kafkabased systems, improving reliability and observability, and delivering high-impact customer-facing solutions

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
