Vectors | Chapter 1, Essence of linear algebra

3Blue1Brown
5 Aug 201609:52

Summary

TLDR该视频深入探讨了线性代数的基本构建块——向量的概念。首先,它从物理学生、计算机科学学生和数学家的角度分别解释了向量的不同定义。接着,视频着重说明了两个基本向量运算:向量加法和向量数乘,并通过几何形式和数值表示两种方式来阐释这些运算。总的来说,线性代数为分析数据和描述空间提供了有用的工具,能够在几何表示和数值表示之间自由转换,体现了其实用价值。该视频为学习线性代数奠定了基础,为后续主题做好了铺垫。

Takeaways

  • 🔑 向量是线性代数的基本构建块,它有物理学生视角、计算机科学学生视角和数学家视角三种不同但相关的观点。
  • ➡️ 物理学生视角认为向量是空间中指向某个方向的箭头,由长度和方向定义。
  • 📋 计算机科学学生视角将向量视为有序数字列表,例如平方英尺和房价组成的二维向量。
  • ⚖️ 数学家则将向量概括为可进行向量加法和数乘运算的任何东西。
  • ⭐ 本视频主要关注几何视角,将向量视为以原点为尾部的箭头。
  • ➕ 向量加法通过将第二个向量的尾部连接到第一个向量的头部,新向量就是从第一个向量尾部指向第二个向量头部。
  • ✖️ 数乘则是拉伸或压缩向量长度,正数拉长,负数反向拉长。
  • 🔄 线性代数主要围绕向量加法和数乘运算展开,这两个运算构成了线性代数的核心。
  • 💡 向量的两种表示形式(几何箭头和数字列表)相互转化有利于数据分析和计算机图形等应用。
  • 🎯 掌握向量的基本概念为理解后续的线性代数概念(如张量、基和线性相关性)奠定基础。

Q & A

  • 向量有哪三种不同但相关的观点?

    -三种观点分别是:物理学生观点(向量是空间中指向某个方向的箭头)、计算机科学生观点(向量是有序数字列表)和数学家观点(向量是可以进行加法和数乘运算的任何东西)。

  • 什么是坐标系统?向量在坐标系统中如何表示?

    -坐标系统由x轴、y轴和原点组成。向量由原点为尾部指向某点的箭头表示,该点的坐标即为向量的分量。在二维空间中,向量由一对坐标(x,y)表示;在三维空间中,由一个三元组(x,y,z)表示。

  • 如何对向量进行加法运算?

    -将第二个向量的尾部移到第一个向量的头部,连接第一个向量尾部和第二个向量头部的向量即为两个向量的和。在数值上,对应分量相加即可。

  • 什么是数量乘法?它对向量有什么影响?

    -数量乘法指的是用一个数去乘以一个向量。正数会使向量放大相应倍数,负数会使向量反向并放大。在数值上,每个分量乘以该数即可。

  • 为什么向量加法和数乘运算在线性代数中如此重要?

    -向量加法和数乘是线性代数中最基本的运算,绝大多数线性代数概念和理论都是建立在这两个操作之上的。它们允许我们在几何空间和代数表示之间自由切换。

  • 什么是标量?它与向量有什么关系?

    -标量通常指普通数字,如2、1/3或-1.8等。在线性代数中,标量主要用于对向量进行缩放(乘以该标量)。

  • 向量的几何表示和代数表示有什么联系?为什么两者都很重要?

    -几何表示使我们能直观地理解向量,而代数表示则为计算机处理提供了数值支持。两种表示形式相互补充,能在视觉和计算之间自由转换,这正是线性代数的强大之处。

  • 在线性代数中,为什么向量基本上都是从原点开始的?

    -在线性代数中,我们通常将向量限制为从原点开始,这样能简化向量的表示和操作,并且不会影响向量概念的一般性。

  • 本视频中提到了哪些将在接下来的视频中讨论的线性代数主题?

    -本视频提到,将在后续视频中讨论向量张成(span)、基(basis)和线性相关性(linear dependence)等概念。

  • 线性代数在现实生活中有哪些应用?

    -线性代数被广泛应用于数据分析(用向量表示数据特征)、物理学(描述空间和运动)、计算机图形学(确定像素位置)等领域。它为这些领域提供了一种直观且易于计算的表示和处理方式。

