Linear combinations, span, and basis vectors | Chapter 2, Essence of linear algebra

3Blue1Brown
6 Aug 201609:59

Summary

TLDR这段视频脚本讲解了线性代数中向量坐标的概念。它阐释了如何将向量表示为基向量的线性组合,并引入了基向量和线性相关性的概念。脚本还探讨了向量空间中的张量,即可通过线性组合获得的所有可能向量的集合。最后,它提出了一个思考题,询问基的定义为什么是线性无关且张量整个空间的向量集合。整体而言,这段脚本以引人入胜的方式介绍了线性代数的基础概念。

Takeaways

  • 👉向量的坐标可以看作是基向量的伸缩倍数之和。
  • 🔑坐标系统的基向量(如 i 帽和 j 帽)是一种特殊的向量基。
  • ➕通过线性组合运算(加权和),可以产生新的向量。
  • 🌐几乎所有二维向量都可以通过两个非重合向量的线性组合表示。
  • ➿线性组合向量所能覆盖的集合称为这些向量的张量。
  • ✌️两个线性无关的向量张成一个平面,三个线性无关的向量张成整个三维空间。
  • 🔄线性相关意味着有一个向量可以用其他向量的线性组合表示。
  • 🔍线性无关意味着每个向量都为张量贡献了一个新的维度。
  • 📐一个向量空间的基础由满足张成该空间且线性无关的最小向量集合定义。
  • ✏️通过改变使用的基向量,我们可以得到不同的坐标表示方式。

Q & A

  • 什么是向量的坐标?

    -向量的坐标是一组数,用于在给定的坐标系中描述向量的方向和大小。例如,在二维坐标系中,向量的坐标可以是一对数(如3, -2),分别代表向量在x轴和y轴方向的分量。

  • 什么是基向量?

    -基向量是线性代数中用于定义向量空间坐标系的一组特殊向量。在二维空间中,常见的基向量包括i-hat(指向右方,长度为1的单位向量)和j-hat(指向上方,长度为1的单位向量)。这些基向量定义了坐标系的方向和单位长度。

  • 如何通过基向量和坐标来描述向量?

    -一个向量可以通过将其坐标视为沿基向量方向的伸缩(即标量乘法)后再进行向量加法得到的结果来描述。例如,一个具有坐标(3, -2)的向量可以通过将i-hat向量伸长3倍,将j-hat向量反向伸长2倍后,将两个结果向量相加来得到。

  • 为什么基向量的选择对描述向量很重要?

    -基向量的选择决定了坐标系的方向和度量,从而影响向量的数值表示。不同的基向量选择会导致同一向量在不同坐标系中有不同的坐标表示。

  • 线性组合是什么意思?

    -线性组合是指用标量乘法和向量加法从一组向量中生成新向量的过程。给定一组向量和对应的标量,通过对每个向量进行标量乘法后再将结果向量相加,可以得到一个新的向量,这个新向量被称为原向量的线性组合。

  • 什么是向量的跨度(Span)?

    -向量的跨度是指通过固定向量集的线性组合能够到达的所有向量的集合。在二维空间中,大多数两个非共线向量的跨度是整个二维空间,但如果这两个向量共线,则它们的跨度仅限于通过原点的一条直线。

  • 线性独立和线性依赖的向量有什么区别?

    -线性独立的向量组意味着没有任何一个向量可以通过其它向量的线性组合来表示。相反,如果一组向量中的至少一个向量可以表示为其它向量的线性组合,那么这组向量被认为是线性依赖的。

  • 空间的基是什么?

    -空间的基是一组线性独立的向量,通过它们的线性组合可以表示空间中的任何向量。这组向量的数目(基的大小)也定义了该空间的维度。

  • 如何通过改变标量来绘制直线或平面?

    -通过固定一个标量并让另一个标量自由变化,可以在二维空间中绘制一条直线;在三维空间中,通过改变两个标量可以在平面上移动,从而绘制出一个平面。这反映了线性组合的几何意义。

  • 什么是线性变换?

    -线性变换是指保持向量加法和标量乘法操作的函数,它可以将一个向量空间中的向量映射到另一个向量空间中的向量。这是线性代数中的一个核心概念,通常通过矩阵运算来实现。

Outlines

00:00

😃 向量坐标及其线性组合

