字幕表 動画を再生する
"The introduction of numbers as coordinates is an act of violence."
座標として数を導入することは 暴力行為である ――ヘルマン・ワイル
—Hermann Weyl
線型代数を形作る土台となるものがベクトルです まずは
The fundamental, root-of-it-all building block for linear algebra is the vector, so it's
ベクトルとはいったい何なのか,はっきりさせましょう
worth
おおまかにいって,3つの異なる しかし関係した視点があります
making sure that we're all on the same page about what exactly a vector is.
物理学の視点,コンピューターサイエンスの視点, そして数学の視点です
You see, broadly
物理学の視点では,ベクトルを空間のなかの矢印と見ます
speaking there are three distinct but related ideas about vectors, which I'll call the physics
与えられたベクトルは長さと方向で定義されます しかしこの2つが同じであれば
student perspective, the computer science student perspective, and the mathematician's
自由に動かしても同じベクトルと見ます 平らな面のなかにあるベクトルを2次元ベクトル
perspective.
私たちがいるようなより広い空間にあるベクトルを 3次元ベクトルといいます
The physics student perspective is that vectors are arrows pointing in space.
コンピューターサイエンスの視点では ベクトルを数を並べたリストと見ます.たとえば
What defines a given
住宅価格について分析しているとしましょう
vector is its length, and the direction it's pointing in, but as long as those two facts
住宅の面積と価格のみに注目します そしてそれぞれの住宅を2つの数字でモデル化します
are the
まず面積,次に価格です 順番があることに注意しましょう
same, you can move it all around and it's still the same vector.
つまり,住宅を2次元ベクトルでモデル化したのです ここでは
Vectors that live in the flat plane
「ベクトル」は「リスト」を言い換えたようなものです そしてリストの長さが2なので
are two-dimensional, and those sitting in broader space that you and I live in are three-dimensional.
ベクトルは2次元ベクトルになります
The computer science perspective is that vectors are ordered lists of numbers.
一方,数学の視点では,両方の視点を一般化します
For example, let's
ベクトル同士のたし算,ベクトルの定数倍が
say that you were doing some analytics about house prices, and the only features you cared
成り立つものすべてをベクトルと見るのです (後ほど説明します)
about
この視点はとても抽象的で このビデオシリーズの最後までは扱いません
were square footage and price.
しばらくは,より具体的な状況で説明します
You might model each house with a pair of numbers: the first
しかしここでこれを取り上げたのは ベクトルのたし算や定数倍の考え方は
indicating square footage, and the second indicating price.
線型代数全体を通して 大切な役割を担っているからです
Notice that the order matters here.
しかしこの2つの操作について話す前に まずベクトルとは何なのか理解しておきましょう
In the lingo, you'd be modelling houses as two-dimensional vectors, where in this context,
ここで重点を置いている 幾何学的な視点から考えるために
"vector" is pretty much just a fancy word for "list", and what makes it two-dimensional
ベクトルについて新しい話題が出てきたときは まずひとつの矢印を思い浮かべてください
is the fact
x-y平面のような座標系の中にある矢印です 始点は原点にあるとします
that the length of that list is 2.
これは,矢印が空間のどこにあってもよいという 物理学の視点とは少しちがいます
The mathematician, on the other hand, seeks to generalise both of these views, basically
線型代数では,ベクトルはほとんどいつも 原点に始点があります
saying that
そして,空間の中の矢印という視点で 新しい話題を理解したら
a vector can be anything where there's a sensible notion of adding two vectors, and multiplying
それを,ベクトルの座標を用いて 数のリストという視点でとらえなおすこともできるのです
a
多くの人はこのような座標系をよく知っていると思います しかし,復習しておきましょう
vector by a number, operations that I'll talk about later on in this video.
この座標系は,線型代数の2つの視点を 行き来する大切な場所だからです
The details of this view
しばらくは2次元で考えることにします
are rather abstract, and I actually think it's healthy to ignore it until the last video
x軸といわれる水平な線と y軸といわれる鉛直な線があります.そして
of this
それらが交わる点,原点があります 原点は,空間の中心,すべてのベクトルの始点とします
series, favoring a more concrete setting in the interim,
1を表す長さを決め 距離を表すためにそれぞれの軸上に
but the reason that I bring it up here is that it hints at the fact that ideas of vector
目盛りをつけます 2次元空間全体のイメージを表したいときは
addition
(ビデオでよく出てきますが) 目盛りを延長したグリッドラインを示します
and multiplication by numbers will play an important role throughout linear algebra.
でも今は少しじゃまですね ベクトルの座標は1組の数であり
But before I talk about those operations, let's just settle in on a specific thought
ベクトルの始点(原点)から終点まで どう進むかを表します
to have in mind
1つ目の数は,x軸方向にどれだけ進むか (正の数は右への動き
when I say the word "vector".
負の数は左への動き)を表します 2つ目の数は,y軸方向にどれだけ進むか
Given the geometric focus that I'm shooting for here, whenever I
(正の数は上への動き,負の数は下への動き) を表します
introduce a new topic involving vectors, I want you to first think about an arrow—and
ベクトルを点と区別するために ベクトルを表す数の組合せのときは
specifically,
数を縦にならべて,ブラケットで囲みます
think about that arrow inside a coordinate system, like the x-y plane, with its tail
2つの数の組合せはそれぞれ ただ1つのベクトルに対応します. そして,ベクトルはそれぞれ
sitting at the origin.
2つの数の組合せただ1つに対応します では3次元ではどうでしょうか? x軸とy軸に垂直な
This is a little bit different from the physics student perspective, where vectors can freely
3番目の軸,z軸を加えましょう このとき,ベクトルはそれぞれ
sit
3つの数の組合せただ1つに対応します 1つ目の数は,x軸方向へどれだけ動くか
anywhere they want in space.
2つ目の数は,y軸方向へどれだけ動くか 3つ目の数は,z軸方向へどれだけ動くか
In linear algebra, it's almost always the case that your vector will be
を表します.3つの数の組合せはそれぞれ 空間のベクトルただ1つに対応し
rooted at the origin.
空間のベクトルはそれぞれ 3つの数の組合せただ1つに対応します
Then, once you understand a new concept in the context of arrows in space,
ではベクトルのたし算と定数倍にもどりましょう 結局,線形代数のすべての話題は
we'll translate it over to the list-of-numbers point-of-view, which we can do by considering
この2つの操作を中心として展開されます 幸い,これらの定義はとてもシンプルです
the coordinates of the vector.
2つのベクトルがあり 1つは右上,もう1つは
Now while I'm sure that many of you are familiar with this coordinate system, it's worth walking
右下を指しているとしましょう この2つのベクトルを足すためには 2つ目のベクトルを,その始点が
through explicitly, since this is where all of the important back-and-forth happens between
1つ目のベクトルの終点に重なるように動かします そして1つ目のベクトルの始点から
the two
2つ目のベクトルの終点に伸びるベクトル これが2つのベクトルの和になります
perspectives of linear algebra.
(線型代数では,このたし算の定義のときのみ
Focusing our attention on two dimensions for the moment, you have a
ベクトルが原点から離れます)
horizontal line, called the x-axis, and a vertical line, called the y-axis.
なぜこのたし算の定義が自然なのでしょうか? なぜほかの定義ではないのでしょうか?
The place where they
私の好きな考え方は,それぞれのベクトルが ある動きを表しているというものです
intersect is called the origin, which you should think of as the center of space and
空間の中で,ある距離と方向をもつ動きです もし,あなたが1つ目のベクトルに沿って進み
the root of all vectors.
次に2つ目のベクトルに沿って進んだら 全体としては
After choosing an arbitrary length to represent 1, you make tick-marks on each axis to
これら2つのベクトルの和のベクトルに沿って 進んだことと同じになります
represent this distance.
これを数直線上における数のたし算の 延長として考えることもできます
When I want to convey the idea of 2-D space as a whole, which you'll see
数のたし算を教える方法として たとえば2+5は,右へ2進み
comes up a lot in these videos, I'll extend these tick-marks to make grid-lines, but right
さらに右へ5進むと考えられます その結果は右へ7進むことと同じになります
now
ではベクトルのたし算は数値的に どう見えるか確かめてみましょう
they'll actually get a little bit in the way.
1つ目のベクトルの座標が(1,2) 2つ目のベクトルの座標が(3,-1)だとします
The coordinates of a vector is a pair of numbers that
始点と終点を合わせる方法でベクトルのたし算を考えると 4ステップで原点から2つ目のベクトルの終点に着きます
basically give instructions for how to get from the tail of that vector—at the origin—to
右へ1,上へ2,右へ3,そして下へ1進むのです
its tip.
これは,はじめに水平方向へ一気に進み 次に鉛直方向へ一気に進むと考えることもできます
The first number tells you how far to walk along the x-axis—positive numbers indicating
つまり,右へ1+3進み,上へ2+(-1)進むと考えるのです
rightward
新しくできたベクトルの座標は(1+3,2+(-1))となります 一般に,数のリストとしてのベクトルのたし算は
motion, negative numbers indicating leftward motion—and the second number tell you how
成分同士が足されるので その言葉に合っているように見えます
far to walk
もうひとつの基本的なベクトル操作は ベクトルの定数倍です
parallel to the y-axis after that—positive numbers indicating upward motion, and negative
いくつか例を見て理解していきましょう もし数字の2を,与えられたベクトルにかけたら
numbers
ベクトルは元の2倍の長さに引き伸ばされます
indicating downward motion.
もし数字の1/3をかけたら 元の1/3の長さに縮められます
To distinguish vectors from points, the convention is to write this pair
-1.8のような負の数をかけたら ベクトルは,まずひっくり返り
of numbers vertically with square brackets around them.
そして1.8倍に引き伸ばされます
Every pair of numbers gives you one and only one vector, and every vector is associated
このベクトルの伸縮や反転の過程を 「スケーリング(scaling)」といいます
with one and
そして,ベクトルをスケーリングする 2や1/3,-1.8のような数を
only one pair of numbers.
「スカラー(scalar)」といいます 実際,線型代数で,主に数のはたらきは
What about in three dimensions?
ベクトルをスケーリングすることです そのため「数」と「スカラー」という言葉は
Well, you add a third axis, called the z-axis,
よく互換的に使われます 数値的にベクトルを2倍に引き伸ばすことは
which is perpendicular to both the x- and y-axes, and in this case each vector is associated
ベクトルの各成分に2をかけることに対応します つまり,数のリストとしてベクトルを考えると
with an ordered triplet of numbers: the first tells you how far to move along the x-axis,
ベクトルにスカラーをかけることは ベクトルの各成分にスカラーをかけることを
the second
意味するのです
tells you how far to move parallel to the y-axis, and the third one tells you how far
続くビデオで,線型代数の話題がこの2つの操作
to then move
「ベクトルのたし算と定数倍」のまわりで展開される ということがわかるでしょう
parallel to this new z-axis.
そして最後のビデオでは,数学者が なぜこの2つの操作だけ考えるのかお話しします
Every triplet of numbers gives you one unique vector in space, and
ベクトルの表し方からは独立していて 抽象化された操作です.実際
every vector in space gives you exactly one triplet of numbers.
ベクトルを(私がおすすめしているように) 数値的にも表せる「空間の中の矢印」と考えるのか
So back to vector addition, and multiplication by numbers.
幾何学的にも理解できる「数のリスト」と考えるのかは
After all, every topic in linear algebra
問題ではありません 線型代数の有用性は
is going to center around these two operations.
どちらかの視点にあるというより 両方の視点をお互いに行き来できることにあるのです
Luckily, each one is pretty straightforward to define.
これにより,データアナリストは多くの数のリストを 視覚的に概念化することができます
Let's say we have two vectors, one pointing up, and a little to the right, and the other
そしてデータのパターンを抽出し ある操作が意味することを広い視野でみることができます
one
逆に,物理学者やCGプログラマーは
pointing right, and down a bit.
計算された数字を使って,空間を描き 空間を操作するための言語を得られます
To add these two vectors, move the second one so that its tail sits
たとえば,私が数学のアニメーションをつくるとき まず空間で何が起こっているか考えることから始めます
at the tip of the first one; then if you draw a new vector from the tail of the first one
そして,それらをコンピューターに数値的に表させることで
to where
画面のどこにピクセルをおけばよいか分かります これらの多くは線型代数の理解によるものです
the tip of the second one now sits, that new vector is their sum.
これでベクトルの基本はおしまいです 次のビデオでは,ベクトルに関するとてもおもしろい概念
This definition of addition, by the way, is pretty much the only time in linear algebra
スパン,基底,線型独立などを説明します ではまた!
where we let
次のビデオ: 線型結合,スパン,基底
vectors stray away from the origin.
Now why is this a reasonable thing to do?—Why this definition of addition and not some other
one?
Well the way I like to think about it is that each vector represents a certain movement—a
step with
a certain distance and direction in space.
If you take a step along the first vector,
then take a step in the direction and distance described by the second vector, the overall
effect is
just the same as if you moved along the sum of those two vectors to start with.
You could think about this as an extension of how we think about adding numbers on a
number line.
One way that we teach kids to think about this, say with 2+5, is to think of moving
2 steps to the
right, followed by another 5 steps to the right.
The overall effect is the same as if you just took
7 steps to the right.
In fact, let's see how vector addition looks numerically.
The first vector
here has coordinates (1,2), and the second one has coordinates (3,-1).
When you take the vector sum
using this tip-to-tail method, you can think of a four-step path from the origin to the
tip of the
second vector: "walk 1 to the right, then 2 up, then 3 to the right, then 1 down."
Re-organising
these steps so that you first do all of the rightward motion, then do all of the vertical
motion,
you can read it as saying, "first move 1+3 to the right, then move 2+(-1) up," so the
new vector has
coordinates 1+3 and 2+(-1).
In general, vector addition in this list-of-numbers conception looks
like matching up their terms, and adding each one together.
The other fundamental vector operation is multiplication by a number.
Now this is best understood
just by looking at a few examples.
If you take the number 2, and multiply it by a given vector, it
means you stretch out that vector so that it's 2 times as long as when you started.
If you multiply
that vector by, say, 1/3, it means you squish it down so that it's 1/3 of the original length.
When you multiply it by a negative number, like -1.8, then the vector first gets flipped
around,
then stretched out by that factor of 1.8.
This process of stretching or squishing or sometimes reversing the direction of a vector
is called "scaling",
and whenever you catch a number like 2 or 1/3 or -1.8 acting like this—scaling some
vector—you call it a "scalar".
In fact, throughout linear algebra, one of the main things that
numbers do is scale vectors, so it's common to use the word "scalar" pretty much interchangeably
with the word "number".
Numerically, stretching out a vector by a factor of, say, 2, corresponds to
multiplying each of its components by that factor, 2, so in the conception of vectors
as
lists of numbers, multiplying a given vector by a scalar means multiplying each one of
those components by that scalar.
You'll see in the following videos what I mean when I say that linear algebra topics
tend to revolve
around these two fundamental operations: vector addition, and scalar multiplication; and I'll
talk
more in the last video about how and why the mathematician thinks only about these operations,
independent and abstracted away from however you choose to represent vectors.
In truth, it doesn't
matter whether you think about vectors as fundamentally being arrows in space—like
I'm suggesting
you do—that happen to have a nice numerical representation, or fundamentally as lists
of numbers
that happen to have a nice geometric interpretation.
The usefulness of linear algebra has less to do with
either one of these views than it does with the ability to translate back and forth between
them.
It gives the data analyst a nice way to conceptualise many lists of numbers in a visual way,
which can seriously clarify patterns in data, and give a global view of what certain operations
do,
and on the flip side, it gives people like physicists and computer graphics programmers
a language
to describe space and the manipulation of space using numbers that can be crunched and
run through a computer.
When I do math-y animations, for example, I start by thinking about what's actually
going on in
space, and then get the computer to represent things numerically, thereby figuring out where
to
place the pixels on the screen, and doing that usually relies on a lot of linear algebra
understanding.
So there are your vector basics, and in the next video I'll start getting into some pretty
neat
concepts surrounding vectors, like span, bases, and linear dependence.
See you then!
Captioned by Navjivan Pal