Outlines

00:00

🧮 向量的基础定义及其不同视角

本段落深入讲解了向量的基本概念,并从物理学生、计算机科学学生和数学家的视角出发,对向量进行了三种不同的定义。物理学生将向量视为具有特定长度和方向的箭头;计算机科学学生认为向量是有序的数字列表;而数学家则从更抽象的角度定义向量,强调向量的加法和数乘操作。此外,作者强调了线性代数中将向量视作坐标系中原点起始的箭头的重要性,并解释了如何将箭头的几何视图转换为数字列表的视图,为理解向量在二维和三维空间中的表达奠定了基础。

05:00

🔢 向量加法与数乘操作的几何解释

第二段讲述了向量加法和数乘操作的概念。通过将两个向量的加法解释为一种连续移动的过程,该段落深入探讨了向量加法的几何意义。同时,介绍了数乘操作,即将向量拉伸或压缩为原来长度的倍数,并解释了这一操作在数值上如何体现,即通过将向量的每个分量乘以一个标量。此外,段落也强调了向量的数值表示和几何表示之间转换的重要性,说明了线性代数在数据分析、物理学和计算机图形学等领域的应用价值,为理解线性代数的实际用途奠定了基础。

Mindmap

Keywords

💡向量

向量是线性代数中的基本单元。有三种不同但相关的向量观点:物理学生视角(将向量看作空间中指向某方向的箭头)、计算机科学生视角(将向量看作有序数列)和数学家视角(抽象地将向量视为可进行加法和数乘运算的对象)。本视频侧重于几何方面,将向量看作原点为尾的箭头。向量可用坐标数对(二维)或坐标数三元组(三维)表示。

💡向量加法

向量加法是将一个向量的尾部移到另一个向量的头部,然后从第一个向量的尾部连线至第二个向量移动后的头部所得新向量。这一定义源于我们将向量视为移动的距离和方向的思路。数值上,向量加法对应将两个向量的分量一一相加。视频用向量加法阐释了这一基本运算对于线性代数研究的重要性。

💡数乘

数乘是将一个向量乘以一个标量(即数值),得到新向量。正数乘积代表放大向量长度,负数乘积代表反向并放大向量长度。数值上,数乘对应将向量的每个分量乘以该标量。视频阐释了数乘作为另一个基本向量运算在线性代数中的重要作用。

💡坐标系

坐标系为向量提供了表示和研究的框架。在二维坐标系中,向量由一对数值(x,y)表示,分别指示沿x轴和y轴的移动距离。三维坐标系中则增加一个z轴,向量由三元组(x,y,z)表示。坐标系为向量运算提供了数值计算方式,也使向量可以几何可视化。视频详细解释了在坐标系中理解向量的重要性。

💡原点

原点是坐标系中各坐标轴的交点,也是所有向量的起点。在线性代数中,向量通常以原点为尾部。视频强调,无论从几何角度还是数值角度,将向量固定于原点是线性代数研究的典型做法。

💡分量

分量指向量在每个坐标轴上的投影长度,用于数值表示向量。在二维中,向量由两个分量(x分量和y分量)表示;在三维中则有三个分量。分量的概念将向量的几何形式与数值表示联系起来,视频中反复强调其重要性。

💡几何

几何思维在理解向量概念时扮演关键角色。视频建议先从几何的角度(将向量视为箭头)理解新概念,再与数值表示联系起来。几何观点有助于形象化地认识向量的性质,并体现线性代数与现实世界的联系。

💡数值

