Understanding Numbers: The Language of AI

AI Fundamentals · beginner

Featured image for Understanding Numbers: The Language of AI

🔢 Introduction: The Universal Language

You’ve learned a lot about AI. But there’s one secret behind everything: numbers.

Think about it. When you look at a beautiful sunset, you see colors. When you listen to music, you hear sounds. When you read a story, you understand words.

But computers don’t see colors. They don’t hear sounds. They don’t understand words.

Computers only understand numbers.

Everything that AI does—recognizing faces, understanding speech, writing stories—starts by converting the real world into numbers. This is called representation learning.

In this article, we’ll explore how the world gets turned into numbers for AI. This will help you understand the magic behind everything you’ve learned!


📷 Chapter 1: Images as Numbers (How Computers See)

Pixels: The Building Blocks

What is a pixel? A pixel is the smallest unit of a digital image. It’s a tiny dot. When millions of pixels are arranged together, they form an image.

How pixels are represented:

  • Each pixel is a number
  • The number represents brightness or color
  • Images are grids of numbers

Example: A Simple Image A 3x3 black and white image would be: [0, 0, 0] [0, 1, 0] [0, 0, 0]

Where 0 = black, 1 = white

Color Images (RGB)

How color works:

  • Color images use three numbers per pixel
  • Red, Green, Blue (RGB)
  • Each color is a number from 0-255

Example: A single pixel might be:

  • Red: 255 (maximum)
  • Green: 0 (none)
  • Blue: 0 (none) This is pure red!

The Scale:

  • 0 = no color (black)
  • 255 = full color (bright)
  • Mixing values creates millions of colors

Image Dimensions

Image Size:

  • Width × Height × Channels
  • Channels = 1 (black/white) or 3 (RGB)

Example: A 1920×1080 image with RGB:

  • 1920 × 1080 = 2,073,600 pixels
  • 2,073,600 × 3 = 6,220,800 numbers!

Why This Matters

What AI does:

  1. Converts images to numbers (pixels)
  2. Processes these numbers
  3. Finds patterns in the numbers
  4. Makes predictions

Example: Recognizing a Cat The AI looks at millions of numbers. It learns that cat images have certain patterns in the numbers. When it sees a new image, it checks for these patterns.


🎵 Chapter 2: Audio as Numbers (How Computers Hear)

Sound Waves

What is sound? Sound is vibrations in the air. These vibrations create waves.

How sound is digitized:

  1. The sound wave is measured
  2. Measurements become numbers
  3. Numbers represent the sound

Sampling

What is sampling? Sampling is measuring the sound wave many times per second.

Example:

  • CD quality: 44,100 samples per second
  • Each sample is a number
  • Higher samples = better quality

Audio Features

What AI looks for:

  • Amplitude: How loud it is
  • Frequency: The pitch (high or low)
  • Timing: When sounds happen

Example: A song is just millions of numbers! The AI analyzes these numbers to understand the music.

Why This Matters

What AI does:

  1. Converts audio to numbers
  2. Processes these numbers
  3. Finds patterns in the numbers
  4. Recognizes speech or music

Example: Voice Recognition The AI analyzes the numbers from your voice. It learns patterns that correspond to words. When you speak, it matches the new pattern to words it knows.


📝 Chapter 3: Text as Numbers (How Computers Read)

Tokenization

What is tokenization? Breaking text into smaller pieces called tokens.

Example: “The cat sat on the mat”

  • Tokens: [“The”, “cat”, “sat”, “on”, “the”, “mat”]

Word Embeddings

What are embeddings? Embeddings convert text to numbers that capture meaning.

How it works:

  1. Each word gets a vector (list of numbers)
  2. Similar words have similar numbers
  3. The numbers represent meaning

Example:

  • “King”: [0.1, 0.8, 0.2]
  • “Queen”: [0.1, 0.7, 0.3]
  • “Apple”: [0.9, 0.1, 0.8]

Notice: “King” and “Queen” are close (similar numbers). “Apple” is different.

Word2Vec

The famous technique: Word2Vec is a method to create word embeddings.

How it works:

  • Looks at words in context
  • “You shall know a word by the company it keeps”
  • Words used in similar contexts get similar numbers

The Magic: King - Man + Woman = Queen

This is real math! The numbers actually represent meaning!

Why This Matters

What AI does:

  1. Converts words to numbers
  2. Processes these numbers
  3. Finds patterns in the numbers
  4. Generates new text

Example: ChatGPT Every word you type is converted to numbers. The AI processes these numbers. It predicts what numbers (words) should come next.


🧮 Chapter 4: Numbers That Represent Meaning

Vectors: A Number Container

