<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amritanshu Dash</title>
    <description>The latest articles on DEV Community by Amritanshu Dash (@amritanshu_dash).</description>
    <link>https://dev.to/amritanshu_dash</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3625227%2F56911e8b-13c3-4b03-916f-1712a41f25bd.jpg</url>
      <title>DEV Community: Amritanshu Dash</title>
      <link>https://dev.to/amritanshu_dash</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amritanshu_dash"/>
    <language>en</language>
    <item>
      <title>Linear Algebra for AI — Part 2: Deep Understanding of Vectors</title>
      <dc:creator>Amritanshu Dash</dc:creator>
      <pubDate>Wed, 10 Dec 2025 05:22:05 +0000</pubDate>
      <link>https://dev.to/amritanshu_dash/linear-algebra-for-ai-part-2-deep-understanding-of-vectors-2kkh</link>
      <guid>https://dev.to/amritanshu_dash/linear-algebra-for-ai-part-2-deep-understanding-of-vectors-2kkh</guid>
      <description>&lt;p&gt;Vectors are the language of machine learning. Humans think in words, but neural networks think only in vectors. If you understand vectors deeply, everything in AI becomes easier.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a Vector?
&lt;/h3&gt;

&lt;p&gt;A vector is simply a list of numbers.&lt;br&gt;
But these numbers represent two things:&lt;br&gt;
• Magnitude&lt;br&gt;
• Direction&lt;/p&gt;

&lt;p&gt;The easiest example is a push force.&lt;br&gt;
How strong you push = magnitude&lt;br&gt;
Which way you push = direction&lt;/p&gt;

&lt;p&gt;We will later show this diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6r36gmnczyq70d95iezn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6r36gmnczyq70d95iezn.png" alt=" " width="800" height="643"&gt;&lt;/a&gt;&lt;br&gt;
⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  Column Vectors: Your Robot’s Secret Instructions in Math and AI
&lt;/h3&gt;

&lt;p&gt;Imagine you’re in a magic treasure hunt. You have a map, and the map tells you exactly how far to go in each direction: forward, left, and up. Each instruction is crucial — missing or swapping one changes where you end up.&lt;/p&gt;

&lt;p&gt;That’s exactly what a column vector does: it stores instructions for movement in multiple dimensions.&lt;/p&gt;

&lt;p&gt;Column Vector Example&lt;br&gt;
Mathematically, we write it like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;v =&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;−2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;0.5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;• 3 → move 3 units along the x-axis (forward)&lt;br&gt;
• –2 → move 2 units along the y-axis (left/back)&lt;br&gt;
• 0.5 → move 0.5 units along the z-axis (up)&lt;/p&gt;

&lt;p&gt;💡 Memory Trick: “X forward, Y left, Z up — XYZ = exactly my path!”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5vyd9kelyaedxhust2l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5vyd9kelyaedxhust2l.png" alt=" " width="422" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  A Vector in Machine Learning
&lt;/h3&gt;

&lt;p&gt;[0.0123, -0.9431, 0.8567, -0.2210, …, 0.3312]&lt;/p&gt;

&lt;p&gt;This is what embedding vectors look like.&lt;br&gt;
In AI, vectors usually have 768 to 4096 numbers.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  Physics Vectors vs Machine Learning Vectors
&lt;/h3&gt;

&lt;p&gt;Here is the normal-block version of the table content:&lt;/p&gt;

&lt;p&gt;Physics / Math:&lt;br&gt;
• Represents force, velocity, movement&lt;br&gt;
• Usually 2D or 3D&lt;br&gt;
• Always has direction&lt;/p&gt;

&lt;p&gt;Machine Learning:&lt;br&gt;
• Represents meaning of a word, image, user, or sentence&lt;br&gt;
• Hundreds or thousands of dimensions&lt;br&gt;
• Meaning exists in a “semantic direction”&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  🛠️ Operations on Vectors — The Secret Tools of AI
&lt;/h3&gt;

&lt;p&gt;Imagine vectors as little robots carrying instructions. Each robot has a strength (magnitude) and a direction (where it’s heading). Now, just like you can combine Lego blocks to build a bigger toy, vector operations let us combine and adjust these robots to do amazing things:&lt;/p&gt;