向量不仅有几何解释,也可用有序数值列表表示。通过坐标系将向量在每个维度上的分量数值化,可以借助数值计算窥视向量的性质。视频强调几何观点和数值观点的相互转化对于理解线性代数概念的重要性。

💡翻译

翻译是指在向量的几何表示和数值表示之间转换。视频认为,线性代数理论的力量不在于任何单一表示形式,而在于能够自如地在两种表示间转换。这使得数据分析师能从视觉角度理解数据,而程序员可将几何空间映射为计算机可处理的数值。掌握这种翻译技巧是真正理解线性代数的关键。

💡基础

向量作为线性代数最基本的构建单元,是研究其他高级概念(如张量、基、线性相关等)的起点。视频开宗明义地强调,牢固把握向量这一根本性概念对于后续学习至关重要。向量的定义、表示和基本运算为整个线性代数理论奠定了基础。

Highlights

向量是线性代数的基本构建块。

存在三种不同但相关的向量观点:物理学生观点、计算机科学生观点和数学家观点。

物理学生观点将向量视为指向空间的箭头,由长度和方向定义。

计算机科学生观点将向量视为有序数字列表,例如表示房屋面积和价格的二维向量。

数学家试图概括前两种观点,认为只要有加法和数乘的概念,就可以定义向量。

在线性代数中,建议先将向量想象为以原点为根的箭头,再将其转化为坐标表示。

在二维空间中,向量的坐标是一对数字,表示从原点沿x轴和y轴移动的距离。

在三维空间中,向量由三个数字表示,分别对应x、y和z轴上的移动距离。

向量加法的定义是:将第二个向量的尾部移到第一个向量的头部,得到新向量。

数值上,向量加法对应于将每个分量相加。

向量数乘是将向量放大或缩小,正数放大,负数反向放大。

数值上,向量数乘对应于将每个分量乘以相同的数。

线性代数主题围绕向量加法和数乘这两个基本运算展开。

线性代数的实用性在于能在几何表示和数值表示之间自由转换。

向量提供了一种将数据可视化的方式,有助于发现数据模式。

Transcripts

play00:10

The fundamental, root-of-it-all building block for linear algebra is the vector.

play00:15

So it's worth making sure that we're all on the same page about what exactly a vector is.

play00:20

You see, broadly speaking, there are three distinct but related ideas about vectors,

play00:24

which I'll call the physics student perspective,

play00:26

the computer science student perspective, and the mathematician's perspective.

play00:30

The physics student perspective is that vectors are arrows pointing in space.

play00:34

What defines a given vector is its length and the direction it's pointing,

play00:38

but as long as those two facts are the same, you can move it all around,

play00:41

and it's still the same vector.

play00:44

Vectors that live in the flat plane are two-dimensional,

play00:46

and those sitting in broader space that you and I live in are three-dimensional.

play00:51

The computer science perspective is that vectors are ordered lists of numbers.

play00:55

For example, let's say you were doing some analytics about house prices,

play00:59

and the only features you cared about were square footage and price.

play01:03

You might model each house with a pair of numbers,

play01:05

the first indicating square footage and the second indicating price.

play01:09

Notice the order matters here.

play01:12

In the lingo, you'd be modeling houses as two-dimensional vectors,

play01:15

where in this context, vector is pretty much just a fancy word for list,

play01:19

and what makes it two-dimensional is the fact that the length of that list is two.

play01:25

The mathematician, on the other hand, seeks to generalize both these views,

play01:29

basically saying that a vector can be anything where there's a sensible notion of adding

play01:33

two vectors and multiplying a vector by a number,

play01:36

operations that I'll talk about later on in this video.

play01:39

The details of this view are rather abstract, and I actually think it's healthy to ignore

play01:43

it until the last video of this series, favoring a more concrete setting in the interim.

play01:48

But the reason I bring it up here is that it hints at the

play01:51

fact that the ideas of vector addition and multiplication by

play01:54