What is a vector? A vector is a list of numbers. It’s like a point in space.

Example:

  • A 2D vector: (3, 5)
  • A 3D vector: (3, 5, 2)
  • A 100D vector: (3, 5, 2, 1, 8, …)

Embedding Space

What is embedding space? The space where vectors exist.

How it works:

  • Each word gets a point in space
  • Similar words cluster together
  • The AI works with these points

Analogy: Think of a map. Cities are points on the map. Similar cities (like those with ports) might be near each other on the map. The AI uses maps of meaning!

The Magic of Numbers

What numbers can represent:

  • Images: Pixel values
  • Audio: Sound measurements
  • Text: Word meanings
  • Anything: Any data can become numbers

The AI’s Job:

  1. Find patterns in numbers
  2. Understand relationships
  3. Make predictions
  4. Create new things

📊 Chapter 5: How AI Learns from Numbers

Pattern Recognition

What is pattern recognition? Finding repeating patterns in numbers.

Example:

  • AI sees many cat images
  • It finds patterns in the numbers
  • It learns to recognize cats

Statistical Relationships

What AI looks for:

  • Correlations (things that happen together)
  • Patterns (repeating structures)
  • Anomalies (things that don’t fit)

Learning from Data

The Process:

  1. Get many numbers (data)
  2. Find patterns
  3. Use patterns to make predictions
  4. Improve with more numbers

🔢 Chapter 6: Numbers in AI Models

Parameters: The AI’s Knobs

What are parameters? Numbers inside the AI that it can adjust.

Example:

  • Simple model: 10 parameters
  • GPT-3: 175 billion parameters!

Weight and Bias

Weight:

  • How important is something?
  • Multiplied by input

Bias:

  • What’s the starting point?
  • Added to the result

The Math of Prediction

Simple Example: Prediction = (Weight × Input) + Bias

Complex Example (Neural Network): Layer1 = ReLU(Weight1 × Input + Bias1) Layer2 = ReLU(Weight2 × Layer1 + Bias2) Output = Weight3 × Layer2 + Bias3


🎯 Chapter 7: Examples in Real AI

1. Facial Recognition

Numbers involved:

  • Image pixels
  • Feature values
  • Faceprint numbers

How it works:

  1. Image becomes numbers
  2. AI finds face features
  3. Creates faceprint (numbers)
  4. Compares faceprints

2. Language Translation

Numbers involved:

  • Word tokens
  • Embedding vectors
  • Attention scores

How it works:

  1. Text becomes numbers
  2. AI processes the numbers
  3. Predicts target language numbers
  4. Converts back to text

3. Stock Prediction

Numbers involved:

  • Historical prices
  • Financial ratios
  • Market indicators

How it works:

  1. Data becomes numbers
  2. AI finds patterns
  3. Predicts future numbers
  4. Makes decisions

4. Self-Driving Cars

Numbers involved:

  • Camera pixels
  • Radar readings
  • GPS coordinates

How it works:

  1. Sensors become numbers
  2. AI understands the scene
  3. Predicts safe actions
  4. Controls the car

🏁 Conclusion: The Number Universe

Everything in AI is numbers. Every image, every sound, every word—they all become numbers for the computer to process.

We’ve learned that:

  • Computers only understand numbers
  • Everything must be converted to numbers—images, audio, text
  • Images become pixel values in grids
  • Audio becomes samples measured over time
  • Text becomes tokens and embeddings that capture meaning
  • Vectors and embeddings represent meaning in space
  • Parameters are numbers that the AI adjusts
  • All AI is math—adding, multiplying, finding patterns

What This Means for You:

Understanding that AI is just numbers demystifies it. The “magic” is really math:

  1. Everything is data—turned into numbers
  2. AI finds patterns in the numbers
  3. Patterns become predictions or creations

The Key Insight:

AI isn’t magic—it’s math. When you understand the numbers, you understand the AI. You can:

  1. Know what’s really happening behind the scenes
  2. Understand limitations—numbers can’t capture everything
  3. Appreciate the complexity of representing the world
  4. See the possibilities for new applications

Continue Your AI Journey:

You’ve now completed the basics to the math behind it all, you have a strong foundation in Artificial Intelligence.

Remember: AI is a tool. It’s powerful, but it’s created by humans for humans. Use it wisely, think critically, and always remember that you are the one in control!

In Our Next Article:

Next meet up with Edge AI: AI That Lives in Your Pocket. Your phone is like a tiny, sleepy wizard who does all its smart thinking right in your pocket—no waiting for the cloud to “wake up”! So even if the Wi-Fi throws a tantrum, Face ID still knows it’s you, and Siri still sasses you back. 😎