该段落解释了向量坐标背后的重要概念。向量坐标由两个标量分量组成,分别表示基向量i帽和j帽的缩放倍数。通过缩放基向量并相加,即可得到相应的向量。这种加权相加操作被称为线性组合。不同的基向量组合可以定义不同的坐标系统,但任何二维向量都可以通过使用不同的标量表示为两个基向量的线性组合。用固定的一个标量和变化的另一个标量的线性组合可绘制出一条直线轨迹。

05:00

😎 向量张量空间与线性无关

该段落介绍了向量张量空间和线性相关/无关的概念。一对向量的张量空间是它们所有可能的线性组合集合。对于二维向量,除非两个向量共线,否则它们的张量空间就是整个二维平面。对于三维向量,随机选取的三个向量通常是线性无关的,它们的张量空间就是整个三维空间。如果一个向量可以表示为其他向量的线性组合,那么它就是线性相关的,可以从集合中移除而不改变张量空间。一个空间的基是生成该空间张量空间的线性无关向量集合。

Mindmap

Keywords

💡标量

标量是一个数量值,它表示一个向量在某个方向上的伸缩程度。在视频中,坐标系中的每个坐标都被视为一个标量,表示该向量在对应的基向量方向上的伸缩倍数。例如3代表在x方向上将单位向量伸长3倍,而-2代表在y方向上将单位向量反向伸长2倍。

💡基向量

基向量是坐标系统中的两个特殊向量,一个指向x轴正方向,称为i帽,另一个指向y轴正方向,称为j帽。任何二维向量都可以通过对这两个基向量进行缩放和相加来表示。视频将基向量称为坐标系的基础,因为坐标实际上表示了对基向量的缩放。

💡线性组合

线性组合是指将一组向量分别乘以不同的标量后相加所得到的结果。视频指出,任何使用坐标表示的向量都可视为基向量的线性组合。线性组合是线性代数中最基本的运算之一。

💡张量空间(span)

张量空间是指通过一组向量的所有可能的线性组合可以覆盖的区域。如果是二维平面上的两个不共线向量,它们的张量空间就是整个平面;如果是三维空间中的三个不共面向量,它们的张量空间就是整个三维空间。张量空间概念体现了向量和坐标在表示几何形状方面的能力。

💡线性相关

当一组向量中有一个向量可以被其他向量的线性组合表示时,我们称这组向量是线性相关的。这种情况下,该多余的向量并不会增加张量空间的维度。线性相关意味着向量之间存在一定的冗余关系。

💡线性无关

当一组向量中没有任何一个向量可以被其他向量的线性组合表示时,我们称这组向量是线性无关的。这意味着每个向量都为张量空间增加了一个新的维度。线性无关的向量集对于构建基础是很重要的。

💡

基是一组线性无关的向量,它们的张量空间恰好等于整个向量空间。一个坐标系统中的基向量集就是该空间的一个基。任何向量在给定基下都有唯一的坐标表示。基的概念使得我们可以在向量空间和数字坐标之间自由转换。

💡坐标系统

坐标系统为向量空间中的点和向量提供了一种表示方式。通过选择不同的基向量集,我们可以得到不同的坐标系统。视频指出,即使改变了基向量集,坐标系统在表示所有可能向量的能力上是等价的,只是数字坐标的对应关系不同。

💡标量乘法

标量乘法是指将一个标量数与一个向量相乘,得到该向量在该标量的方向上伸缩了指定倍数后的结果向量。标量乘法和向量相加是线性代数中最基本的两种运算。在坐标系中,坐标数值实际上给出了如何对基向量进行标量乘法的指示。

💡矩阵

矩阵是一种二维数据结构,在线性代数中被广泛应用于对向量空间进行线性变换的表示和计算。后面的视频将介绍如何使用矩阵来描述旋转、缩放等几何变换在坐标表示下的运算规则。矩阵使得很多线性代数概念可以被代数化并计算机高效实现。

Highlights

向量坐标可以被视为对基向量的伸缩

i帽和j帽是笛卡尔坐标系的基向量

选择不同的基向量会得到一个新的合理的坐标系

任何一对二维向量的线性组合都能到达所有二维向量

两个向量线性组合的集合称为它们的张量

大多数二维向量对的张量是整个二维空间

如果两个向量共线,它们的张量就是一条线

用点而不是箭头来表示向量集合

如果加入第三个三维向量,张量可能会扩展到整个三维空间

如果第三个向量在前两个向量张量内,张量不会改变

线性相关的向量集可以删去一个向量而不改变张量

线性无关的向量集中每个向量都为张量增加一个维度

一个空间的基是能张成该空间的线性无关向量集

下一课将讲矩阵和空间变换

Transcripts

play00:11

