markdown
行列の積の意味md a92c91b
lecture/math/linear-algebra/meaning-of-matrix-multiplication.lecture.n.md
Download PDF

行列ぎょうれつmatrixの積せきの意味いみ

date2026-07-14document_iddoc_af269e3f57433a74a4583289ac5163bbdescription行列の積を、サイズ条件・列ベクトルへの作用・線型写像の合成という三つの観点から整理する講義である。prerequisites行列のサイズ / ベクトルの基本演算type講義content_typelecturestatusactiverelateddata/lecture/math/linear-algebra/matrix-operations.lecture.n.md / data/lecture/math/linear-algebra/linear-maps-and-matrices.lecture.n.md / data/lecture/math/linear-algebra/inverse-matrix-basics.lecture.n.md / data/exercise/math/linear-algebra/matrix-computation-and-linear-transformations.exercise.n.md
mathlinear-algebraundergraduatelecture

Meaning of the matrix product行列積ぎょうれつせき

1導入どうにゅう

この講義こうぎで重要じゅうようなのは、行列ぎょうれつmatrixの積せきは成分せいぶんcomponentごとの掛かけ算ざんではなく、線型写像せんけいしゃぞうlinear mapの合成ごうせいを座標ざひょうで表あらわすように定義ていぎされた演算えんざんであるということである。

行列積ぎょうれつせきの規則きそくは不自然ふしぜんに見みえやすいが、列れつベクトルcolumn vectorへ作用さようさせる操作そうさoperationと写像しゃぞうmapの合成ごうせいを要求ようきゅうすると、この形かたちが自然しぜんに現あらわれる。

1Introduction

The product of matrices is not entrywise multiplication. It is defined so that matrices represent composition of linear maps線型写像せんけいしゃぞう in coordinates.

The rule for matrix multiplication can look unnatural at first, but it appears naturally once we require compatibility with the action on column vectors and with composition of maps.

2用語ようごと定義ていぎ

A を m×n 行列ぎょうれつmatrix、B を n×p 行列ぎょうれつmatrixとする。このとき積せき AB は m×p 行列ぎょうれつmatrixであり、成分せいぶんcomponentは

(AB)ij=∑k=1naikbkj

で定義ていぎされる。内側うちがわのサイズ n が一致いっちすることが必要ひつようである。

この成分公式せいぶんこうしきは、暗記あんきする規則きそくではない。B の第だい j 列れつcolumnを b(j) と書かくと、AB の第だい j 列れつcolumnは

Ab(j)

である。つまり、B が標準基底ひょうじゅんきていstandard basisの第だい j 方向ほうこうを b(j) へ送おくり、その結果けっかに A を作用さようさせたものが、AB の第だい j 列れつcolumnになる。ここから第だい i 成分せいぶんcomponentを取とると、A の第だい i 行ぎょうrowと b(j) の内積的ないせきてきな和わになり、

(AB)ij=ai1b1j+ai2b2j+⋯+ainbnj=∑k=1naikbkj

が得えられる。したがって、列れつcolumnへの作用さようと写像しゃぞうmapの合成ごうせいを先さきに考かんがえると、成分公式せいぶんこうしきは後あとから必然的ひつぜんてきに導みちびかれる。

3方針ほうしん

まず数表すうひょうとして計算けいさんし、つぎに列れつベクトルcolumn vectorへの作用さようとして解釈かいしゃくする。最後さいごに、行列積ぎょうれつせきが線型写像せんけいしゃぞうlinear mapの合成ごうせいを表現ひょうげんすることを確認かくにんする。

data/lecture/math/linear-algebra/matrix-operations.lecture.n.md

4直感的ちょっかんてきな説明せつめい

A の列れつcolumnを a1,[PARSE ERROR: Undefined("Command(\"dots\")")],an とする。x=(x1,[PARSE ERROR: Undefined("Command(\"dots\")")],xn)T に対たいして

Ax=x1a1+⋯+xnan

である。つまり、行列ぎょうれつmatrixは入力にゅうりょくの成分せいぶんcomponentを係数けいすうcoefficientとして、列れつベクトルcolumn vectorを線型結合せんけいけつごうlinear combinationする装置そうちである。

この装置そうちを 2 回かい連続れんぞくで作用さようさせると、行列積ぎょうれつせきが現あらわれる。したがって ABx は「まず B を作用さようさせ、つぎに A を作用さようさせる」ことを意味いみする。

