第22章付録:深層学習のための数学
22.1.4. Geometry of Linear Transformations22.1.4 線形変換の幾何学
Through Section 2.3 and the above discussions, we have a solid understanding of the geometry of vectors, lengths, and angles. However, there is one important object we have omitted discussing, and that is a geometric understanding of linear transformations represented by matrices. Fully internalizing what matrices can do to transform data between two potentially different high dimensional spaces takes significant practice, and is beyond the scope of this appendix. However, we can start building up intuition in two dimensions.
英語のヒント
2.3節と上の議論を通じて、ベクトル、長さ、角度の幾何学についてしっかりした理解が得られた。しかし、論じずにおいた重要な対象が一つある。それは、行列で表される線形変換の幾何学的な理解である。潜在的に異なる二つの高次元空間の間でデータを変換するのに行列が何をできるかを完全に身につけるには、かなりの練習が必要であり、この付録の範囲を超える。しかし、2次元で直観を築き始めることはできる。
Suppose that we have some matrix:
英語のヒント
ある行列があるとする。
(22.1.11)
If we want to apply this to an arbitrary vector , we multiply and see that
英語のヒント
これを任意のベクトルに適用したいなら、掛け算をすると次のようになる。
(22.1.12)
This may seem like an odd computation, where something clear became somewhat impenetrable. However, it tells us that we can write the way that a matrix transforms any vector in terms of how it transforms two specific vectors: and . This is worth considering for a moment. We have essentially reduced an infinite problem (what happens to any pair of real numbers) to a finite one (what happens to these specific vectors). These vectors are an example a basis, where we can write any vector in our space as a weighted sum of these basis vectors.
英語のヒント
これは奇妙な計算に見えるかもしれない。はっきりしていたものが、いくらかわかりにくくなった。しかしこれは、行列が任意のベクトルをどう変換するかを、二つの特定のベクトルとをどう変換するかによって書けることを教えてくれる。これはしばらく考える価値がある。本質的に、無限の問題(任意の実数の組に何が起きるか)を有限の問題(これらの特定のベクトルに何が起きるか)に帰着させたのである。これらのベクトルは基底の一例であり、空間の中の任意のベクトルを、これらの基底ベクトルの重み付き和として書ける。
Let’s draw what happens when we use the specific matrix
英語のヒント
特定の行列を使うと何が起きるかを描いてみよう。
(22.1.13)
If we look at the specific vector , we see this is , and thus we know that the matrix will send this to . If we follow this logic through carefully, say by considering the grid of all integer pairs of points, we see that what happens is that the matrix multiplication can skew, rotate, and scale the grid, but the grid structure must remain as you see in Fig. 22.1.8.
英語のヒント
特定のベクトルを見ると、これはであり、したがって行列がこれをに送ることがわかる。この論理を注意深くたどり、たとえばすべての整数の組の点からなる格子を考えると、行列の掛け算は格子をゆがめ、回転させ、拡大縮小できるが、図22.1.8に見るように格子の構造は保たれなければならないことがわかる。
Fig. 22.1.8図22.1.8
The matrix acting on the given basis vectors. Notice how the entire grid is transported along with it.
英語のヒント
与えられた基底ベクトルに作用する行列。格子全体がそれとともに運ばれる様子に注目しよう。
This is the most important intuitive point to internalize about linear transformations represented by matrices. Matrices are incapable of distorting some parts of space differently than others. All they can do is take the original coordinates on our space and skew, rotate, and scale them.
英語のヒント
これが、行列で表される線形変換について身につけるべき最も重要な直観である。行列は、空間のある部分をほかの部分と違うようにゆがめることはできない。行列にできるのは、空間のもとの座標をとって、それをゆがめ、回転させ、拡大縮小することだけである。
Some distortions can be severe. For instance the matrix
英語のヒント
ゆがみがひどくなることもある。たとえば次の行列は、
(22.1.14)
compresses the entire two-dimensional plane down to a single line. Identifying and working with such transformations are the topic of a later section, but geometrically we can see that this is fundamentally different from the types of transformations we saw above. For instance, the result from matrix can be “bent back” to the original grid. The results from matrix cannot because we will never know where the vector came from—was it or ?
英語のヒント
2次元の平面全体を一本の直線に押しつぶす。こうした変換を見つけて扱うことは後の節の話題だが、幾何学的には、これが上で見た種類の変換とは根本的に違うことがわかる。たとえば、行列による結果は、もとの格子に「折り戻す」ことができる。行列による結果はそうできない。ベクトルがどこから来たのか、つまりだったのかだったのかが決してわからないからである。
While this picture was for a matrix, nothing prevents us from taking the lessons learned into higher dimensions. If we take similar basis vectors like and see where our matrix sends them, we can start to get a feeling for how the matrix multiplication distorts the entire space in whatever dimension space we are dealing with.
英語のヒント
この図は行列についてのものだったが、学んだ教訓をより高い次元に持ち込むのを妨げるものは何もない。のような同様の基底ベクトルをとって、行列がそれをどこへ送るかを見れば、扱っている空間が何次元であっても、行列の掛け算が空間全体をどうゆがめるかを感じ取り始められる。