In the last video, along with the ideas of vector addition and scalar multiplication,

play00:16

I described vector coordinates, where there's this back and forth between,

play00:19

for example, pairs of numbers and two-dimensional vectors.

play00:23

Now, I imagine the vector coordinates were already familiar to a lot of you,

play00:27

but there's another kind of interesting way to think about these coordinates,

play00:30

which is pretty central to linear algebra.

play00:32

When you have a pair of numbers that's meant to describe a vector,

play00:36

like 3, negative 2, I want you to think about each coordinate as a scalar,

play00:40

meaning, think about how each one stretches or squishes vectors.

play00:45

In the xy coordinate system, there are two very special vectors,

play00:48

the one pointing to the right with length 1, commonly called i-hat,

play00:52

or the unit vector in the x direction, and the one pointing straight up with length 1,

play00:57

commonly called j-hat, or the unit vector in the y direction.

play01:02

Now, think of the x coordinate of our vector as a scalar that scales i-hat,

play01:06

stretching it by a factor of 3, and the y coordinate as a scalar that scales j-hat,

play01:11

flipping it and stretching it by a factor of 2.

play01:14

In this sense, the vector that these coordinates

play01:17

describe is the sum of two scaled vectors.

play01:20

That's a surprisingly important concept, this idea of adding together two scaled vectors.

play01:27

Those two vectors, i-hat and j-hat, have a special name, by the way.

play01:30

Together, they're called the basis of a coordinate system.

play01:34

What this means, basically, is that when you think about coordinates as scalars,

play01:38

the basis vectors are what those scalars actually, you know, scale.

play01:42

There's also a more technical definition, but I'll get to that later.

play01:47

By framing our coordinate system in terms of these two special basis vectors,

play01:51

it raises a pretty interesting and subtle point.

play01:54

We could have chosen different basis vectors and

play01:57

gotten a completely reasonable new coordinate system.

play02:01

For example, take some vector pointing up and to the right,

play02:03

along with some other vector pointing down and to the right in some way.

play02:07

Take a moment to think about all the different vectors that you can get by choosing two

play02:12

scalars, using each one to scale one of the vectors, then adding together what you get.

play02:17

Which two-dimensional vectors can you reach by altering the choices of scalars?

play02:24

The answer is that you can reach every possible two-dimensional vector,

play02:28

and I think it's a good puzzle to contemplate why.

play02:32

A new pair of basis vectors like this still gives us a valid way to go back and forth

play02:36

between pairs of numbers and two-dimensional vectors,

play02:39

but the association is definitely different from the one that you get using the more

play02:44

standard basis of i-hat and j-hat.

play02:46

This is something I'll go into much more detail on later,

play02:49

describing the exact relationship between different coordinate systems,

play02:52

but for right now, I just want you to appreciate the fact that any time we

play02:56

describe vectors numerically, it depends on an implicit choice of what basis

play03:00

vectors we're using.

play03:02

So any time that you're scaling two vectors and adding them like this,

play03:05

it's called a linear combination of those two vectors.

play03:11

Where does this word linear come from?

play03:12

Why does this have anything to do with lines?

play03:14

Well, this isn't the etymology, but one way I like to think about it

play03:18

is that if you fix one of those scalars and let the other one change its value freely,

play03:22

the tip of the resulting vector draws a straight line.

play03:29

Now, if you let both scalars range freely and consider every possible

play03:32

vector that you can get, there are two things that can happen.

play03:36

For most pairs of vectors, you'll be able to reach every possible point in the plane.

play03:40

Every two-dimensional vector is within your grasp.

play03:43

However, in the unlucky case where your two original vectors happen to line up,

play03:47

the tip of the resulting vector is limited to just this single line passing through the

play03:52

origin.

play03:53

Actually, technically there's a third possibility too.

play03:56

Both your vectors could be zero, in which case you'd just be stuck at the origin.

play04:01

Here's some more terminology.

play04:02

The set of all possible vectors that you can reach with a linear combination

play04:07

of a given pair of vectors is called the span of those two vectors.

play04:14

So restating what we just saw in this lingo, the span of most

play04:18

pairs of 2D vectors is all vectors of 2D space, but when they line up,

play04:22

their span is all vectors whose tip sit on a certain line.

play04:27

Remember how I said that linear algebra revolves

play04:29

around vector addition and scalar multiplication?

play04:31

Well, the span of two vectors is basically a way of asking what

play04:35

are all the possible vectors you can reach using only these two fundamental operations,

play04:40