numbers will play an important role throughout linear algebra.

play01:58

But before I talk about those operations, let's just settle in

play02:00

on a specific thought to have in mind when I say the word vector.

play02:04

Given the geometric focus that I'm shooting for here,

play02:07

whenever I introduce a new topic involving vectors,

play02:10

I want you to first think about an arrow, and specifically,

play02:13

think about that arrow inside a coordinate system, like the xy-plane,

play02:17

with its tail sitting at the origin.

play02:19

This is a little bit different from the physics student perspective,

play02:22

where vectors can freely sit anywhere they want in space.

play02:25

In linear algebra, it's almost always the case

play02:27

that your vector will be rooted at the origin.

play02:30

Then, once you understand a new concept in the context of arrows in space,

play02:34

we'll translate it over to the list of numbers point of view,

play02:37

which we can do by considering the coordinates of the vector.

play02:41

Now, while I'm sure that many of you are already familiar with this coordinate system,

play02:45

it's worth walking through explicitly, since this is where all of the important

play02:48

back and forth happens between the two perspectives of linear algebra.

play02:52

Focusing our attention on two dimensions for the moment,

play02:55

you have a horizontal line, called the x-axis, and a vertical line, called the y-axis.

play03:00

The place where they intersect is called the origin,

play03:02

which you should think of as the center of space and the root of all vectors.

play03:06

After choosing an arbitrary length to represent one,

play03:08

you make tick marks on each axis to represent this distance.

play03:12

When I want to convey the idea of 2D space as a whole,

play03:15

which you'll see comes up a bit in the way, but right now they'll get a

play03:20

little bit in the way.

play03:22

The coordinates of a vector is a pair of numbers that basically gives

play03:25

instructions for how to get from the tail of that vector at the origin to its tip.

play03:30

The first number tells you how far to walk along the x-axis,

play03:34

positive numbers indicating rightward motion, negative numbers indicating leftward

play03:38

motion, and the second number tells you how far to walk parallel to the y-axis

play03:42

after that, positive numbers indicating upward motion,

play03:45

and negative numbers indicating downward motion.

play03:48

To distinguish vectors from points, the convention is to write

play03:51

this pair of numbers vertically with square brackets around them.

play03:56

Every pair of numbers gives you one and only one vector,

play03:59

and every vector is associated with one and only one pair of numbers.

play04:04

What about in three dimensions?

play04:06

Well, you add a third axis, called the z-axis,

play04:08

which is perpendicular to both the x and y-axes, and in this case,

play04:12

each vector is associated with ordered triplet of numbers.

play04:16

The first tells you how far to move along the x-axis,

play04:19

the second tells you how far to move parallel to the y-axis,

play04:23

and the third one tells you how far to then move parallel to this new z-axis.

play04:28

Every triplet of numbers gives you one unique vector in space,

play04:31

and every vector in space gives you exactly one triplet of numbers.

play04:36

All right, so back to vector addition and multiplication by numbers.

play04:40

After all, every topic in linear algebra is going to center around these two operations.

play04:45

Luckily, each one's pretty straightforward to define.

play04:48

Let's say we have two vectors, one pointing up and a little to the right,

play04:51

and the other one pointing right and down a bit.

play04:53

To add these two vectors, move the second one so

play04:56

that its tail sits at the tip of the first one.

play05:00

Then, if you draw a new vector from the tail of the first one to

play05:04

where the tip of the second one sits, that new vector is their sum.

play05:12

This definition of addition, by the way, is pretty much the only time

play05:15

in linear algebra where we let vectors stray away from the origin.

play05:19

Now, why is this a reasonable thing to do?

play05:21

Why this definition of addition and not some other one?

play05:25

Well, the way I like to think about it is that each vector represents a certain movement,

play05:29

a step with a certain distance and direction in space.

play05:33

If you take a step along the first vector, then take a step in the direction

play05:37

and distance described by the second vector, the overall effect is just

play05:41