5厳密げんみつな説明せつめい

B:Kp→Kn、A:Kn→Km と考察こうさつする。x∈Kp に対たいして

x⟼Bx⟼A(Bx)

となるため、合成写像ごうせいしゃぞうは A∘B であり、その表現行列ひょうげんぎょうれつrepresentation matrixが AB である。記号きごうの順序じゅんじょは右みぎから作用さようするため、先さきに実行じっこうする行列ぎょうれつmatrixが右側みぎがわに置おかれる。

2Terms and definitions

Let A be an m×n matrix行列ぎょうれつ and B an n×p matrix. Then AB is an m×p matrix with entries

(AB)ij=∑k=1naikbkj.

The inner sizes must match.

This formula is not merely a rule to memorize. If b(j) is the j-th column列れつ of B, then the j-th column of AB is

Ab(j).

Thus B first sends the j-th standard-basis direction to b(j), and then A acts on that result. Reading the i-th component gives

(AB)ij=ai1b1j+ai2b2j+⋯+ainbnj=∑k=1naikbkj.

3Strategy

First calculate matrix products as tables of numbers, then interpret them as actions on column vectors列れつベクトル. Finally, check that matrix multiplication represents composition of linear maps線型写像せんけいしゃぞう.

data/lecture/math/linear-algebra/matrix-operations.lecture.n.md

4Intuitive explanation

Let the columns of A be a1,…,an. For x=(x1,…,xn)T,

Ax=x1a1+⋯+xnan.

A matrix therefore uses the components of the input as coefficients係数けいすう and forms a linear combination線型結合せんけいけつごう of its columns.

Applying this device twice produces matrix multiplication. Thus ABx means: apply B first, then apply A.

5Precise explanation

Regard B:Kp→Kn and A:Kn→Km. For x∈Kp,

x⟼Bx⟼A(Bx).

Therefore the composite map is A∘B, and its representation matrix表現行列ひょうげんぎょうれつ is AB. Since matrices act from the right on vectors, the matrix applied first appears on the right.

6列れつcolumnによる解釈かいしゃく

A の列れつcolumnを a1,…,an、x=(x1,…,xn)T とすると、

Ax=x1a1+⋯+xnan

である。つまり、行列ぎょうれつmatrixは入力にゅうりょくの成分せいぶんcomponentを係数けいすうcoefficientとして、列れつcolumnの線型結合せんけいけつごうlinear combinationを作つくる。B の第だい j 列れつcolumnを b(j) とすると、AB の第だい j 列れつcolumnは

Ab(j)

である。

7合成ごうせいによる解釈かいしゃく

B:Kp→Kn、A:Kn→Km と見みると、

x↦Bx↦A(Bx)

である。したがって合成写像ごうせいしゃぞうは AB で表あらわされる。ABx では、B が先さきに作用さようし、A が後あとに作用さようする。

8具体例ぐたいれい

A=(1201),B=(3012)

とする。このとき

AB=(5412),BA=(3614)

である。したがって一般いっぱんに AB=BA ではない。順序じゅんじょが変かわると、合成ごうせいする写像しゃぞうmapの順序じゅんじょも変化へんかする。

6Column interpretation

If the columns of A are a1,…,an and x=(x1,…,xn)T, then

Ax=x1a1+⋯+xnan.

So a matrix uses the components of the input as coefficients and forms a linear combination線型結合せんけいけつごう of its columns. If b(j) is the j-th column of B, then the j-th column of AB is

Ab(j).

7Composition interpretation

Regard B:Kp→Kn and A:Kn→Km. Then

x↦Bx↦A(Bx),

so the composite map is represented by AB. In ABx, B acts first and A acts second.

8Worked example

Let

A=(1201),B=(3012).

Then

AB=(5412),BA=(3614).

Thus AB and BA are generally different because the order of composition is different.

9定理ていりと証明しょうめい:行列積ぎょうれつせきは合成ごうせいを表あらわす

A を m×n、B を n×p とする。B の列れつcolumnを b1,…,bp と書かく。x∈Kp に対たいして

Bx=x1b1+⋯+xpbp

である。A を作用さようさせ、線型性せんけいせいlinearityを使つかうと

A(Bx)=x1Ab1+⋯+xpAbp

