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行列ぎょうれつmatrixm×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 行列ぎょうれつmatrix2×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) 成分せいぶんcomponentB(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 KnKm.

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
タブを全て閉じる