Can a Phone Recognize Your Face?
AI begins with numbers, even when the world looks visual.
What does AI process?
- नमस्ते Students! क्या आपने कभी सोचा है कि जब आप अपने Smartphone को Face Unlock करते हैं, तो आपका Phone आपके चेहरे को कैसे पहचान लेता है?
- क्या Phone के पास हमारी तरह आँखें होती हैं? नहीं!
- दरअसल, आपका Phone Camera से एक Image लेता है…
- …और उस Image की जानकारी को Numbers के रूप में Process करता है।
- इन Numbers को व्यवस्थित करने में Mathematics का एक बहुत महत्वपूर्ण Concept काम आता है — Matrix।
- आज हम जानेंगे कि Mathematics में पढ़ी जाने वाली Matrices का उपयोग Artificial Intelligence, यानी AI में कैसे किया जाता है।
What Is a Matrix?
A matrix is a rectangular arrangement of numbers in rows and columns.
- सबसे पहले समझते हैं कि Matrix क्या होता है। Matrix, Numbers को Rows और Columns में व्यवस्थित करने का एक तरीका है। जब Numbers को एक आयताकार व्यवस्था में लिखा जाता है, तो उसे Matrix कहते हैं।
- इसमें Horizontal Lines को Rows कहते हैं…
- …और Vertical Lines को Columns कहते हैं।
- Matrix के अंदर मौजूद हर Number को एक Element कहा जाता है।
- अब सोचिए, अगर हमारे पास लाखों Numbers हों, तो उन्हें व्यवस्थित करने और उन पर Calculations करने के लिए Matrices कितनी उपयोगी होंगी!
Rows × Columns = Order
The dimensions of a matrix tell us how its elements are arranged.
- अब Screen पर दिए गए Matrix को ध्यान से देखिए।
- इस Matrix में दो Rows और तीन Columns हैं।
- इसलिए इसका Order है — Two by Three.
- एक बात हमेशा याद रखिए। Matrix का Order लिखते समय पहले Rows और फिर Columns की संख्या लिखी जाती है।
- अब एक छोटा सा Question! अगर हमें Second Row और Third Column का Element पता करना हो, तो उसकी Value क्या होगी? बिल्कुल सही! Zero.
- अब आप First Row और Second Column का Element बताइए। इसकी Value है Three.
A Picture Can Become a Matrix
Grayscale pixel brightness can be represented by numbers from 0 to 255.
- अब हम देखते हैं कि Matrix का उपयोग AI में कैसे होता है। आप अपने Mobile में जो Photos देखते हैं, वे बहुत सारे छोटे-छोटे Pixels से मिलकर बनी होती हैं।
- Grayscale Image में हर Pixel की Brightness को एक Number से दिखाया जा सकता है।
- यह Number Zero से लेकर Two Hundred Fifty-Five तक हो सकता है। Zero का मतलब Black और Two Hundred Fifty-Five का मतलब White होता है।
- Screen पर आपको Nine Pixels की एक छोटी सी Image दिखाई दे रही है। इन Pixels के Numbers को Three by Three Matrix में व्यवस्थित किया गया है।
- AI इन्हीं Numerical Values पर Calculations करके Image में Patterns पहचान सकता है।
- अब सोचिए, एक बड़ी Digital Image में तो लाखों Pixels हो सकते हैं!
Training Data Can Be a Matrix
Rows represent examples. Columns represent features.
| Student | Study hours | Practice sets |
|---|---|---|
| A | 2 | 3 |
| B | 4 | 1 |
| C | 3 | 2 |
- चलिए, अब एक आसान Classroom Example लेते हैं। मान लीजिए, हमारे पास तीन Students हैं — A, B और C. हम जानना चाहते हैं कि उन्होंने कितने घंटे Study की और कितने Practice Sets पूरे किए।
- Student A ने Two Hours Study की और Three Practice Sets किए।
- Student B ने Four Hours Study की और One Practice Set किया।
- Student C ने Three Hours Study की और Two Practice Sets किए।
- अब इस पूरे Data को हम एक Matrix में लिख सकते हैं।
- यहाँ हर Row एक Student को दिखाती है…
- …और हर Column एक अलग Feature को।
- Machine Learning में Data को व्यवस्थित करने के लिए इस प्रकार की Matrices बहुत उपयोगी होती हैं।
Weights Combine Information
A simple model multiplies feature values by weights and adds the results.
- अब मान लीजिए कि हमें इस Data से एक Simple Score Calculate करना है। इसके लिए हम Study Hours को Weight Two और Practice Sets को Weight One देते हैं।
- यहाँ Weight का मतलब है कि Calculation में किसी Feature को कितना महत्व दिया गया है।
- Student A की Values हैं Two और Three.
- अब Calculation होगी — Two Multiply by Two, Plus Three Multiply by One.
- यानी Four Plus Three.
- Answer आया Seven.
- ध्यान रखिए, यह केवल एक Example Score है, असली Exam Marks नहीं।
- यहाँ Weights हमने खुद चुने हैं। लेकिन Machine Learning में Model, Training के माध्यम से Weights सीख सकता है।
Calculate Many Scores at Once
One matrix product can calculate outputs for several examples together.
- अब इसी Calculation को तीनों Students के लिए एक साथ करते हैं। हमारी पहली Matrix का Order है Three by Two.
- और Weight Matrix का Order है Two by One.
- Matrix Multiplication करने के लिए पहली Matrix के Columns और दूसरी Matrix की Rows की संख्या समान होनी चाहिए।
- यहाँ दोनों की संख्या Two है। इसलिए Multiplication Possible है।
- अब Calculation करने पर Student A का Score Seven…
- …Student B का Nine…
- …और Student C का Eight मिलता है।
- इस तरह हमें एक Three by One Output Matrix मिलती है।
- यही Matrix Multiplication का एक बड़ा फायदा है। हम कई Examples की Calculations एक साथ कर सकते हैं।
- अब आप Student C का Answer खुद Check कीजिए।
AI Learns by Adjusting Weights
Training measures errors, then updates weights.
- अब एक बहुत महत्वपूर्ण Question! क्या केवल Matrix Multiplication करने से कोई Computer सीखने लगता है? नहीं!
- Machine Learning में Model को Training Data दिया जाता है।
- Model पहले अपने Weights की सहायता से Prediction करता है।
- फिर उस Prediction को सही Answer से Compare किया जाता है।
- अगर Prediction में Error है, तो Model अपने Weights को Adjust करता है।
- यह Process बार-बार दोहराई जाती है ताकि Prediction Error कम हो सके।
- इसलिए याद रखिए — Matrix Multiplication, Calculations करने में मदद करती है…
- …और Training Process, Model को बेहतर Weights सीखने में मदद करती है।
Neural Networks Use Matrices Too
Layers use matrix multiplication, bias, and activation functions.
- अब समझते हैं कि Neural Network में Matrices का क्या उपयोग है। Neural Network, Deep Learning का एक महत्वपूर्ण हिस्सा है। इसमें अलग-अलग Layers होती हैं।
- पहली Layer से Input Data आता है।
- अगली Layers उस Data पर Mathematical Operations करती हैं।
- इन Operations में Matrix Multiplication, Bias Addition और Activation Functions शामिल हो सकते हैं।
- Screen पर दिए गए Formula में X, Input को दिखाता है।
- W, Weight Matrix को दिखाता है।
- b का मतलब Bias है।
- और f, Activation Function को दिखाता है।
- इस तरह Neural Networks में Matrices का उपयोग बार-बार होता है।
You Already Use Matrix-Powered AI
Different AI applications share the same mathematical foundation.
Face Unlock · pixel values reveal visual patterns.
ChatGPT · words become numbers that are transformed.
YouTube, shopping apps · patterns across users and items.
- अब देखते हैं कि हमारी Daily Life में Matrices का उपयोग कहाँ-कहाँ होता है। पहला Example है — Face Recognition. इसमें AI, Images के Pixels की Numerical Information को Process करके Patterns पहचानता है।
- दूसरा Example है — ChatGPT. ChatGPT जैसे Language Models में Words और Tokens को Numerical Representations में बदला जाता है और उन पर बड़े Matrix Operations किए जाते हैं।
- तीसरा Example है — Recommendation Systems. जब YouTube आपको Videos Suggest करता है या कोई Shopping App Products Recommend करती है, तो User और Item Data के Patterns को समझने के लिए Matrices और दूसरी Mathematical Techniques का उपयोग हो सकता है।
- इसलिए Matrices केवल Mathematics की Textbook तक सीमित नहीं हैं। ये Modern AI का एक महत्वपूर्ण Mathematical Foundation हैं।
Your Turn: Solve the Product
Pause for 10 seconds and solve before looking at the answer.
- अब आपकी बारी! Screen पर दो Matrices दी गई हैं।
- पहली Matrix में Three और Two हैं।
- दूसरी Matrix में Two और One हैं।
- आपको इन दोनों का Matrix Product निकालना है।
- आपके Options हैं — A — Five.
- B — Seven.
- C — Eight.
- और D — Ten.
- Video को Pause कीजिए और Answer खुद निकालिए। चलिए, अब देखते हैं कि आपका Answer सही है या नहीं!
The Answer Is 8. Explain Why.
When you can explain an idea, you are more likely to remember it.
- इस Question का सही Answer है — Eight!
- क्योंकि Three Multiply by Two होता है Six.
- और Two Multiply by One होता है Two.
- Six Plus Two, यानी Eight.
- तो आज हमने सीखा कि Matrix क्या होता है, उसका Order कैसे निकालते हैं,
- Image और Data को Matrices में कैसे लिखते हैं, और Matrix Multiplication का उपयोग AI में कैसे होता है।
- हमने यह भी समझा कि Machine Learning में Model अपने Weights को Training के दौरान Adjust कर सकता है।
- अब आपके लिए एक Final Challenge! अपने किसी Friend को केवल Thirty Seconds में समझाइए कि Artificial Intelligence में Matrices की क्या भूमिका है।
- अगर आप इसे अपने शब्दों में समझा सकते हैं, तो आपने सिर्फ Formula याद नहीं किया, बल्कि Concept को समझा है। क्योंकि असली Learning वही है, जो लंबे समय तक आपके काम आए।
- Thank you, Students! Keep Learning What Lasts!