markdown
行列の基本演算md b51eeb4
lecture/math/linear-algebra/matrix-operations.lecture.n.md
Download PDF

行列ぎょうれつmatrixの基本演算きほんえんざん

date2026-07-14document_iddoc_c906c7cb97b9478908ef5d463658ca7ddescription行列をサイズをもつ数表として導入し、和・差・スカラー倍・行ベクトルと列ベクトルの区別を整理する講義である。prerequisitesベクトルの成分表示 / 数の四則演算type講義content_typelecturestatusactiverelateddata/lecture/math/linear-algebra/linear-algebra-portal.lecture.n.md / data/lecture/math/linear-algebra/vector-operations.lecture.n.md / data/lecture/math/linear-algebra/meaning-of-matrix-multiplication.lecture.n.md / data/lecture/math/linear-algebra/identity-zero-and-transpose-matrices.lecture.n.md / data/exercise/math/linear-algebra/matrix-computation-and-linear-transformations.exercise.n.md
mathlinear-algebraundergraduatelecture

Basic operations on matrices行列ぎょうれつ

1導入どうにゅう

この講義こうぎで重要じゅうようなのは、行列ぎょうれつmatrixには行数ぎょうすうと列数れつすうがあり、演算えんざんはサイズ条件じょうけんを満みたすときだけ定義ていぎされるということである。

行列ぎょうれつmatrixをいきなり線型写像せんけいしゃぞうlinear mapとして解釈かいしゃくすると、初学者しょがくしゃは計算規則けいさんきそくで混乱こんらんしやすい。まず数かずを長方形ちょうほうけいに並ならべた対象たいしょうとして確認かくにんし、足たし算ざん・スカラー倍ばい・サイズ条件じょうけんを固定こていする。

1Introduction

A matrix行列ぎょうれつ has a number of rows and a number of columns. Matrix operations are defined only when their size conditions are satisfied. This size discipline comes before interpreting matrices as linear maps.

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

行列ぎょうれつMatrix とは、数かずを行ぎょうrowと列れつcolumnに並ならべた対象たいしょうである。m 行ぎょうrow n 列れつcolumnの行列ぎょうれつmatrixを m×n 行列ぎょうれつmatrixという。

A=(a11a12a21a22a31a32)

は 3×2 行列ぎょうれつmatrixである。

行ぎょうベクトルRow vector は 1 行ぎょうrowの行列ぎょうれつmatrixであり、列れつベクトルColumn vector は 1 列れつcolumnの行列ぎょうれつmatrixである。

2Terms and definitions

A matrix is a rectangular array of numbers arranged in rows行ぎょう and columns列れつ. A matrix with m rows and n columns is an m×n matrix.

For example,

A=(a11a12a21a22a31a32)

is a 3×2 matrix. A row vector行ぎょうベクトル is a matrix with one row, and a column vector列れつベクトル is a matrix with one column.

3方針ほうしん

行列ぎょうれつmatrixの演算えんざんでは、まずサイズを確認かくにんする。和わと差さは同おなじサイズでだけ定義ていぎされ、スカラー倍ばいは任意にんいのサイズで定義ていぎされる。

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

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

行列ぎょうれつmatrixの和わは、同おなじ位置いちにある成分せいぶんcomponentどうしを加くわえる操作そうさoperationである。座席表ざせきひょうの同おなじ席せきを対応たいおうさせるように、行番号ぎょうばんごうと列番号れつばんごうが一致いっちする成分せいぶんcomponentだけを組くみ合あわせる。

したがって、サイズが異ことなる行列ぎょうれつmatrixは同おなじ位置いちどうしの対応たいおうが成立せいりつしない。演算えんざんが定義ていぎされない理由りゆうはここにある。

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

A=(aij)、B=(bij) を同おなじ m×n 行列ぎょうれつmatrixとする。このとき

A+B=(aij+bij)

で定義ていぎする。また

A-B=(aij-bij)

である。スカラー c に対たいして

cA=(caij)

