Why X is unknown in math
Everyone has somehow gotten used to the fact that in mathematical equations and in everyday life, we call something unknown X. In mathematics, x is something unknown, and not only in mathematics but also in ordinary life, x is always something unknown. Why x is unknown in math? And why this particular letter is considered as unknown? There are two versions that answer this question.

Why X is unknown in math
The Arabic Version
As everyone knows, algebra (al-jabr) was invented by the Arabs. In fact, this only applies to the word “algebra” itself.
In the book “The Compendious Book on Calculation by Completion and Balancing” by mathematician Muhammad ibn Musa al-Khwarizmi, the term al-jabr was used to denote the transfer from one part of an equation to another. The book itself was principally devoted to solving equations and presented earlier ideas of Indian mathematicians.

There are no numerals here, but this is an equation
But Europeans did not have direct contact with India, so they received all the wisdom of solving equations from Arab mathematicians. Arabs did not use formulas in the modern sense; everything was written out in words. So, in al-Khwarizmi’s treatise, the unknown in an equation was called “shay,” which means something or thing.
When Spanish scholars faced the task of translating the Arabic text, a problem arose. Old Spanish didn’t have a letter that transmitted the “sh” sound, so they simply took the Greek letter χ (chi) to write this sound.
This version is quite controversial, as it’s unclear why Spanish became the stumbling block, since the language of science at that time (the Middle Ages) was Latin. Perhaps the problem was specifically in Latin, where CH was often replaced with the Greek χ.
The French Version
There is another version that explains what x is more plausibly.
René Descartes, well known to all schoolchildren (Cartesian coordinate system), wrote the book “La Géométrie” and published it in 1637.
In it, he used the letters x, y, z to denote unknowns. Book pages at that time were assembled from letters, creating a matrix on which ink was applied and then pressed onto paper using a press. These very letters were not always sufficient. Some letters were always more plentiful, while others were less so.

When Descartes was asked if it mattered which letter was used to denote unknown variables, he replied that it didn’t matter. And the printing house simply chose the most “unnecessary” letter.
Such a letter that doesn’t appear often in French words. This turned out to be X. And since it was René Descartes who introduced modern mathematical symbols, it historically happened that the unknown in equations is denoted by X.
And not only in equations but also in popular culture. Everything unknown and mysterious is X. Just remember X-Files or X-Men.
But now at least we understand why it’s this way. It’s simply a habit. Any other letter could have been used instead of x in mathematics.