线性组合、张成与基Linear Combinations, Span & Basis
机器人只有几个执行器,每个只会沿固定方向用力。它们配合起来,能去哪些地方?答案是:所有"各取几份再相加"能拼出来的位置,叫张成。方向够多、够"不重复"的一组向量叫基,它是给空间写坐标的尺子。 A robot has only a few actuators, and each one pushes along a fixed direction. Working together, where can they take it? Everywhere that "a few parts of this plus a few parts of that" can reach: the span. A set of directions that is rich enough and non-redundant is a basis, the ruler we use to write coordinates.
1为什么机器人需要它Why robots need this
3D 打印机、绘图仪和很多取放机器人用的是 CoreXY / H-bot 龙门架:两个固定的电机通过皮带拉动打印头。转电机 A,打印头沿对角线 \((1,1)\) 方向走;转电机 B,打印头沿另一条对角线 \((1,-1)\) 方向走。可你想要的是"去 \((3,1)\) 这个点",一个朝向和这两条对角线都不一致的位置。两个电机怎么配合,才能把打印头送到平面上任意一点?
答案就是本节的主角:线性组合。每个电机转一定的量,各自推出一个向量,打印头的位置是这些向量之和。所有能这样拼出来的位置,合起来叫这两个向量的张成(span)。如果其中一个电机卡死,张成立刻缩成一条线,机器就再也到不了平面上大部分地方。
反例同样重要。差速驱动的小车只会前进和原地转,不能横着滑:它的"执行器方向"凑不满所有方向(第 7 节)。同一套语言还在别处出现:一台俯视桌面的相机(先不管透视和畸变),它的像素坐标 \((u,v)\) 是沿"像素行、像素列"两个方向数格子得到的,这是另一套基下的坐标,朝向和刻度都和世界坐标轴不同。
3D printers, plotters and many pick-and-place machines use a CoreXY / H-bot gantry: two fixed motors pull the tool head with belts. Turn motor A and the head moves along the diagonal \((1,1)\); turn motor B and it moves along the other diagonal \((1,-1)\). But what you want is "go to the point \((3,1)\)", a place that lines up with neither diagonal. How must the two motors cooperate to put the head at any point of the plane?
The answer is the star of this lesson: a linear combination. Each motor turns by some amount and pushes out a vector; the head's position is the sum of those vectors. Every position you can build this way, taken together, is the span of the two vectors. If one motor jams, the span collapses to a line at once, and the machine can no longer reach most of the plane.
The counter-example matters just as much. A differential-drive cart can drive forward and spin, but it cannot slide sideways: its "actuator directions" do not fill all directions (Section 7). The same language shows up elsewhere. A camera looking straight down at a table (ignoring perspective and lens distortion) reports pixel coordinates \((u,v)\) by counting steps along the pixel row and pixel column. That is a coordinate system in another basis, with a different orientation and scale from the world axes.
2直觉:原料、配方与"能做的菜"Intuition: ingredients, recipes and "every dish you can cook"
想象你在厨房里,只有两种原料:向量 \(\mathbf v_1\) 和 \(\mathbf v_2\)。一份配方是两个数 \((c_1, c_2)\):第一种放 \(c_1\) 份,第二种放 \(c_2\) 份。做出来的菜是
Imagine a kitchen with just two ingredients: the vectors \(\mathbf v_1\) and \(\mathbf v_2\). A recipe is two numbers \((c_1, c_2)\): put in \(c_1\) parts of the first and \(c_2\) parts of the second. The dish you get is
这叫 \(\mathbf v_1,\mathbf v_2\) 的线性组合(linear combination)。份数可以是小数,也可以是负数(反方向走)。几何上,它就是"先沿 \(\mathbf v_1\) 走 \(c_1\) 步,再沿 \(\mathbf v_2\) 走 \(c_2\) 步"的首尾相接。你能做出的所有菜合在一起,叫两种原料的张成(span)。
关键问题是:这张"菜单"有多大?试试下面三种情况。拖动 \(\mathbf v_1\) 的箭头尖,再拖动紫色的 \(\mathbf w\):它在菜单上吗?
This is called a linear combination of \(\mathbf v_1,\mathbf v_2\). The amounts may be fractions, and they may be negative (walk backwards). Geometrically it is just "walk \(c_1\) steps along \(\mathbf v_1\), then \(c_2\) steps along \(\mathbf v_2\)", tip to tail. The set of all dishes you can make is the span of the two ingredients.
The key question is: how big is that menu? Try the three cases below. Drag the tip of \(\mathbf v_1\), then drag the purple \(\mathbf w\): is it on the menu?
- 找一个 \(\mathbf w\):在"一个向量"或"共线"下做不出来,再切到"方向不同",它就做得出来了。Find a \(\mathbf w\) that is impossible to make with "one vector" or "on one line", then switch to "different directions" and watch it become possible.
张成的大小取决于原料有没有"新方向"。第二个向量如果已经在第一个向量的张成里(同一条线上),它就多余,加进来也没有扩大菜单。这种"多余"叫线性相关;没有任何一个向量多余,就叫线性无关。
The size of the span depends on whether each ingredient brings a "new direction". If the second vector is already inside the span of the first (on the same line), it is redundant: adding it does not enlarge the menu. That redundancy is called linear dependence; if no vector is redundant, the set is linearly independent.
3动手玩:配方实验室Play: the recipe lab
拖动红色 \(\mathbf v_1\) 和绿色 \(\mathbf v_2\) 的箭头尖;用滑块调配方 \(c_1, c_2\),或者直接拖动黄色的结果 \(\mathbf p\)(滑块会跟着变)。打开"画出张成",把所有整数配方 \((c_1,c_2)\) 对应的点都画出来,再把 \(\mathbf v_1, \mathbf v_2\) 拖到同一条直线上看看。
Drag the tips of the red \(\mathbf v_1\) and green \(\mathbf v_2\); set the recipe \(c_1, c_2\) with the sliders, or drag the amber result \(\mathbf p\) directly (the sliders follow). Turn on "paint the span" to plot every integer recipe \((c_1,c_2)\), then drag \(\mathbf v_1, \mathbf v_2\) onto one line and see what happens.
- 让张成塌成一条直线:把 \(\mathbf v_1\)、\(\mathbf v_2\) 拖到同一条过原点的直线上。圆点和网格发生了什么?Make the span collapse to a line: put \(\mathbf v_1\) and \(\mathbf v_2\) on one line through the origin. What happens to the dots and the grid?
- 让张成变成一个点:两个向量都拖到原点。Make the span a single point: drag both vectors onto the origin.
- 取 \(\mathbf v_1=(1,1)\),\(\mathbf v_2=(1,-1)\)(可以用预设"CoreXY",再用滑块),配出紫色目标 \((3,1)\)。配方是什么?Take \(\mathbf v_1=(1,1)\), \(\mathbf v_2=(1,-1)\) (use the "CoreXY" preset, then the sliders) and hit the purple target \((3,1)\). What is the recipe?
- 还是配出 \((3,1)\),但这次必须有一个负的份数。提示:换一组原料,让目标落在两个原料"夹角之外"。Hit \((3,1)\) again, but this time with a negative coefficient. Hint: change the ingredients so the target lies outside the "wedge" between them.
小游戏:找配方Mini-game: find the recipe
每一题给你一组随机的原料 \(\mathbf v_1, \mathbf v_2\) 和一个紫色目标 \(\mathbf t\)。拖动黄色结果,或者调滑块,使 \(\mathbf p = \mathbf t\)。数一数斜网格:从原点沿 \(\mathbf v_1\) 走几格,再沿 \(\mathbf v_2\) 走几格?
Each round gives you random ingredients \(\mathbf v_1, \mathbf v_2\) and a purple target \(\mathbf t\). Drag the amber result, or use the sliders, until \(\mathbf p = \mathbf t\). Count cells on the skewed grid: how many cells along \(\mathbf v_1\), then how many along \(\mathbf v_2\)?
- 不用"显示配方",累计答对 3 题。Get 3 rounds right without using "Reveal".
4第二个视角:坐标取决于你选的基Second view: coordinates depend on the basis
当两个原料无关时,平面上每个点都恰好有一份配方。这份配方就是这个点在这套原料下的坐标,这套原料就叫一组基(basis)。
注意:同一个点,换一套基,坐标就变。在标准基 \(\{\ihat,\jhat\}\) 下,点 \(\mathbf p\) 的坐标是 \((3,1)\):向右 3 格、向上 1 格。换成 CoreXY 的基 \(\mathbf b_1=(1,1)\)、\(\mathbf b_2=(1,-1)\),同一个点的坐标是 \((2,1)\):沿 \(\mathbf b_1\) 走 2 份,再沿 \(\mathbf b_2\) 走 1 份,\(2(1,1)+1(1,-1)=(3,1)\)。点没有动,变的是尺子。
这正是 1.3 节"被动视角"的预告:把基向量并排写成矩阵 \(B=[\,\mathbf b_1\;\mathbf b_2\,]\),它把新坐标翻译成标准坐标:\(\mathbf p = B\mathbf c\)(详见 1.3 节)。下面两张图画的是同一个平面、同一个点,左边用方格数,右边用斜格数。
When the two ingredients are independent, every point of the plane has exactly one recipe. That recipe is the point's coordinates in this set of ingredients, and the set is called a basis.
Note: the same point gets different coordinates in a different basis. In the standard basis \(\{\ihat,\jhat\}\) the point \(\mathbf p\) has coordinates \((3,1)\): 3 cells right, 1 cell up. In the CoreXY basis \(\mathbf b_1=(1,1)\), \(\mathbf b_2=(1,-1)\) the same point has coordinates \((2,1)\): 2 parts of \(\mathbf b_1\), then 1 part of \(\mathbf b_2\), since \(2(1,1)+1(1,-1)=(3,1)\). The point did not move; the ruler changed.
This sets up the "passive view" of Lesson 1.3: write the basis vectors side by side as the matrix \(B=[\,\mathbf b_1\;\mathbf b_2\,]\), and it translates new coordinates into standard coordinates: \(\mathbf p = B\mathbf c\) (see Lesson 1.3). The two panels below show the same plane and the same point, counted with square cells on the left and slanted cells on the right.
- 选 CoreXY 基,拖动黄点,让右边的坐标读数为 \((2,1)\)。左边读到的是什么?With the CoreXY basis, drag the dot until the right-hand reading is \((2,1)\). What does the left-hand panel show?
- 还是 CoreXY 基:找一个标准坐标 x、y 都为正、但在新基下有一个坐标为负的点。Still the CoreXY basis: find a point whose standard x and y are both positive but which has a negative coordinate in the new basis.
5第三个视角:三维里的"多一个方向"Third view: one more direction in 3D
到了三维,故事多了一层。两个无关的向量张成一个过原点的平面。再加第三个向量 \(\mathbf v_3\),只有两种可能:
- \(\mathbf v_3\) 躺在这个平面里:它是前两个的组合,线性相关,张成还是这个平面(2 维);
- \(\mathbf v_3\) 伸出平面:线性无关,三个向量一起张成整个 \(\R^3\)(3 维),成为 \(\R^3\) 的一组基。
拖动滑块,把第三个向量(蓝色)从平面里一点点拉出来。拖动画面可以转动视角。
In 3D the story gains a layer. Two independent vectors span a plane through the origin. Add a third vector \(\mathbf v_3\) and there are only two possibilities:
- \(\mathbf v_3\) lies in that plane: it is a combination of the first two, so the set is dependent and the span is still that plane (2-dimensional);
- \(\mathbf v_3\) sticks out of the plane: the set is independent and the three vectors together span all of \(\R^3\) (3-dimensional), forming a basis of \(\R^3\).
Move the sliders and pull the third vector (blue) out of the plane bit by bit. Drag the view to orbit.
- 让 \(\mathbf v_3\) 恰好落进平面(\(h=0\))。状态栏变成什么?Put \(\mathbf v_3\) exactly into the plane (\(h=0\)). What does the status line say?
- 转动视角,从侧面看平面(它几乎变成一条线)。Orbit the view and look at the plane edge-on (it almost becomes a line).
6再看数学The math
提示:把鼠标悬停在公式中带底色的符号上,FIG 2 中对应的元素会被高亮。Tip: hover the highlighted symbols in the formulas; the matching element in FIG 2 lights up.
线性组合与张成Linear combinations and span
给定向量 \(\mathbf v_1,\dots,\mathbf v_k\) 和实数 \(c_1,\dots,c_k\),向量 \(c_1\mathbf v_1+\dots+c_k\mathbf v_k\) 叫它们的线性组合,\(c_i\) 是系数。所有线性组合构成的集合叫张成:
Given vectors \(\mathbf v_1,\dots,\mathbf v_k\) and real numbers \(c_1,\dots,c_k\), the vector \(c_1\mathbf v_1+\dots+c_k\mathbf v_k\) is a linear combination of them, and the \(c_i\) are the coefficients. The set of all linear combinations is the span:
在 \(\R^2\) 里,两个向量的张成只有三种可能:整个平面、一条过原点的直线、或者只有原点。张成永远包含原点(所有系数取 0)。
In \(\R^2\), the span of two vectors can only be the whole plane, a line through the origin, or just the origin. A span always contains the origin (take all coefficients 0).
线性无关Linear independence
向量组 \(\mathbf v_1,\dots,\mathbf v_k\) 线性无关,是指"只有平凡组合才能得到零向量":
The vectors \(\mathbf v_1,\dots,\mathbf v_k\) are linearly independent when "only the trivial combination gives the zero vector":
等价的说法:没有任何一个向量是其余向量的线性组合(没有"多余"的向量)。如果存在不全为 0 的系数使上式成立,就是线性相关。对平面上的两个向量,无关就是"都不为零,且不共线"。
Equivalent statement: no vector is a linear combination of the others (nobody is redundant). If some coefficients, not all zero, make the sum vanish, the set is linearly dependent. For two vectors in the plane, independent just means "both nonzero and not on one line".
基与维数Basis and dimension
基是同时满足两个条件的向量组:线性无关(没有浪费)和张成整个空间(够用)。\(\R^n\) 的任何一组基都恰好有 \(n\) 个向量,这个数 \(n\) 叫空间的维数(dimension)。所以平面里至多 2 个向量无关,空间里至多 3 个;\(\R^2\) 里的 3 个向量一定相关。
A basis is a set of vectors with both properties: linearly independent (no waste) and spanning the whole space (enough). Every basis of \(\R^n\) has exactly \(n\) vectors, and that number \(n\) is the dimension. So at most 2 vectors in the plane can be independent, at most 3 in space; three vectors in \(\R^2\) are always dependent.
坐标是唯一的Coordinates are unique
设 \(\mathbf b_1,\dots,\mathbf b_n\) 是一组基。若同一个向量有两份配方 \(\mathbf p = \sum c_i\mathbf b_i = \sum d_i\mathbf b_i\),两式相减得 \(\sum (c_i-d_i)\mathbf b_i = \mathbf 0\)。这是一个组合等于零,由线性无关,所有 \(c_i - d_i = 0\),即 \(c_i = d_i\)。所以每个向量在一组基下的坐标 \([\mathbf p]_B = (c_1,\dots,c_n)\) 是唯一的。反过来,如果原料相关,配方就不唯一(见误区 1 和第 7 节的全向轮)。
Let \(\mathbf b_1,\dots,\mathbf b_n\) be a basis. If one vector has two recipes, \(\mathbf p = \sum c_i\mathbf b_i = \sum d_i\mathbf b_i\), subtract them: \(\sum (c_i-d_i)\mathbf b_i = \mathbf 0\). That is a combination equal to zero, so independence forces every \(c_i - d_i = 0\), i.e. \(c_i = d_i\). Hence the coordinates \([\mathbf p]_B = (c_1,\dots,c_n)\) of a vector in a basis are unique. Conversely, if the ingredients are dependent, recipes are not unique (see Pitfall 1 and the omni wheels in Section 7).
在二维里求坐标Finding coordinates in 2D
设 \(\mathbf b_1=(b_{11},b_{21})\),\(\mathbf b_2=(b_{12},b_{22})\),要解 \(\mathbf p = c_1\mathbf b_1 + c_2\mathbf b_2\)。这就是两个方程、两个未知数:
Let \(\mathbf b_1=(b_{11},b_{21})\), \(\mathbf b_2=(b_{12},b_{22})\) and solve \(\mathbf p = c_1\mathbf b_1 + c_2\mathbf b_2\). This is two equations in two unknowns:
\(\Delta \ne 0\) 恰好等价于 \(\mathbf b_1,\mathbf b_2\) 无关;\(\Delta = 0\) 时两列共线,方程要么无解、要么有无穷多解。这个数就是 1.5 节的行列式。例:CoreXY 的基,\(\Delta = 1\cdot(-1) - 1\cdot 1 = -2\);对 \(\mathbf p = (3,1)\),\(c_1 = (3\cdot(-1) - 1\cdot 1)/(-2) = 2\),\(c_2 = (1\cdot 1 - 1\cdot 3)/(-2) = 1\),和 FIG 4 一致。
\(\Delta \ne 0\) is exactly the statement that \(\mathbf b_1,\mathbf b_2\) are independent; if \(\Delta = 0\) the columns are collinear and the equations have either no solution or infinitely many. This number is the determinant of Lesson 1.5. Example: for the CoreXY basis, \(\Delta = 1\cdot(-1) - 1\cdot 1 = -2\); for \(\mathbf p = (3,1)\), \(c_1 = (3\cdot(-1) - 1\cdot 1)/(-2) = 2\) and \(c_2 = (1\cdot 1 - 1\cdot 3)/(-2) = 1\), matching FIG 4.
把基向量作为列,\(B=[\,\mathbf b_1\;\mathbf b_2\,]\),上面的方程就是 \(B\mathbf c = \mathbf p\),解是 \(\mathbf c = B^{-1}\mathbf p\)。CoreXY 的 \(B = \begin{bmatrix}1&1\\1&-1\end{bmatrix}\),\(B^{-1} = \tfrac12\begin{bmatrix}1&1\\1&-1\end{bmatrix}\),也就是 \(c_1 = (x+y)/2\),\(c_2 = (x-y)/2\)(电机指令和打印头位置之间的换算公式)。\(B\) 是什么、什么时候有逆,是 1.3 节和 1.6 节的内容。
Put the basis vectors in as columns, \(B=[\,\mathbf b_1\;\mathbf b_2\,]\); the equations are \(B\mathbf c = \mathbf p\) with solution \(\mathbf c = B^{-1}\mathbf p\). For CoreXY, \(B = \begin{bmatrix}1&1\\1&-1\end{bmatrix}\) and \(B^{-1} = \tfrac12\begin{bmatrix}1&1\\1&-1\end{bmatrix}\), i.e. \(c_1 = (x+y)/2\), \(c_2 = (x-y)/2\): the conversion between head position and motor commands. What \(B\) is and when it has an inverse are the topics of Lessons 1.3 and 1.6.
7机器人中的它:龙门架、差速车与全向轮In robotics: gantries, differential drive and omni wheels
CoreXY 龙门架The CoreXY gantry
取单位:电机 A 每转 1 个单位,打印头移动 \((1,1)\);电机 B 每转 1 个单位,移动 \((1,-1)\)(实际机器差一个常数倍,不影响结论)。电机指令 \((\alpha,\beta)\) 对应的打印头位置是
Choose units so that one unit of motor A moves the head by \((1,1)\) and one unit of motor B by \((1,-1)\) (real machines differ by a constant factor, which changes nothing). Motor commands \((\alpha,\beta)\) put the head at
拖动打印头(黄),或者用滑块分别转两个电机。然后试试"故障":卡死一个电机,它的指令就被冻结,打印头只能沿另一个电机的对角线滑动,可达集合从一块区域塌成一条线段。
Drag the head (amber), or turn the two motors with the sliders. Then try a "fault": jam one motor, its command is frozen, and the head can only slide along the other motor's diagonal. The reachable set collapses from a region to a line segment.
- 两个电机都正常,把打印头开到目标 \((3,1)\)。电机指令是多少?With both motors healthy, drive the head to the target \((3,1)\). What are the motor commands?
- 卡死一个电机,使目标永远够不着(读数里"最近距离"大于 0.5)。Jam a motor so that the target becomes unreachable (the "closest approach" in the readout exceeds 0.5).
- 有没有一种卡死位置,目标依然够得着?先把电机开到合适的位置,再卡死它,再用另一个电机去够目标。Is there a jam position where the target is still reachable? Park a motor at a suitable value first, jam it, then reach the target with the other motor.
差速车:三个方向只凑得出两个Differential drive: only two of three directions
平面移动机器人的瞬时运动有三个自由度:前后 \(v_x\)、左右 \(v_y\)、转动 \(\omega\),可以写成 \(\R^3\) 里的一个向量 \((v_x,v_y,\omega)\)。差速车只有两个"执行器方向":前进 \((1,0,0)\) 和原地转 \((0,0,1)\),它们只张成 \(\R^3\) 里的一个平面。含 \(v_y\) 的方向都在张成之外:它不能横着滑。全向轮底盘三个方向俱全,张成整个 \(\R^3\)。
The instantaneous motion of a planar mobile robot has three degrees of freedom: forward \(v_x\), sideways \(v_y\) and turning \(\omega\), which form a vector \((v_x,v_y,\omega)\) in \(\R^3\). A differential-drive cart has only two "actuator directions": forward \((1,0,0)\) and spin in place \((0,0,1)\). They span just a plane in \(\R^3\). Any direction with \(v_y\) lies outside that span: the cart cannot slide sideways. An omni-wheel base has all three directions and spans all of \(\R^3\).
- 差速模式下,把想要的速度拖成几乎纯横向(\(|v_y|>1.5\),\(|v_x|<0.3\))。实际速度是多少?In differential mode, drag the desired velocity to almost pure sideways (\(|v_y|>1.5\), \(|v_x|<0.3\)). What velocity is actually produced?
- 切到全向模式,再做一次同样的事。Switch to omni mode and do the same thing again.
固件里的基变换。Klipper、Marlin 等 3D 打印机固件在 CoreXY 模式下,每一步都在做 FIG 6 里的换算:把想要的 \((x,y)\) 变成两个电机的位置(相差一个常数倍)。电机相关或卡死,换算就失效。
差速车并非到不了。它不能瞬时横移,但通过"转一下、前进、再转回来"(像侧方停车)可以到达平面上任何位姿。瞬时能走的方向不足,换来的是需要规划的运动,这类约束叫非完整约束(nonholonomic),第 II 部分会专门讲。
冗余也是一种相关。4 个麦克纳姆轮的全向底盘,只有 3 个自由度:4 个轮子的"贡献向量"住在 \(\R^3\) 里,4 个向量一定相关,所以同一个车体速度可以由很多种轮速组合产生。这给了你"多出来的自由"(可以用来分配负载、避开打滑),也意味着配方不再唯一,需要 1.6 节和 1.13 节的工具来选一个。
机械臂。6 自由度机械臂的雅可比(3.4 节)的 6 列,是 6 个关节各自产生的末端运动向量。它们无关,末端才能朝任意方向运动;这些列变得线性相关(例如两列撞到同一条线上)就是奇异位形:和 FIG 6 里电机卡死如出一辙。
A basis change in firmware. In CoreXY mode, printer firmware such as Klipper and Marlin performs the conversion of FIG 6 on every step: it turns the wanted \((x,y)\) into two motor positions (up to a constant factor). If the motors become dependent or one is jammed, the conversion breaks down.
A differential cart is not stuck. It cannot move sideways instantaneously, but "turn, drive, turn back" (like parallel parking) takes it to any pose in the plane. Too few instantaneous directions is paid for with maneuvers that must be planned. Such constraints are called nonholonomic, and Part II covers them.
Redundancy is dependence, too. An omni base with 4 mecanum wheels has only 3 degrees of freedom: the four wheels' "contribution vectors" live in \(\R^3\), and four vectors there must be dependent. So the same body velocity can come from many different wheel-speed combinations. That is extra freedom (to share load, to avoid slip) but also means recipes are no longer unique, and picking one takes the tools of Lessons 1.6 and 1.13.
Robot arms. The six columns of a 6-DoF arm's Jacobian (Lesson 3.4) are the end-effector motions produced by the six joints. Only if they are independent can the end effector move in any direction; when the columns become dependent (for example, two of them land on one line) you are at a singularity, just like the jammed motor in FIG 6.
8常见误区Common pitfalls
不是。平面里的 3 个向量一定相关,至多有 2 个"有用"。例如 \((1,0),(0,1),(1,1)\):张成还是整个平面,第三个是多余的,而且配方不再唯一:\((1,1)\) 既是 \(1\cdot(1,1)\),也是 \(1\cdot(1,0)+1\cdot(0,1)\)。增加向量能不能扩大张成,要看它是不是新方向,不看个数。
No. Three vectors in the plane are always dependent, and at most 2 of them do real work. Take \((1,0),(0,1),(1,1)\): the span is still the whole plane, the third one is redundant, and recipes stop being unique: \((1,1)\) equals both \(1\cdot(1,1)\) and \(1\cdot(1,0)+1\cdot(0,1)\). Whether adding a vector enlarges the span depends on whether it is a new direction, not on the count.
无关只要求"不共线"。\((1,0)\) 和 \((1,1)\) 夹角 45°,照样是平面的一组基(FIG 4 里的 CoreXY 基倒是垂直的,但"斜"那一档不是)。垂直(正交)是更强、更好用的性质:坐标可以直接用点积读出来(1.7 节、1.9 节)。
Independence only asks for "not on one line". \((1,0)\) and \((1,1)\) make a 45° angle and are still a basis of the plane (the CoreXY basis of FIG 4 happens to be perpendicular, but the "skew" one is not). Perpendicular (orthogonal) is a stronger and handier property: coordinates can be read off with dot products (Lessons 1.7 and 1.9).
不可能。只要含 \(\mathbf 0\),取 \(1\cdot\mathbf 0 + 0\cdot\mathbf v_2 = \mathbf 0\),这是一个非平凡的组合得到零,所以一定相关。对机器人来说:一个卡死的电机、一个被锁住的关节,贡献的就是零向量,对张成没有任何帮助。
Impossible. As soon as the set contains \(\mathbf 0\), take \(1\cdot\mathbf 0 + 0\cdot\mathbf v_2 = \mathbf 0\): a non-trivial combination giving zero, so the set is dependent. For a robot: a jammed motor or a locked joint contributes the zero vector and adds nothing to the span.
同一个空间有无穷多组基,所以一组数 \((2,1)\) 脱离了"哪组基"就没有意义:在标准基下它是点 \((2,1)\),在 CoreXY 基下它是点 \((3,1)\)。机器人代码里永远要标明坐标系:p_world、p_cam、p_base,矩阵写成 R_world_cam。很多看似玄学的 bug,只是把一组坐标当成了另一个坐标系里的。
A space has infinitely many bases, so a pair of numbers \((2,1)\) means nothing until you say which one: in the standard basis it is the point \((2,1)\); in the CoreXY basis it is the point \((3,1)\). In robot code always label the frame: p_world, p_cam, p_base, and name matrices like R_world_cam. Many mysterious bugs are just coordinates from one frame read as if they were in another.
9小练习Check yourself
10延伸阅读Further reading
- 3Blue1Brown, Essence of Linear Algebra — 第 2 章“线性组合、张成与基向量”(Linear combinations, span, and basis vectors)Ch. 2, “Linear combinations, span, and basis vectors”
- G. Strang, Introduction to Linear Algebra — 第 1 章(线性组合)与“线性无关、基和维数”一节(章节编号因版本而异)Ch. 1 (linear combinations) and the section “Independence, Basis and Dimension” (numbering varies by edition)
- G. Strang, MIT 18.06 Linear Algebra (OCW) — 第 9 讲:线性无关、基和维数Lecture 9: Independence, basis, and dimension
- J. Ström et al., Immersive Linear Algebra — 第 2 章“向量”(含线性组合与线性无关的交互插图)Ch. 2, “Vectors” (interactive figures on linear combinations and independence)