ARTICLE · 1443277
矩阵 Matrix
大家看过1999年第一部《黑客帝国》电影吗?有没有被里面的绿色数字雨震撼到?如果没有看过,我真的推荐大家去看一下,你肯定会被震撼到的!大家知道它的英文名字是什么吗?对!英文名字是《Matrix》。主角尼奥被告知这个世界被“Matrix”控制了,需要他去拯救世界。
Have you ever watched the first The Matrix movie from 1999? Were you amazed by the green digital rain in it? If you haven't seen it, I really recommend you check it out—you'll be blown away! The protagonist Neo is told that the world is controlled by the "Matrix," and he is the one destined to save it.

Matrix源自古拉丁语“Mātrix”,本义“子宫”,其词根“māter-”,意为“母亲”,强调生育与起源的概念。因此Matrix的本意就是母体、发源地。
The word Matrix originates from the ancient Latin word "Mātrix," whose original meaning is "womb." Its root, "māter-," means "mother," emphasizing the concepts of birth and origin. Therefore, the original meaning of matrix is the maternal body or source of origin.
在很多专业领域,matrix都可以表示类似母体、发源地的事物,比如在矿业领域,matrix翻译成“基岩”,在生物学领域,matrix翻译成“基质”,在数学领域,matrix翻译成“矩阵”。
In many specialized fields, matrix can denote something akin to a maternal body or source. For example, in mining, matrix is translated as "bedrock"; in biology, it is translated as "stroma" or "extracellular matrix"; and in mathematics, it is translated as "matrix" (as in the mathematical array).
无论翻译成“母体”、“矩阵”还是“黑客帝国”,电影要表达什么含义呢?当我们把电影与人工智能和机器学习联系在一起时,就明白翻译成“矩阵”最合适最直观,因为人工智能和机器学习算法的核心就是超大规模矩阵的计算。当然,翻译成“黑客帝国”更有文艺范,更满足商业电影的市场需求。我们今天就聊一聊“矩阵”!
Whether translated as "Motherbody," "Matrix," or The Matrix (as in the film's Chinese title Hacker Empire), what meaning does the movie actually convey? When we connect the film with artificial intelligence and machine learning, we realize that translating it as "Matrix" (the mathematical sense) is the most appropriate and intuitive, because the core of AI and machine learning algorithms lies in large-scale matrix computations. Of course, translating it as Hacker Empire has more artistic flair and better meets the commercial film market's demands. Today, let's talk about the "matrix"!
让我们从最熟悉的事物开始理解矩阵。
Let's start understanding matrices from the things we are most familiar with.

上图收纳架由两层的方格组成,每个格子放着不同的物品,有的放书本,有的多肉......我们不妨简写成:
The storage rack in the image above consists of two layers of grid cells, each holding different items—some have books, others succulents, and so on. We can simply write it as:

这其实就是矩阵最朴素的模样——一个按照横行和竖列整齐排列的数字(或信息)集合,每个格子里的物品是这个矩阵的元素。矩阵中,横排是行、竖排是列,因此上面矩阵是一个2行4列的矩阵,一般记成2×4的矩阵,因此有8个元素。
This is the most basic form of a matrix—a collection of numbers (or information) neatly arranged in horizontal rows and vertical columns. Each item in a cell is an element of the matrix. In a matrix, horizontal lines are rows and vertical lines are columns. Therefore, the matrix above is a matrix with 2 rows and 4 columns, generally denoted as a 2×4 matrix, and thus has 8 elements.

如果是个简易收纳架,也可以写成矩阵形式:
If it's a simple storage rack, it can also be written in matrix form:

此时的矩阵是一个3行1列或3×1的矩阵,因此有3个元素。
This is a matrix with 3 rows and 1 column, or a 3×1matrix, and therefore has 3 elements.
班级座位也可以想象成一个矩阵。比如42名同学按6横排、7竖排就坐,就组成一个6行7列或6×7的矩阵,每个元素对应每一个同学的名字。
A classroom seating arrangement can also be imagined as a matrix. For example, if 42 students are seated in 6 horizontal rows and 7 vertical columns, they form a 6×7matrix, with each element corresponding to a student's name.

班上42名同学的学习成绩也可以组成一个矩阵,行代表不同同学,列代表“语文”、“数学”、“英语”等课程成绩。因为同学数量太多,我们不写出全部成绩,只展示部分成绩。
The academic performance of the 42 students in the class can also form a matrix, with rows representing different students and columns representing scores in subjects like "Chinese," "Math," "English," etc. Since there are too many students, we won't list all the scores, only a partial view.


不妨简写成:
We can abbreviate this as:

这是一个由42个同学5门课程成绩组成的42行5列或42×5的矩阵,每个元素对应一个分数。通过矩阵我们发现,同学1(第一行)每门成绩都是满分,简直是学神;全班体育成绩(第四列)都很高,说明所有学生都喜欢上体育课,并且表现很优秀。
This is a matrix consisting of scores from 42 students across 5 subjects, with 42 rows and 5 columns—a 42×5 matrix—where each element corresponds to a score. Through the matrix, we discover that Student 1 (first row) scored full marks in every subject—practically a prodigy. The entire class's PE scores (fourth column) are very high, indicating that all students enjoy PE class and perform excellently.
同样,你可以把最喜欢球队在整个赛季的表现变成一个矩阵,行代表不同的比赛场次,列代表“得分”、“篮板”、“助攻”等数据。教练和球迷通过分析这个“赛季矩阵”,就能发现球队的隐藏规律和球员的闪光时刻。
Similarly, you can turn your favorite team's performance over an entire season into a matrix, with rows representing different games and columns representing stats like "points," "rebounds," "assists," etc. Coaches and fans can analyze this "season matrix" to uncover hidden patterns in the team and highlight players' standout moments.

现在请将手机照片放大到最大,会发现什么?任何清晰的图像,最终都会变成一个个彩色的小方块——这些构成数字图像的最小单位,就是像素。像素英文Pixel,源于图像“picture”和元素“element”组合缩写,意思是组成数字图像的元素。就像生物是由原子构成的,像素就是数字图像的原子,每个像素只有一种颜色。
Now, try zooming in on a photo on your phone to the maximum. What do you see? Any clear image, when magnified enough, ultimately breaks down into tiny colored squares—these smallest units that make up a digital image are called pixels. The word "pixel" is a combination of "picture" and "element," meaning the fundamental component of a digital image. Just as organisms are made of atoms, pixels are the atoms of a digital image, with each pixel having only one color.
比如我们说“一个手机像素是1100万”,指的是这个手机可以拍出1100万像素的照片,那这张照片就是由大约1100万个像素组成。还经常说“这张照片拥有4080×2720的分辨率”,两个说法是对应的。照片的分辨率就是像素的数量,是指照片在水平方向有4080个像素,垂直方向有2720个像素,计算总像素数4080×2720等于11,097,600,约等于1100万。我们可以将这个照片图像看做一个4080×2720的矩阵,每个元素对应一个像素。
For example, when we say "a phone has an 11-megapixel camera," it means the phone can capture photos with about 11 million pixels, and that photo is composed of approximately 11 million pixels. We also often say "this photo has a resolution of 4080×2720." These two statements correspond to each other. The resolution of a photo is the number of pixels, meaning the photo has 4080 pixels horizontally and 2720 pixels vertically. The total number of pixels is 4080×2720 = 11,097,600, approximately 11 million. We can view this photo image as a 4080×2720 matrix, where each element corresponds to one pixel.

如果这个照片是黑白照片(又叫灰度图像),每个像素用一个数字代表它的亮度。亮度范围通常从0到255,0表示黑色,255表示白色,中间其它数值表示不同程度的灰色。所以1100万像素的黑白照片对应一个4080×2720的矩阵,并且每个元素取值都在0到255之间。大家看到没有?图像本质就是矩阵!
If the photo is a black-and-white photo (also called a grayscale image), each pixel uses a single number to represent its brightness. The brightness range is typically from 0 to 255, where 0 represents black, 255 represents white, and the intermediate values represent varying shades of gray. Thus, an 11-megapixel black-and-white photo corresponds to a 4080×2720 matrix, with each element taking a value between 0 and 255. Do you see? An image is essentially a matrix!

为什么是0到255?这是因为二进制的原因。计算机用8位(1字节)存储每个颜色,8位二进制最小数00000000等于十进制0,8位二进制最大数11111111等于十进制255,所以每个颜色有256种亮度级别。
Why 0 to 255? This is due to the binary system. Computers use 8 bits (1 byte) to store each color channel. The smallest 8-bit binary number, 00000000, equals 0 in decimal, and the largest 8-bit binary number, 11111111, equals 255 in decimal. Therefore, each color has 256 levels of brightness.

如果这是一张彩色照片(又叫彩色图像),比灰度图像拥有更丰富的信息,情况就复杂一些,每个像素需要用三个数字代表它的颜色。
If it's a color photo (also called a color image), it contains richer information than a grayscale image, and the situation is a bit more complex: each pixel requires three numbers to represent its color.

红绿蓝三原色可以混合出千万种颜色,因此彩色图像每个像素的颜色使用红、绿、蓝三个颜色的组合来表示。用三个数字表示红绿蓝的混合程度,比如(255,0,0)代表红色,(0,255,0)代表绿色,(0,0,255)代表蓝色。
The three primary colors—red, green, and blue—can be mixed to produce millions of colors. Therefore, the color of each pixel in a color image is represented by a combination of red (R), green (G), and blue (B) intensities. Three numbers are used to indicate the mixing levels of red, green, and blue—for example, (255, 0, 0) represents red, (0, 255, 0) represents green, and (0, 0, 255) represents blue.
所以1100万像素的彩色照片对应一个4080×2720的矩阵,每个元素由三个数字构成,且每个数字取值都在0到255之间。
Thus, an 11-megapixel color photo corresponds to a 4080×2720 matrix, where each element consists of three numbers, each taking a value between 0 and 255.
在数字世界里,像素是数字图像的最小单位,这些小小的方块,每个都携带特定的颜色和亮度信息,共同编织成五彩斑斓的数字世界。
In the digital world, pixels are the smallest units of a digital image. These tiny squares, each carrying specific color and brightness information, together weave the colorful digital world.
矩阵的魔力远不止于图像。我们听的音乐,发送的文字消息,我们的社交关系同样可以被矩阵化。假设我们用1表示“关注”,0表示“未关注”,那么你和朋友们在社交媒体上的关注网络,就可以变成一个由0和1组成的矩阵。计算机分析这个矩阵,就能发现谁是最受欢迎的意见领袖,或者推荐你可能感兴趣的新朋友——那些精准的“猜你喜欢”,背后正是矩阵在悄悄工作。
The power of matrices goes far beyond images. The music we listen to, the text messages we send, and even our social relationships can all be matrix-ified. Suppose we use 1 to represent "following" and 0 to represent "not following." Then the follow network between you and your friends on social media can become a matrix of 0s and 1s. By analyzing this matrix, computers can identify who the most popular opinion leaders are or recommend new friends you might be interested in—those accurate "You May Know" suggestions are, behind the scenes, the work of matrices.
下次当你拍照、听歌、玩游戏,或是对手机说出“嘿,Siri”时,希望你能想起在那些流畅体验的底层,正有无数个数字矩阵像勤劳的精灵般奔忙着。它们不再只是数学课本上的抽象概念,而是连接现实世界与数字文明的桥梁,是将人类创造力转化为智能行动的魔法语言。
The next time you take a photo, listen to music, play a game, or say "Hey, Siri" to your phone, I hope you'll remember that beneath those smooth experiences, countless digital matrices are busy at work like diligent little elves. They are no longer just abstract concepts in math textbooks; they are the bridge connecting the real world to digital civilization, and the magical language that transforms human creativity into intelligent action.















































































