ASIF MUZTABA
TechProduction AI Engineering

November 27, 2026 · 3 min read

From y = mx + c to Modern AI

How a familiar school equation becomes a fundamental building block of neural networks, computer vision, Transformers, and large language models. English and Bangla.

Presentation slide showing how y = mx + c generalizes to the weighted sum used in modern AI

English version first, followed by the Bangla version.

Remember the equation we learned in school?

y = mx + c

Back then, many of us had a common question: Where are we ever going to use this in real life?

Interestingly, a generalized form of this simple equation is one of the fundamental building blocks of modern AI.

In a neural network, m becomes a weight, c becomes a bias, and instead of a single input, we work with multiple inputs:

z = w₁x₁ + w₂x₂ + ... + wₙxₙ + b

Pass the result through a nonlinear activation function, and you have the basic computational model of an artificial neuron.

What fascinates me is how widely this mathematical concept is used across modern AI:

  • Linear Regression: Making predictions.
  • Computer Vision: Extracting features from images.
  • Neural Networks: Learning complex patterns.
  • Transformers: Generating Query, Key, and Value projections.
  • Large Language Models: Computing scores for next-token prediction.

Thousands of GPUs. Massive computational power. Billions of dollars in investment.

A significant part of this entire training process involves optimizing billions of parameters, many of which are essentially the weights and biases in these mathematical transformations.

Of course, AI is not just y = mx + c. Nonlinearity, probability, calculus, optimization, and linear algebra all play critical roles.

But this is where I find the beauty of mathematics: how relatively simple mathematical operations, when composed and scaled, can produce remarkably complex behavior.

We once used this equation to draw straight lines in our notebooks. Today, we use its generalized form as a building block for systems capable of teaching us calculus.

Simple mathematics. Extraordinary engineering.


বাংলা ভার্সন: y = mx + c থেকে আধুনিক এআই

স্কুলে থাকতে ম্যাথের অনেক কিছু নিয়েই আমাদের একটা কমন প্রশ্ন ছিল, ভাই, এই জিনিস বাস্তব জীবনে কোথায় কাজে লাগবে?

ধরেন, আমাদের সেই অতি পরিচিত একটা ইকুয়েশন,

y = mx + c

ইন্টারেস্টিং ব্যাপার হচ্ছে, এই ছোট্ট ইকুয়েশনটার জেনারেলাইজড ফর্ম হচ্ছে আধুনিক এআই-এর অন্যতম ফান্ডামেন্টাল বিল্ডিং ব্লক।

নিউরাল নেটওয়ার্কে এসে m হয়ে গেল ওয়েট, c হয়ে গেল বায়াস। একটা ইনপুটের পরিবর্তে অনেকগুলো ইনপুট নিয়ে ইকুয়েশনটা দাঁড়াল,

z = w₁x₁ + w₂x₂ + ... + wₙxₙ + b

এর রেজাল্টকে একটা নন-লিনিয়ার অ্যাক্টিভেশন ফাংশনের মধ্য দিয়ে পাঠালেই পাওয়া গেল একটা আর্টিফিশিয়াল নিউরনের বেসিক কম্পিউটেশনাল মডেল।

এখন মজার ব্যাপার হচ্ছে, এই একই ম্যাথমেটিক্যাল কনসেপ্ট কত জায়গায় ব্যবহার হচ্ছে!

লিনিয়ার রিগ্রেশনে প্রেডিকশন করতে, কম্পিউটার ভিশনে ইমেজ ফিচার এক্সট্র্যাক্ট করতে, ট্রান্সফরমার আর্কিটেকচারে কোয়েরি, কি ও ভ্যালু জেনারেট করতে, এমনকি এলএলএমের নেক্সট টোকেন প্রেডিকশনের ফাইনাল স্কোরিং লেয়ারেও।

এআই মডেল ট্রেইনিংয়ের জন্য এত হাজার হাজার জিপিইউ, এত কম্পিউটেশনাল পাওয়ার, বিলিয়ন ডলারের ইনভেস্টমেন্ট! এই পুরো প্রসেসের একটা বড় অংশই হচ্ছে মূলত বিলিয়ন বিলিয়ন প্যারামিটার অপটিমাইজ করা। আমাদের স্কুলের সেই m আর c-এর অনেক বড়, অনেক কমপ্লেক্স একটা ভার্সন।

অবশ্য এআই মানেই শুধু y = mx + c না। নন-লিনিয়ারিটি, প্রবাবিলিটি, ক্যালকুলাস, অপটিমাইজেশন, লিনিয়ার অ্যালজেব্রা, সবকিছুরই গুরুত্বপূর্ণ ভূমিকা আছে।

কিন্তু আমার কাছে ম্যাথমেটিক্সের সৌন্দর্যটা এখানেই। একটা অপেক্ষাকৃত সিম্পল ম্যাথমেটিক্যাল কনসেপ্ট, যখন ম্যাসিভ স্কেলে অন্যান্য ম্যাথমেটিক্যাল কনসেপ্টের সাথে কম্বাইন করা হয়, তখন সেখান থেকে কী অসাধারণ কমপ্লেক্স বিহেভিয়ার ইমার্জ করতে পারে!

স্কুলে যে ইকুয়েশন দিয়ে আমরা খাতায় সরলরেখা আঁকতাম, আজ সেই ইকুয়েশনেরই জেনারেলাইজড ফর্ম ব্যবহার করে এমন সিস্টেম তৈরি করছি, যে সিস্টেম আবার আমাদের ক্যালকুলাস শেখাচ্ছে।

সিম্পল ম্যাথমেটিক্স। এক্সট্রাঅর্ডিনারি ইঞ্জিনিয়ারিং!