となる。AB の列れつcolumnは Ab1,…,Abp なので、(AB)x=A(Bx) である。

10よくある誤解ごかい

  • 行列積ぎょうれつせきは対応たいおうする成分せいぶんcomponentどうしの積せきではない。
  • サイズ条件じょうけんを確認かくにんせずに積せきを計算けいさんしてはならない。
  • AB と BA は一般いっぱんに一致いっちしない。合成ごうせいの順序じゅんじょが異ことなるためである。

9Theorem and proof: matrix product行列積ぎょうれつせき represents composition

Let A be m×n and B be n×p. Write the columns of B as b1,…,bp. For x∈Kp,

Bx=x1b1+⋯+xpbp.

Applying A and using linearity gives

A(Bx)=x1Ab1+⋯+xpAbp.

The columns of AB are exactly Ab1,…,Abp, so (AB)x=A(Bx).

10Common misunderstandings

  • matrix product行列積ぎょうれつせき is not the product of corresponding entries.
  • Size compatibility must be checked before calculating.
  • AB=BA is not expected unless there is a special reason.

11どこまで成立せいりつするか

行列積ぎょうれつせきは、線型写像せんけいしゃぞうlinear mapの合成ごうせいと整合せいごうするように定義ていぎされる。成分せいぶんcomponentごとの積せきを使用しようする別べつの演算えんざんも存在そんざいするが、それは標準的ひょうじゅんてきな行列積ぎょうれつせきとは別物べつものである。

12最終形さいしゅうけい

[PARSE ERROR: Undefined("Command(\"boxed\")")](AB)ij=∑kaikbkj
[PARSE ERROR: Undefined("Command(\"boxed\")")]ABx=A(Bx)
[PARSE ERROR: Undefined("Command(\"boxed\")")]行列積は写像の合成を表す

11Scope

Matrix multiplication is defined so that it agrees with composition of linear maps線型写像せんけいしゃぞう. There are other operations that multiply corresponding entries componentwise, but those are different from the standard matrix product.

12Final forms

[PARSE ERROR: Undefined("Command(\"boxed\")")](AB)ij=∑kaikbkj
[PARSE ERROR: Undefined("Command(\"boxed\")")]ABx=A(Bx)
[PARSE ERROR: Undefined("Command(\"boxed\")")]Matrixmultiplicationrepresentscompositionofmaps[PARSE ERROR: Undefined("RBrace")]

13定理ていりと証明しょうめい:行列積ぎょうれつせきは線型写像せんけいしゃぞうの合成ごうせいである

A を m×n 行列ぎょうれつ、B を n×p 行列ぎょうれつとする。このとき、AB は「まず B を作用さようさせ、つぎに A を作用さようさせる」線型写像せんけいしゃぞうを表あらわす。

証明しょうめいする。x∈Fp とする。B の列れつを b1,…,bp と書かくと、

Bx=x1b1+⋯+xpbp

である。A を作用さようさせると、線型性せんけいせいより

A(Bx)=x1Ab1+⋯+xpAbp

である。一方いっぽう、AB の第だい j 列れつは Abj である。したがって (AB)x も同おなじ式しきになる。よって

(AB)x=A(Bx)

である。

この証明しょうめいにより、行列積ぎょうれつせきの順番じゅんばんが合成ごうせいの順番じゅんばんを反映はんえいしていることが分わかる。

14演習えんしゅうリンク

data/exercise/math/linear-algebra/matrix-computation-and-linear-transformations.exercise.n.md

13Theorem and proof: matrix product is composition of linear maps

Let A be an m×n matrix and B an n×p matrix. Then AB represents the linear map that applies B first and then A.

To prove this, take x∈Fp. If the columns of B are b1,…,bp, then

Bx=x1b1+⋯+xpbp.

Applying A and using linearity線型性せんけいせい gives

A(Bx)=x1Ab1+⋯+xpAbp.

On the other hand, the j-th column of AB is Abj, so (AB)x has the same expression. Hence

(AB)x=A(Bx).

This proof explains why the order of matrix multiplication reflects the order of composition.

14Exercise links

data/exercise/math/linear-algebra/matrix-computation-and-linear-transformations.exercise.n.md
raw .n.md をコピー
loc をコピー (filepath:line ~ line)
copy share link
copy encoded share link
path をコピー
copy share link
copy encoded share link
copy share link
copy encoded share link
タブを全て閉じる