&lt;p&gt;• Addition → putting robots together to work as a team.&lt;br&gt;
• Scaling (Multiplication) → telling a robot to move faster, slower, or even backward.&lt;/p&gt;

&lt;p&gt;These operations are the magic behind AI:&lt;br&gt;
• Merging user preferences to suggest the perfect movie 🎬&lt;br&gt;
• Combining forces to move a robot arm 🤖&lt;br&gt;
• Adjusting image features for computer vision 🖼️&lt;/p&gt;

&lt;p&gt;Think of it like this: each operation is a tool in your AI toolbox. The better you understand them, the more creative and powerful your AI creations can become.&lt;/p&gt;

&lt;p&gt;1.Vector Addition&lt;/p&gt;

&lt;p&gt;Two vectors are added element-wise:&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
(3, 1) + (-1, 4) = (2, 5)&lt;/p&gt;

&lt;p&gt;Intuition:&lt;br&gt;
Combining movements, combining signals, or merging features in ML.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbh4z0lhdjxdmcneixmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbh4z0lhdjxdmcneixmv.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.Scalar Multiplication&lt;/p&gt;

&lt;p&gt;Scaling a vector means multiplying every component:&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
5 × (2, 3) = (10, 15) → same direction, larger&lt;br&gt;
-1 × (2, 3) = (-2, -3) → flipped direction&lt;/p&gt;

&lt;p&gt;In AI, scaling adjusts magnitudes, gradients, and features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvmgmrigo5rd0trlflco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvmgmrigo5rd0trlflco.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  Real AI Example: Netflix
&lt;/h3&gt;

&lt;p&gt;• Your watch history → vector&lt;br&gt;
• Movie metadata → vector&lt;br&gt;
• Compare both vectors → similarity score&lt;br&gt;
• Add bias vectors (time of day, mood, past behavior)&lt;br&gt;
• Final recommendation vector → top results shown to you&lt;/p&gt;

&lt;p&gt;Everything is vector math.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  🧪 Vector Pooling — Combining the Power of Many Vectors
&lt;/h3&gt;

&lt;p&gt;Imagine you’re a conductor of an orchestra. Each musician plays their own note — some loud, some soft. Now, if you want to capture the overall sound of the orchestra in one go, you need to combine all the individual notes into a single “summary sound”.&lt;/p&gt;

&lt;p&gt;In AI, we face the same problem:&lt;br&gt;
• A sentence has many word vectors.&lt;br&gt;
• An image has many feature vectors.&lt;br&gt;
• Audio has many signal vectors.&lt;/p&gt;

&lt;p&gt;We can’t feed all of them individually into the next layer of a neural network. So, we use vector pooling: a technique that combines multiple vectors into a single vector while keeping important information intact.&lt;/p&gt;

&lt;p&gt;Think of vector pooling as summing up all the little instructions into one “super instruction” that the AI can understand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9acrjfab21wxanqgft7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9acrjfab21wxanqgft7i.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 Types of Vector Pooling
&lt;/h3&gt;

&lt;p&gt;Let’s see the three main types with realistic mini-examples:&lt;/p&gt;

&lt;p&gt;1.Sum Pooling — Total Strength&lt;/p&gt;

&lt;p&gt;We add all vectors component-wise, keeping the total magnitude.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;v1 = [1, 2, 3]&lt;br&gt;
v2 = [2, 0, 1]&lt;br&gt;
v3 = [0, 1, 2]&lt;/p&gt;

&lt;p&gt;Sum Pooling:&lt;/p&gt;

&lt;p&gt;sum = [v1[0]+v2[0]+v3[0], v1[1]+v2[1]+v3[1], v1[2]+v2[2]+v3[2]]&lt;br&gt;
sum = [1+2+0, 2+0+1, 3+1+2]&lt;br&gt;
sum = [3, 3, 6]&lt;/p&gt;

&lt;p&gt;Use case: Capturing total sentiment in a sentence, e.g., very excited + happy + surprised → overall excitement level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimxrm9mw3ij3ir6h35xv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimxrm9mw3ij3ir6h35xv.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.Mean Pooling — Average Meaning&lt;/p&gt;

&lt;p&gt;We average all vectors component-wise, focusing on the “typical” signal.&lt;/p&gt;