と定義ていぎする。行列ぎょうれつmatrixが等ひとしいとは、サイズが同一どういつで、すべての対応たいおうする成分せいぶんcomponentが等ひとしいことである。

3Strategy

For matrix operations, first check the size. Sums and differences are defined only for matrices of the same size, while scalar multiplication is defined for matrices of any size.

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

4Intuitive explanation

Adding matrices means adding entries in the same position. Like matching the same seat in two seating charts, only entries with the same row number and column number are paired.

Therefore matrices of different sizes do not have matching positions everywhere. This is why the operation is not defined.

5Addition and scalar multiplication

Let A=(aij) and B=(bij) be matrices of the same size m×n. Then

A+B=(aij+bij),A-B=(aij-bij).

For a scalar c,

cA=(caij).

Two matrices are equal only when they have the same size and all corresponding entries are equal.

6具体例ぐたいれい

A=(1234),B=(50-12)

なら

A+B=(6226),2A=(2468)

である。一方いっぽう、2×2 行列ぎょうれつmatrixと 2×3 行列ぎょうれつmatrixの和わは定義ていぎされない。

6Worked example

Let

A=(1234),B=(50-12).

Then

A+B=(6226),2A=(2468).

A 2×2 matrix and a 2×3 matrix cannot be added because their positions do not correspond.

7証明しょうめい・確認かくにん:なぜ同おなじサイズが必要ひつようか

(A+B)ij は、A の (i,j) 成分せいぶんcomponentと B の (i,j) 成分せいぶんcomponentを対応たいおうさせて定義ていぎする。どちらかの行列ぎょうれつmatrixにその位置いちが存在そんざいしなければ、規則きそくは値あたいを割わり当あてられない。したがって同おなじサイズという制限せいげんは見みかけの約束やくそくではなく、定義ていぎそのものである。

8よくある誤解ごかい

  • サイズが異ことなる行列ぎょうれつmatrixを成分せいぶんcomponentが似にているという理由りゆうで加算かさんしてはならない。
  • 行ぎょうベクトルrow vectorと列れつベクトルcolumn vectorは成分数せいぶんすうが同一どういつであってもサイズが異ことなる。
  • 正方行列せいほうぎょうれつsquare matrixだけが行列ぎょうれつmatrixではない。長方行列ちょうほうぎょうれつも線型代数せんけいだいすうの主要対象しゅようたいしょうである。

7Proof checkpoint: why same size is required

The entry (A+B)ij is defined by pairing the (i,j) entry of A with the (i,j) entry of B. If one matrix lacks that position, the rule has no value to assign. The restriction is therefore part of the definition, not a cosmetic convention.

8Common misunderstandings

  • Do not add matrices of different sizes because their entries look similar.
  • A row vector行ぎょうベクトル and a column vector列れつベクトル with the same number of components still have different sizes.
  • Square matrices are not the only matrices used in linear algebra; rectangular matrices are central for maps Kn→Km.

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

和わとスカラー倍ばいは成分せいぶんcomponentごとの演算えんざんである。行列ぎょうれつmatrixの積せきは単たんなる成分せいぶんcomponentごとの積せきではないため、別べつに定義ていぎを確認かくにんする必要ひつようがある。

9Scope

Addition and scalar multiplication are entrywise. Matrix multiplication is not entrywise and needs its own definition.

10最終形さいしゅうけい

[PARSE ERROR: Undefined("Command(\"boxed\")")]A+B=(aij+bij)同じサイズのとき
[PARSE ERROR: Undefined("Command(\"boxed\")")]cA=(caij)
[PARSE ERROR: Undefined("Command(\"boxed\")")]行列演算では最初にサイズを確認する

10Final forms

[PARSE ERROR: Undefined("Command(\"boxed\")")]A+B=(aij+bij)whensizesmatch
[PARSE ERROR: Undefined("Command(\"boxed\")")]cA=(caij)
[PARSE ERROR: Undefined("Command(\"boxed\")")]Alwayscheckmatrixsizesfirst[PARSE ERROR: Undefined("RBrace")]
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
タブを全て閉じる