vector addition and scalar multiplication.

play04:43

This is a good time to talk about how people commonly think about vectors as points.

play04:47

It gets really crowded to think about a whole collection of vectors sitting on a line,

play04:51

and more crowded still to think about all two-dimensional vectors all at once,

play04:55

filling up the plane.

play04:57

So when dealing with collections of vectors like this,

play05:00

it's common to represent each one with just a point in space,

play05:03

the point at the tip of that vector where, as usual,

play05:06

I want you thinking about that vector with its tail on the origin.

play05:10

That way, if you want to think about every possible vector whose

play05:14

tip sits on a certain line, just think about the line itself.

play05:19

Likewise, to think about all possible two-dimensional vectors all at once,

play05:24

conceptualize each one as the point where its tip sits.

play05:27

So in effect, what you'll be thinking about is the infinite flat

play05:30

sheet of two-dimensional space itself, leaving the arrows out of it.

play05:36

In general, if you're thinking about a vector on its own, think of it as an arrow.

play05:40

And if you're dealing with a collection of vectors,

play05:42

it's convenient to think of them all as points.

play05:45

So for our span example, the span of most pairs of vectors ends

play05:48

up being the entire infinite sheet of two-dimensional space.

play05:52

But if they line up, their span is just a line.

play05:58

The idea of span gets a lot more interesting if we

play06:00

start thinking about vectors in three-dimensional space.

play06:04

For example, if you take two vectors in 3D space that are not

play06:07

pointing in the same direction, what does it mean to take their span?

play06:13

Well, their span is the collection of all possible linear combinations

play06:17

of those two vectors, meaning all possible vectors you get by scaling

play06:21

each of the two of them in some way and then adding them together.

play06:25

You can kind of imagine turning two different knobs to change

play06:28

the two scalars defining the linear combination,

play06:31

adding the scaled vectors and following the tip of the resulting vector.

play06:36

That tip will trace out some kind of flat sheet

play06:38

cutting through the origin of three-dimensional space.

play06:41

This flat sheet is the span of the two vectors.

play06:45

Or more precisely, the set of all possible vectors whose

play06:48

tips sit on that flat sheet is the span of your two vectors.

play06:51

Isn't that a beautiful mental image?

play06:54

So, what happens if we add a third vector and

play06:56

consider the span of all three of those guys?

play07:00

A linear combination of three vectors is defined

play07:03

pretty much the same way as it is for two.

play07:05

You'll choose three different scalars, scale each of those vectors,

play07:09

and then add them all together.

play07:15

And again, the span of these vectors is the set of all possible linear combinations.

play07:24

Two different things could happen here.

play07:26

If your third vector happens to be sitting on the span of the first two,

play07:30

then the span doesn't change.

play07:31

You're sort of trapped on that same flat sheet.

play07:34

In other words, adding a scaled version of that third vector to the

play07:37

linear combination doesn't really give you access to any new vectors.

play07:42

But if you just randomly choose a third vector,

play07:44

it's almost certainly not sitting on the span of those first two.

play07:48

Then, since it's pointing in a separate direction,

play07:51

it unlocks access to every possible three-dimensional vector.

play07:55

One way I like to think about this is that as you scale that new third vector,

play07:59

it moves around that span sheet of the first two, sweeping it through all of space.

play08:05

Another way to think about it is that you're making full use of the three freely changing

play08:10

scalars that you have at your disposal to access the full three dimensions of space.

play08:16

Now, in the case where the third vector was already sitting on the span of the first two,

play08:21

or the case where two vectors happen to line up,

play08:23

we want some terminology to describe the fact that at least one of these vectors is

play08:27

redundant, not adding anything to our span.

play08:30

Whenever this happens, where you have multiple vectors and you could remove one without

play08:35

reducing the span, the relevant terminology is to say that they are linearly dependent.

play08:40

Another way of phrasing that would be to say that one of the vectors can be expressed

play08:44

as a linear combination of the others, since it's already in the span of the others.

play08:52

On the other hand, if each vector really does add another dimension to the span,

play08:57

they're said to be linearly independent.

play09:06

So with all of that terminology, and hopefully with some good mental

play09:09

images to go with it, let me leave you with a puzzle before we go.

play09:12

The technical definition of a basis of a space is a

play09:16

set of linearly independent vectors that span that space.

play09:22

Now, given how I described a basis earlier, and given your current understanding of the

play09:26

words span and linearly independent, think about why this definition would make sense.

play09:33

In the next video, I'll get into matrices in transforming space.