&lt;p&gt;mean = [sum[0]/3, sum[1]/3, sum[2]/3]&lt;br&gt;
mean = [3/3, 3/3, 6/3]&lt;br&gt;
mean = [1, 1, 2]&lt;/p&gt;

&lt;p&gt;Use case: Getting the overall meaning of a sentence in NLP or the average style of an image feature map.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqp0u3o6flncf5em6i8sr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqp0u3o6flncf5em6i8sr.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.Max Pooling — The Strongest Signal&lt;/p&gt;

&lt;p&gt;We pick the maximum value component-wise, keeping the most dominant signal.&lt;/p&gt;

&lt;p&gt;max_pool = [max(v1[0], v2[0], v3[0]),&lt;br&gt;
            max(v1[1], v2[1], v3[1]),&lt;br&gt;
            max(v1[2], v2[2], v3[2])]&lt;br&gt;
max_pool = [2, 2, 3]&lt;/p&gt;

&lt;p&gt;Use case: Detecting the strongest feature, e.g., the brightest pixel in a CNN, the loudest sound in audio, or the most important word in a sentence.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64h9tzyt1w0obgftiosr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64h9tzyt1w0obgftiosr.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Quick Analogy for Memory
&lt;/h3&gt;

&lt;p&gt;• Sum Pooling: Like counting all your coins → total wealth.&lt;br&gt;
• Mean Pooling: Like averaging your grades → overall performance.&lt;br&gt;
• Max Pooling: Like picking your tallest friend in the class → the standout feature.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;Vectors are more than numbers — they form a geometric world where neural networks “think.”&lt;br&gt;
Once you understand vector addition, scaling, and pooling, you understand the foundation of embeddings, attention, and deep learning.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>maths</category>
    </item>
    <item>
      <title>Linear Algebra for AI — Part 1</title>
      <dc:creator>Amritanshu Dash</dc:creator>
      <pubDate>Sun, 23 Nov 2025 07:08:56 +0000</pubDate>
      <link>https://dev.to/amritanshu_dash/linear-algebra-for-ai-5bjg</link>
      <guid>https://dev.to/amritanshu_dash/linear-algebra-for-ai-5bjg</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Linear Algebra for AI — Part 1: What Is Linear Algebra? (The Big Picture)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Last updated: 23 Nov 2025&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Linear algebra is the study of straight-line relationships and flat spaces — &lt;strong&gt;how things move, stretch, rotate, or combine without breaking structure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s the language of transformations that keep:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;straight lines →&lt;/strong&gt; straight&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;parallel lines →&lt;/strong&gt; parallel&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;the origin →&lt;/strong&gt; fixed&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think of it as the physics of predictable space.&lt;br&gt;
Everything in AI lives here.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fundamental Building Blocks(Everything Stems From These)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;&lt;strong&gt;Concept&lt;/strong&gt;&lt;/th&gt;
    &lt;th&gt;&lt;strong&gt;Everyday Meaning&lt;/strong&gt;&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Vector&lt;/strong&gt;&lt;/td&gt;
    &lt;td&gt;Arrow with direction + length (or a meaningful list)&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Matrix&lt;/strong&gt;&lt;/td&gt;
    &lt;td&gt;Grid that transforms vectors — the “warp machine”&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Scalar&lt;/strong&gt;&lt;/td&gt;
    &lt;td&gt;Simple number that stretches/shrinks vectors&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Linear Combination&lt;/strong&gt;&lt;/td&gt;
    &lt;td&gt;Mixing scaled vectors (&lt;code&gt;a·v₁ + b·v₂&lt;/code&gt;)&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Span&lt;/strong&gt;&lt;/td&gt;
    &lt;td&gt;All points you can reach with combinations&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Basis&lt;/strong&gt;&lt;/td&gt;
    &lt;td&gt;Smallest independent set that spans the space&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Determinants, eigenvalues, PCA, SVD, neural networks&lt;/strong&gt; — all built on these six ideas.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Does AI Rely So Heavily on Linear Algebra?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;AI = vectors pushed through matrices.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Data points →&lt;/strong&gt; vectors in high-dimensional space&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neural network layers →&lt;/strong&gt; matrices that transform those vectors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training →&lt;/strong&gt; finding the best transformation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;No linear algebra → no deep learning.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>maths</category>
      <category>deeplearning</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