the same as if you moved along the sum of those two vectors to start with.

play05:45

You could think about this as an extension of

play05:47

how we think about adding numbers on a number line.

play05:50

One way that we teach kids to think about this, say with 2 plus 5,

play05:53

is to think of moving two steps to the right followed by another five steps to the right.

play05:57

The overall effect is the same as if you just took seven steps to the right.

play06:02

In fact, let's see how vector addition looks numerically.

play06:06

The first vector here has coordinates 1, 2, and the second one has coordinates 3,

play06:11

negative 1.

play06:14

When you take the vector sum using this tip-to-tail method,

play06:17

you can think of a four-step path from the origin to the tip of the second vector.

play06:21

Walk 1 to the right, then 2 up, then 3 to the right, then 1 down.

play06:26

Reorganizing these steps so that you first do all of the rightward motion,

play06:31

then do all the vertical motion, you can read it as saying first

play06:35

move 1 plus 3 to the right, then move 2 minus 1 up.

play06:40

So the new vector has coordinates 1 plus 3 and 2 plus negative 1.

play06:45

In general, vector addition in this list of numbers conception

play06:49

looks like matching up their terms and adding each one together.

play06:54

The other fundamental vector operation is multiplication by a number.

play06:58

Now this is best understood just by looking at a few examples.

play07:01

If you take the number 2 and multiply it by a given vector,

play07:04

it means you stretch out that vector so that it's two times as long as when you started.

play07:10

If you multiply that vector by, say, one-third,

play07:13

it means you squish it down so that it's one-third the original length.

play07:17

When you multiply it by a negative number, like negative 1.8,

play07:21

then the vector first gets flipped around, then stretched out by that factor of 1.8.

play07:27

This process of stretching or squishing or sometimes reversing the direction of

play07:31

a vector is called scaling, and whenever you catch a number like two or one-third

play07:36

or negative 1.8 acting like this, scaling some vector, you call it a scalar.

play07:41

In fact, throughout linear algebra, one of the main things that numbers do is scale

play07:46

vectors, so it's common to use the word scalar pretty much interchangeably with the word

play07:50

number.

play07:52

Numerically, stretching out a vector by a factor of, say, 2,

play07:55

corresponds with multiplying each of its components by that factor, 2.

play08:00

So in the conception of vectors as lists of numbers,

play08:03

multiplying a given vector by a scalar means multiplying each one of those

play08:07

components by that scalar.

play08:10

You'll see in the following videos what I mean when I say linear algebra topics tend to

play08:14

revolve around these two fundamental operations,

play08:17

vector addition and scalar multiplication.

play08:19

And I'll talk more in the last video about how and why the

play08:22

mathematician thinks only about these operations,

play08:25

independent and abstracted away from however you choose to represent vectors.

play08:29

In truth, it doesn't matter whether you think about vectors as fundamentally being arrows

play08:33

in space, like I'm suggesting you do, that happen to have a nice numerical

play08:37

representation, or fundamentally as lists of numbers that happen to have a nice geometric

play08:41

interpretation.

play08:42

The usefulness of linear algebra has less to do with either one of these

play08:46

views than it does with the ability to translate back and forth between them.

play08:50

It gives the data analyst a nice way to conceptualize many lists

play08:53

of numbers in a visual way, which can seriously clarify patterns

play08:57

in data and give a global view of what certain operations do.

play09:00

And on the flip side, it gives people like physicists and computer

play09:06

graphics programmers a language to describe space and the computer.

play09:12

When I do math-y animations, for example, I start by thinking about what's

play09:15

actually going on in space, and then get the computer to represent things numerically,

play09:20

thereby figuring out where to place the pixels on the screen.

play09:23

And doing that usually relies on a lot of linear algebra understanding.

play09:27

So there are your vector basics, and in the next video I'll start getting into some

play09:31

pretty neat concepts surrounding vectors, like span, bases, and linear dependence.

play09:35

See you then!