We live surrounded by written content: words, paragraphs, conversations. But… how does a machine «understand» that “king” and “queen” are related, or that “boy” and “girl” have a gender and similarity relationship? The answer lies in a magical (or at least very ingenious) concept called embeddings.
In this article we will explain it in an accessible way, without you needing to be an expert in AI or natural language processing.
What is an embedding?
A embedding Simply put, it is a numerical representation of a word (or phrase, or even image) in a space of numbers (vectors) such that proximity in that space reflects proximity in meaning. (IBM)
Imagine that each word is taken to a rocket that deposits it into a universe of numbers, and that words that "mean similar things" land relatively close to each other.
Why “convert words into numbers”?
Because machine algorithms work with numbers. Machines don't directly "see" meanings as we do; they see vectors, matrices, operations. If we can represent words by numerical vectors that encode their meaning or use, then we can use mathematical operations to find similarities, relationships, analogies…milvus.io)
In summary: words → vectors → mathematical operations → we discover relationships.
How do they work, in a lightweight way?
Here's a diagram without going into too much detail about formulas:
- A large corpus of text is taken (many books, articles, websites)
- The model observes contexts: which words appear close to others, in which sentences, etc.
- From there, learn to assign to each word a vector (e.g., 100-dimensional, 300-dimensional…) of real numbers.GeeksforGeeks)
- These vectors are organized in such a way that words used in similar contexts end up "close" to each other in that vector space.
- And most surprisingly: operations such as “king” – “man” + “woman” ≈ “queen” can also be performed. This demonstrates that the geometry of number space captures semantic relationships.milvus.io)
Example: boy-girl and king-queen
To put it in a clear example:
- Suppose the vector of boy es → v_chico.
- The vector of girl es → v_chica.
- Suppose the vector of king es → v_rey.
- The vector of queen es → v_reina.
So, in many embedding models, something like this happens:
v_chico → v_chica ≈ the same “distance” or “change” that v_rey → v_reina
In other words: “boy to girl” is symbolically similar to “king to queen”.
If you do:
v_rey - v_boy + v_girl ≈ v_queen
You find that the resulting vector is very close to v_reina. This demonstrates that the model has captured that “man → woman” is equivalent to “king → queen”.

These kinds of mathematical analogies are one of the "magic" aspects of embedding.milvus.io)
Why is it so useful?
Because thanks to embeddings we can:
- Measure similarity In other words: see how close two vectors are to know how related the concepts are.
- Clustering and grouping of words or documents by meaning.
- Find analogies, as in the previous example.
- Using them in search, recommendation, natural language processing, machine translation tasks… Embeddings are the foundation of many modern linguistic AI systems.turing.com)
A metaphor to understand it
Think of a map of cities. Each city is a word. On a normal map, cities that are geographically close have things in common (climate, culture, etc.). In the "meaning map" of embeddings, "word-cities" that are close together have similar meanings or uses.
And the best part: we can make “trips” on that map (additions and subtractions of vectors) to go from one concept to another.
Additional issues to consider
- Not all embeddings are the same: some are “static” (each word always has the same vector) and others are “contextual” (the vector depends on the context in which the word appears).Wikipedia)
- Embeddings can capture biases of the training text (e.g., gender, race, etc.). It is important to keep this in mind.Wikipedia)
- Although numerical representation is powerful, does not replace Human reading, nuances, cultural context… It's a tool.
What can you take with you?
If you take anything away from this article, let it be the following:
- An embedding is a numerical representation of a linguistic concept (word, phrase) such that proximity = similarity.
- This representation allows mathematical operations that discover relationships between words (such as boy-girl, king-queen).
- Thanks to this, language systems can better "understand" meaning, not just raw words.
- It is a core technology in the world of AI and natural language processing, with many practical applications.
Conclusion
The magic of embeddings lies in translating meaning into numbers and then playing with those numbers to discover relationships that already exist implicitly in language. From the analogy "boy → girl" to "king → queen," we are faced with structures that once seemed exclusively human and that we can now capture with vectors.
On the blog, we'll continue exploring how these seemingly technical concepts are making their way into real-world projects, and how you too can take advantage of them — even if you're not an AI expert.