注:本文为 “线性代数 | 变量 ” 相关合辑。
英文引文,机翻未校。
中文引文,略作重排。
未去重,如有内容异常,请看原文。
What is a pivot column in a system of linear equations?
线性方程组中的主元列是什么?
number0, Apr 3, 2011
What is a pivot column?
什么是主元列?
I tried google for some examples but I cannot find any. I need to know what exactly a pivot column is because I am trying to do a Linear Algebra problem about consistency and inconsistency. Can anyone provide me some examples of what a pivot column is (or is not) on the last column of a given matrix?
Thanks.
我试着在谷歌上搜索一些例子,但没找到。我需要确切知道什么是主元列,因为我正在做一道关于线性方程组相容性和不相容性的线性代数题。有人能举例说明在给定矩阵的最后一列中,什么是主元列(或什么不是主元列)吗?
谢谢。
Explanation and Example of Pivot Columns
主元列的解释与示例
Consider the row-echelon matrix
考虑行阶梯形矩阵
A
=
[
1
0
2
3
0
1
1
4
0
0
0
1
0
0
0
0
]
A=\left[ \begin{matrix} 1 & 0 & 2 & 3 \\ 0 & 1 & 1 & 4 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ \end{matrix} \right]
A=
1000010021003410
The “pivot columns” are the columns that contain the leading
1
1
1’s of the rows. In this example, they are columns
1
1
1,
2
2
2 and
4
4
4. “Non-pivot columns” are linearly dependent on preceding ones. For example, column
3
3
3 is twice column one plus column two.
“主元列”是包含行中首项
1
1
1 的列。在这个例子中,主元列是第
1
1
1、
2
2
2 和
4
4
4 列。“非主元列”线性依赖于前面的主元列。例如,第
3
3
3 列等于
2
2
2 倍的第
1
1
1 列加上第
2
2
2 列。
Pivot columns are important, because they form a basis for the column space, which has dimension
=
rank
(
A
)
= \text{rank}(A)
=rank(A). The number of pivot columns in an
m
×
n
m \times n
m×n matrix is always equal to the number of non-zero rows in a row-reduced matrix.
主元列很重要,因为它们构成了列空间的一组基,列空间的维数等于矩阵的秩(
rank
(
A
)
\text{rank}(A)
rank(A))。
m
×
n
m \times n
m×n 矩阵中主元列的数量总是等于行简化矩阵中非零行的数量。
The concept only applies to row-reduced matrices (row-reduction is how we reveal which columns are independent). But having row-reduced a matrix, we can use the pivot columns of the reduced form, to identify a basis for the column space of the original matrix, by choosing the same columns as basis vectors. In our example, if we had started with some other matrix,
B
B
B, and row-reduced it to
A
A
A, the
1
1
1st,
2
2
2nd and
4
4
4th columns of
B
B
B would form a basis for the column space of
B
B
B (also known as the range, or image of
B
B
B).
这一概念仅适用于行简化矩阵(通过行简化可以揭示哪些列是独立的)。但对矩阵进行行简化后,我们可以利用简化形式的主元列,通过选择原矩阵中相同的列作为基向量,来确定原矩阵列空间的一组基。在我们的例子中,如果我们从某个矩阵
B
B
B 开始,将其行简化为
A
A
A,那么
B
B
B 的第
1
1
1、
2
2
2 和
4
4
4 列将构成
B
B
B 的列空间(也称为值域或像)的一组基。
Follow-up Question on Pivot Columns
关于主元列的后续问题
Thanks for the explanation. However, if the matrix were to be defined as
感谢你的解释。但是,如果矩阵定义为:
[
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
]
\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
1000010000100001
Would the last column still be considered a pivot column? If not, what is the reasoning behind this?
最后一列仍会被视为主元列吗?如果不是,其原因是什么?
Contextual Considerations for Pivot Columns
主元列的上下文考量
You have to state more of the context in which the phrase “pivot column” was used, otherwise it could mean a hundred different things.
你必须说明“主元列”这一短语使用的更多上下文,否则它可能有上百种不同的含义。
In general terms, there are various algorithms for solving problems such as solving systems of equations, solving linear programming problems etc. Many of these algorithms proceed in steps that involve picking a particular element in a matrix and then doing something with the row or column that contains that element. The matrix entry that is picked is called the “pivot” and it’s column is, of course, the “pivot column”.
一般来说,有多种算法可用于解决诸如解方程组、解线性规划问题等。这些算法中有许多步骤涉及选择矩阵中的某个特定元素,然后对包含该元素的行或列进行操作。被选中的矩阵元素称为“主元”,其所在的列当然就是“主元列”。
What criteria is used to pick the “pivot” and thus select the “pivot column” depends on what algorithm you are discussing.
选择“主元”进而选择“主元列”所依据的标准,取决于你所讨论的算法。
Specific Context: Augmented Matrices
特定上下文:增广矩阵
The context is “solving a system of linear equations,” where I am referring to the column before the last column in an augmented matrix. For example, the bolded column in the following matrix:
其上下文是“解线性方程组”,这里我指的是增广矩阵中最后一列之前的列。例如,以下矩阵中加粗的列:
[
1
0
0
0
∣
3
0
1
0
0
∣
2
0
0
1
0
∣
1
0
0
0
1
∣
6
]
\begin{bmatrix} 1 & 0 & 0 & \textbf{0} & | & 3 \\ 0 & 1 & 0 & \textbf{0} & | & 2 \\ 0 & 0 & 1 & \textbf{0} & | & 1 \\ 0 & 0 & 0 & \textbf{1} & | & 6 \end{bmatrix}
1000010000100001∣∣∣∣3216
Further Clarification on Pivot Columns in Augmented Matrices
关于增广矩阵中主元列的进一步说明
There are several algorithms for solving a system of linear equations and several matrices appear as these algorithms progress. So I can’t answer the question “what is a pivot column” from that description.
解线性方程组有多种算法,并且在这些算法的执行过程中会出现多个矩阵。因此,仅根据该描述,我无法回答“什么是主元列”这个问题。
I am trying to find whether if the “system of linear equations” is consistent or not. This can be measured by looking at the column before the augmented column. If it is not consistent, then the column before the augmented column is a pivot column. Otherwise, it is not.
我正在尝试判断“线性方程组”是否相容。这可以通过观察增广列(最后一列)之前的列来判断。如果方程组不相容,那么增广列之前的列是主元列;否则,就不是。
From what you have said, all I can guess is that your textbook intends that you perform some operation with a column and that it has told you a rule for selecting the “pivot column”. The fact that it used the term “pivot column” does not reveal what it intends for you to do with the column.
根据你所说的内容,我只能猜测你的教科书希望你对某一列执行某种操作,并且已经告诉你选择“主元列”的规则。但使用“主元列”这一术语,并不能说明教科书希望你用该列做什么。
That’s the best I can do without knowing what specific algorithm (and I mean “algorithm” not “topic”) you are studying. You haven’t even quoted the sentence in your material that uses the term “pivot column”.
在不知道你正在学习的具体算法(我指的是“算法”而非“主题”)的情况下,我能做的只有这些。你甚至没有引用教材中使用“主元列”这一术语的句子。
What do free variable and leading variables mean?
自由变量和首变量是什么意思?
asked Mar 21, 2014 at 9:39, user136980
What do the leading variables and free variables in a matrix mean? I have the system below and am trying to understand which are which. I searched a lot for this, please help me!
矩阵中的首变量和自由变量是什么意思?我有下面这个方程组,想弄清楚哪些是首变量,哪些是自由变量。我查了很多资料,还是不明白,请帮帮我!
{
w
+
x
+
y
+
z
=
6
w
+
y
+
z
=
4
w
+
y
=
2
\begin{cases} w + x + y + z = 6 \\ w + y + z = 4 \\ w + y = 2 \end{cases}
⎩
⎨
⎧w+x+y+z=6w+y+z=4w+y=2
Explanation of Leading and Free Variables
首变量和自由变量的解释
The terms “leading variable” and “free variable” are usually defined for the matrix representing a system, and only when the matrix is in row-echelon form.
“首变量”和“自由变量”这两个术语通常是针对表示方程组的矩阵来定义的,且仅当矩阵处于行阶梯形时才有定义。
The augmented matrix for your system is
该方程组的增广矩阵为:
[
1
1
1
1
∣
6
1
0
1
1
∣
4
1
0
1
0
∣
2
]
\begin{bmatrix} 1 & 1 & 1 & 1 & | & 6 \\ 1 & 0 & 1 & 1 & | & 4 \\ 1 & 0 & 1 & 0 & | & 2 \end{bmatrix}
111100111110∣∣∣642
Notice that each column corresponds to a variable.
注意,每一列对应一个变量。
Do you know how to use elementary row operations to bring this matrix to row-echelon form?
你知道如何使用初等行变换将这个矩阵化为行阶梯形吗?
In row-echelon form, the first non-zero entry in each row (if there is one) is a
1
1
1, and the column it is in corresponds to a leading variable; the columns that don’t have that kind of
1
1
1 correspond to the free variables. Essentially, columns that don’t have a leading variable, have a free variable.
在行阶梯形中,每一行的第一个非零元素(如果有)是
1
1
1,该元素所在的列对应一个首变量;没有这种
1
1
1 的列对应自由变量。本质上,没有首变量的列,就有一个自由变量。
So for example if a row-echelon form is given by
例如,如果一个行阶梯形如下:
[
1
2
3
4
5
∣
6
0
0
1
7
8
∣
9
0
0
0
1
π
∣
2
]
\begin{bmatrix} 1 & 2 & 3 & 4 & 5 & | & 6 \\ 0 & 0 & 1 & 7 & 8 & | & 9 \\ 0 & 0 & 0 & 1 & \pi & | & \sqrt{2} \end{bmatrix}
10020031047158π∣∣∣692
then the
1
1
1st,
3
3
3rd, and
4
4
4th variables are leading variables while the
2
2
2nd and
5
5
5th variables are free variables.
那么第
1
1
1、
3
3
3 和
4
4
4 个变量是首变量,而第
2
2
2 和
5
5
5 个变量是自由变量。
Alternative Interpretation in Linear Systems
在线性方程组中的另一种解释
That’s good when thought of in the context of matrix representation. But what they mean in (homogeneous/nonhomogeneous) linear systems context: Is it just that the leading variables are bound/constrained by the given equations and free variables are parametric/not bound by the equations? Or are there more alternative interpretations / significance / facts / observations associated with it in the context of linear system?
从矩阵表示的角度来理解很好。但在(齐次/非齐次)线性方程组的背景下,它们是什么意思呢?是不是仅仅是首变量受给定方程的约束,而自由变量是参数化的、不受方程约束?或者在线性方程组的背景下,它们还有更多其他的解释、意义、事实或相关观察?
@awe, that would depend on how the systems are written. If they are written as, say,
@awe,这取决于方程组的写法。例如,如果方程组写成:
{
a
=
3
b
−
7
d
+
11
c
=
12
d
+
44
e
=
92
\begin{cases} a = 3b - 7d + 11 \\ c = 12d + 44 \\ e = 92 \end{cases}
⎩
⎨
⎧a=3b−7d+11c=12d+44e=92
then you can say
a
a
a,
c
c
c,
e
e
e are leading and
b
b
b,
d
d
d are free variables. But if they are written
那么可以说
a
a
a、
c
c
c、
e
e
e 是首变量,
b
b
b、
d
d
d 是自由变量。但如果写成
{
w
+
x
+
y
+
z
=
6
w
+
y
+
z
=
4
w
+
y
=
2
\begin{cases} w + x + y + z = 6 \\ w + y + z = 4 \\ w + y = 2 \end{cases}
⎩
⎨
⎧w+x+y+z=6w+y+z=4w+y=2
- then there is no sensible way to distinguish some of the variables as leading and others as free. The distinction only arises during the process of solving the system.
那么就无法合理地区分哪些变量是首变量,哪些是自由变量。这种区分只有在求解方程组的过程中才会出现。
The first non-zero entry in each row (if there is one) is a
1
1
1. This condition is not really needed for echelon form. It does not have to be
1
1
1 and it is still echelon form. It only needs to be nonzero.
“每一行的第一个非零元素(如果有)是
1
1
1”这一条件对于阶梯形来说并非必需。它不一定是
1
1
1,仍然可以是阶梯形。它只需要是非零的就行。
Non-matrix Explanation of Free and Leading Variables
自由变量和首变量的非矩阵解释
If a set of linear equations can be expressed as let’s say
如果一组线性方程组可以表示为,例如:
{
a
=
3
x
+
4
y
+
5
z
−
12
b
=
2
x
+
8
y
+
z
−
11
c
=
9
x
+
7
y
−
z
−
15
\begin{cases} a = 3x + 4y + 5z - 12 \\ b = 2x + 8y + z - 11 \\ c = 9x + 7y - z - 15 \end{cases}
⎩
⎨
⎧a=3x+4y+5z−12b=2x+8y+z−11c=9x+7y−z−15
where
其中
- The left hand variables don’t appear on the right side and vice versa.
左手边的变量不会出现在右手边,反之亦然。 - On the left side, there is only one variable.
左手边只有一个变量。
Then,
那么,
-
x
x
x,
y
y
y and
z
z
z can take values of any combination and are called free variables.
x x x、 y y y 和 z z z 可以取任意组合的值,称为自由变量。 -
a
a
a,
b
b
b and
c
c
c are dependent on the above free variables (
x
x
x,
y
y
y and
z
z
z) and cannot be any combination.
a
a
a,
b
b
b and
c
c
c are called pivot or leading variables.
a a a、 b b b 和 c c c 依赖于上述自由变量( x x x、 y y y 和 z z z),不能取任意组合的值。 a a a、 b b b 和 c c c 称为主元变量或首变量。
One more thing, depending upon how we form the above equations the pivot and free variable might be changed. For ex.,
另外,根据我们构建上述方程的方式,主元变量和自由变量可能会发生变化。例如:
a
=
x
+
y
+
z
a = x + y + z
a=x+y+z
==>
a
a
a is pivot =>
x
x
x,
y
y
y,
z
z
z are free variables.
==>
a
a
a 是主元变量 =>
x
x
x、
y
y
y、
z
z
z 是自由变量。
The same equation can be expressed as
同一个方程可以表示为:
x
=
a
−
y
−
z
x = a - y - z
x=a−y−z
==>
x
x
x is pivot =>
a
a
a,
y
y
y,
z
z
z are free variables.
==>
x
x
x 是主元变量 =>
a
a
a、
y
y
y、
z
z
z 是自由变量。
I thought of explaining the free/leading variables in a non-matrix way, since the original query was in a non-matrix way.
Thanks to Gilbert Strang_ for getting me again started with Linear Algebra.
由于最初的问题是以非矩阵的方式提出的,所以我想用非矩阵的方式来解释自由变量/首变量。
感谢 Gilbert Strang 让我重新开始学习线性代数。
Understanding Pivot and Free Variables in Linear Programming
理解线性规划中的主元变量与自由变量
John Rhodes
1. Definition of Pivot/Basic Variables and Free Variables
主元变量/基变量与自由变量的定义
What is a pivot/basic variable? Free variable?
什么是主元变量/基变量?什么是自由变量?
A pivot/basic variable corresponds to a pivot column. A free variable corresponds to a solution of the system for any value.
主元变量(又称基变量)对应于主元列。自由变量则对应于可取任意值以构成方程组解的变量。
2. Detailed Explanation of Pivot/Basic Variables
主元变量/基变量的详细解释
In linear programming, a pivot or basic variable is a decision variable that has a non-zero coefficient in the equation representing a basic feasible solution. In other words, a pivot variable is a variable that is chosen to represent a specific value of an inequality in the constraints of a linear programming problem.
在线性规划中,主元变量(或基变量)是一种决策变量,在表示基可行解的方程中,该变量的系数非零。换句话说,主元变量是为表示线性规划问题约束条件中某一不等式的特定值而选定的变量。
3. Detailed Explanation of Free Variables
自由变量的详细解释
On the other hand, a free variable is a decision variable in a linear programming problem that does not represent a basic feasible solution and can take on any value. Free variables have coefficients of zero in the equation representing the basic feasible solution.
另一方面,自由变量是线性规划问题中的一种决策变量,它不表示基可行解,且可取任意值。在表示基可行解的方程中,自由变量的系数为零。
4. Illustrative Example of Pivot and Free Variables
主元变量与自由变量的示例说明
To illustrate the difference between pivot and free variables, let’s consider the following linear programming problem:
为说明主元变量与自由变量之间的区别,我们来看下面这个线性规划问题:
4.1 Objective Function and Constraints of the Example
示例的目标函数与约束条件
Maximize:
2
x
+
3
y
\boldsymbol{2x + 3y}
2x+3y
最大化目标函数:
2
x
+
3
y
\boldsymbol{2x + 3y}
2x+3y
Subject to:
约束条件:
3
x
+
2
y
≤
18
x
+
y
≤
8
2
x
−
y
≤
2
\begin{align*} 3x + 2y &\leq 18 \\ x + y &\leq 8 \\ 2x - y &\leq 2 \end{align*}
3x+2yx+y2x−y≤18≤8≤2
4.2 Basic Feasible Solution of the Example
示例的基可行解
The basic feasible solution for this problem can be represented as follows:
该问题的基可行解可表示如下:
x
=
2
y
=
6
s
1
=
0
s
2
=
0
s
3
=
2
\begin{align*} x &= 2 \\ y &= 6 \\ s_1 &= 0 \\ s_2 &= 0 \\ s_3 &= 2 \end{align*}
xys1s2s3=2=6=0=0=2
4.3 Identification of Pivot, Slack and Free Variables in the Example
示例中主元变量、松弛变量与自由变量的判定
Here,
x
\boldsymbol{x}
x and
y
\boldsymbol{y}
y are the pivot variables, as they represent specific values that satisfy the constraints. The variables
s
1
\boldsymbol{s_1}
s1,
s
2
\boldsymbol{s_2}
s2, and
s
3
\boldsymbol{s_3}
s3 are the slack variables, which are used to convert the inequalities to equations.
此处,
x
\boldsymbol{x}
x 和
y
\boldsymbol{y}
y 为主元变量,因为它们代表满足约束条件的特定值。变量
s
1
\boldsymbol{s_1}
s1、
s
2
\boldsymbol{s_2}
s2 和
s
3
\boldsymbol{s_3}
s3 为松弛变量,用于将不等式转化为等式。
Meanwhile,
z
\boldsymbol{z}
z,
w
\boldsymbol{w}
w,
u
\boldsymbol{u}
u, and
v
\boldsymbol{v}
v are the free variables, and they can take on any value without violating the constraints. In a linear programming problem, the number of free variables is equal to the number of variables in the problem minus the number of constraints.
同时,
z
\boldsymbol{z}
z、
w
\boldsymbol{w}
w、
u
\boldsymbol{u}
u 和
v
\boldsymbol{v}
v 为自由变量,它们可取任意值且不违反约束条件。在线性规划问题中,自由变量的数量等于问题中的总变量数减去约束条件的数量。
Pivot Column(主元列)
Definition:
The column that contains the leading 1 in a row of a matrix in row-echelon form.
在行阶梯形矩阵中,包含某一行首项 1(主元)的列。
Explanation:
In a row-echelon matrix, each pivot column corresponds to one basic variable. Since the leading 1 (pivot) in the row ensures the variable has a coefficient of 1 and no leading 1s exist above or below it, the value of the corresponding basic variable can be uniquely determined by the system of linear equations.
行阶梯形矩阵中,每一列主元列对应一个基本变量。由于行中的首项 1(主元)使该变量系数为 1,且其上下行对应位置均无主元,因此对应的基本变量值可通过线性方程组唯一确定。
Example:
In the matrix
[
1
0
2
3
0
1
1
4
0
0
0
1
0
0
0
0
]
\begin {bmatrix} 1 & 0 & 2 & 3 \\0 & 1 & 1 & 4 \\0 & 0 & 0 & 1 \\0 & 0 & 0 & 0\end {bmatrix}
1000010021003410
, columns 1, 2, and 4 are pivot columns. The leading 1s of the 1st, 2nd, and 3rd rows are located in these three columns respectively.
在矩阵
[
1
0
2
3
0
1
1
4
0
0
0
1
0
0
0
0
]
\begin {bmatrix} 1 & 0 & 2 & 3 \\0 & 1 & 1 & 4 \\0 & 0 & 0 & 1 \\0 & 0 & 0 & 0\end {bmatrix}
1000010021003410
中,第 1、2、4 列为主元列,第 1、2、3 行的首项 1 分别位于这三列中。
Free Column(自由列)
Definition:
The column that does not contain any leading 1 (pivot) of the rows in a matrix in row-echelon form.
在行阶梯形矩阵中,不包含任意一行首项 1(主元)的列。
Explanation:
In a row-echelon matrix, free columns correspond to free variables. Since there is no leading 1 to fix the coefficient of the corresponding variable, the value of the free variable can be chosen arbitrarily without violating the constraints of the linear system.
行阶梯形矩阵中,自由列对应自由变量。由于无主元固定该变量的系数,自由变量的取值可任意选择,且不会违反线性方程组的约束条件。
Example:
In the matrix
[
1
0
2
3
0
1
1
4
0
0
0
1
0
0
0
0
]
\begin {bmatrix} 1 & 0 & 2 & 3 \\0 & 1 & 1 & 4 \\0 & 0 & 0 & 1 \\0 & 0 & 0 & 0\end {bmatrix}
1000010021003410
, column 3 is a free column. None of the leading 1s in the matrix are located in this column.
在上述矩阵中,第 3 列为自由列,矩阵中所有行的首项 1 均不位于该列。
Pivot Variable(主元变量)
Definition:
The variable corresponding to a pivot column in the augmented matrix of a linear system.
在线性方程组的增广矩阵中,与主元列相对应的变量。
Explanation:
Also called a basic variable, a pivot variable’s value is uniquely determined by the linear system once the values of free variables (if any) are fixed. This is because the pivot column ensures the variable has a coefficient of 1 in its corresponding row, with no other pivot variables interfering in that row.
又称基本变量,当自由变量(若存在)的取值确定后,主元变量的值可由线性方程组唯一确定。这是因为主元列会使该变量在对应行中的系数为 1,且该行中无其他主元变量产生干扰。
Example:
For the augmented matrix
[
1
0
0
∣
9
0
1
0
∣
0
0
0
0
∣
1
]
\begin{bmatrix} 1 & 0 & 0 & | & 9 \\ 0 & 1 & 0 & | & 0 \\ 0 & 0 & 0 & | & 1 \end{bmatrix}
100010000∣∣∣901
(note: the original matrix is adjusted to standard row-echelon form by swapping the 2nd row to align leading 1s in order), the variables corresponding to columns 1 and 2 are pivot variables. Since there are no free variables here, their values are directly determined as 9 and 0 respectively.
对于增广矩阵
[
1
0
0
∣
9
0
1
0
∣
0
0
0
0
∣
1
]
\begin{bmatrix} 1 & 0 & 0 & | & 9 \\ 0 & 1 & 0 & | & 0 \\ 0 & 0 & 0 & | & 1 \end{bmatrix}
100010000∣∣∣901
(注:原矩阵已调整为标准行阶梯形,交换第 2 行以保证主元顺序),第 1、2 列对应的变量为主元变量。由于此处无自由变量,其值可直接确定为 9 和 0。
Basic Variable(基本变量)
Definition:
The variable corresponding to a pivot column in the augmented matrix of a linear system.
在线性方程组的增广矩阵中,与主元列相对应的变量。
Explanation:
It is completely equivalent to a pivot variable. The term “basic variable” is frequently used in linear programming and Gaussian elimination contexts, emphasizing the variable’s role in forming the “basic solution” of the system.
与主元变量完全等价,“基本变量”这一术语常用于线性规划和高斯消元法的语境中,突出该变量在构成方程组“基本解”时的作用。
Example:
Using the same augmented matrix as the pivot variable example:
[
1
0
0
∣
9
0
1
0
∣
0
0
0
0
∣
1
]
\begin{bmatrix} 1 & 0 & 0 & | & 9 \\ 0 & 1 & 0 & | & 0 \\ 0 & 0 & 0 & | & 1 \end{bmatrix}
100010000∣∣∣901
, the variables corresponding to columns 1 and 2 are basic variables, with values 9 and 0 respectively.
沿用主元变量示例中的增广矩阵
[
1
0
0
∣
9
0
1
0
∣
0
0
0
0
∣
1
]
\begin{bmatrix} 1 & 0 & 0 & | & 9 \\ 0 & 1 & 0 & | & 0 \\ 0 & 0 & 0 & | & 1 \end{bmatrix}
100010000∣∣∣901
,第 1、2 列对应的变量为基本变量,其值分别为 9 和 0。
Free Variable(自由变量)
Definition:
The variable corresponding to a free column (non-pivot column) in the augmented matrix of a linear system.
在线性方程组的增广矩阵中,与自由列(非主元列)相对应的变量。
Explanation:
Its value can be freely chosen within the system’s domain (usually the set of real numbers). After assigning values to all free variables, the values of pivot (basic) variables are uniquely determined, thus forming the general solution of the linear system.
其值可在方程组的定义域(通常为实数域)内自由选取。当所有自由变量的取值确定后,主元(基本)变量的值随之唯一确定,进而构成线性方程组的通解。
Example:
For the augmented matrix
[
1
2
0
∣
9
0
0
1
∣
0
0
0
0
∣
1
]
\begin{bmatrix} 1 & 2 & 0 & | & 9 \\ 0 & 0 & 1 & | & 0 \\ 0 & 0 & 0 & | & 1 \end{bmatrix}
100200010∣∣∣901
(adjusted to row-echelon form), column 2 is a free column, so the variable corresponding to column 2 is a free variable. Let this variable be
x
2
=
t
x_2 = t
x2=t (where
t
t
t is any real number), then the pivot variables
x
1
=
9
−
2
t
x_1 = 9 - 2t
x1=9−2t and
x
3
=
0
x_3 = 0
x3=0 are uniquely determined.
对于增广矩阵
[
1
2
0
∣
9
0
0
1
∣
0
0
0
0
∣
1
]
\begin{bmatrix} 1 & 2 & 0 & | & 9 \\ 0 & 0 & 1 & | & 0 \\ 0 & 0 & 0 & | & 1 \end{bmatrix}
100200010∣∣∣901
(已调整为行阶梯形),第 2 列为自由列,因此第 2 列对应的变量为自由变量。设该变量为
x
2
=
t
x_2 = t
x2=t(
t
t
t 为任意实数),则主元变量
x
1
=
9
−
2
t
x_1 = 9 - 2t
x1=9−2t、
x
3
=
0
x_3 = 0
x3=0 可被唯一确定。
Slack Variable(松弛变量)
Definition:
A non-negative variable introduced to convert a “less than or equal to” (
≤
\leq
≤) inequality constraint into an equality in linear programming.
在线性规划中,为将“小于等于”(
≤
\leq
≤)型不等式约束转化为等式而引入的非负变量。
Explanation:
Slack variables represent the “unused capacity” or “slack” of the resources in the constraint. Since they measure the difference between the maximum available resource (right-hand side of the inequality) and the actual resource used (left-hand side of the inequality), their values must be non-negative (i.e.,
s
≥
0
s \geq 0
s≥0).
松弛变量表示约束条件中资源的“未使用量”或“松弛量”,衡量资源最大可用量(不等式右侧)与实际使用量(不等式左侧)的差值,因此其取值必须非负(即
s
≥
0
s \geq 0
s≥0)。
Example:
In a linear programming problem with the constraint
3
x
+
2
y
≤
18
3x + 2y \leq 18
3x+2y≤18 (e.g., representing that 3 units of resource A and 2 units of resource B are used, with a maximum available total of 18 units), introduce a slack variable
s
1
≥
0
s_1 \geq 0
s1≥0 to convert the constraint into the equality
3
x
+
2
y
+
s
1
=
18
3x + 2y + s_1 = 18
3x+2y+s1=18. Here,
s
1
s_1
s1 represents the unused amount of the combined resources A and B.
在线性规划问题中,若约束条件为
3
x
+
2
y
≤
18
3x + 2y \leq 18
3x+2y≤18(例如:表示使用 3 单位资源 A 和 2 单位资源 B,资源总量最大可用 18 单位),引入松弛变量
s
1
≥
0
s_1 \geq 0
s1≥0,可将该约束转化为等式
3
x
+
2
y
+
s
1
=
18
3x + 2y + s_1 = 18
3x+2y+s1=18。其中,
s
1
s_1
s1表示资源 A 与 B 的总未使用量。
关于线性代数中的 pivot column 和 free column
建平 编辑于 2021-11-17 17:07
当对系数矩阵 A A A 施行初等行变换并完成消元后,得到的行阶梯形矩阵中,主元所在的列被称为 pivot column(主元列)。
而其余的列则被称为 free column(自由列)。自由列对应的变量 x k x_k xk 可以自由取值。
例如,在下图中, x 3 x_3 x3 和 x 4 x_4 x4 对应的列就是自由列。

线性方程组 A x = 0 Ax = 0 Ax=0 中的主元列与自由列
在线性代数中,求解齐次线性方程组 A x = 0 Ax = 0 Ax=0(其中 A A A 为 m × n m \times n m×n 矩阵, x x x 为 n n n 维列向量)是重要问题之一。矩阵 A A A 的主元列(Pivot Column) 与自由列(Free Column) 是揭示方程组解结构的关键概念,二者的定义、性质及应用需结合矩阵的行阶梯形式展开分析。
一、矩阵的行阶梯形式
在讨论主元列与自由列前,需先明确矩阵的行阶梯形式(Row Echelon Form, REF)与简化行阶梯形式(Reduced Row Echelon Form, RREF)—— 这两种形式是通过高斯消元法或高斯 - 若尔当消元法对矩阵 A A A 进行初等行变换得到的,是定义主元列与自由列的 “载体”。
行阶梯形式需满足以下条件:
- 全零行(所有元素均为 0 的行)位于矩阵底部;
- 非零行的第一个非零元素(称为主元,Pivot)的列标,严格大于其上方非零行主元的列标(即主元呈 “阶梯状” 下移)。
简化行阶梯形式是行阶梯形式的进一步优化,额外满足:
- 每个主元的值为 1;
- 主元所在列的其他元素均为 0(主元列是 “标准单位向量” 的一部分)。
无论是 REF 还是 RREF,主元的位置和数量是唯一的,这为定义主元列与自由列提供了确定性。
二、主元列(Pivot Column)
1. 定义
矩阵 A A A 的主元列,是指在其行阶梯形式(或简化行阶梯形式)中,包含主元的列。
需注意:
- 主元列是针对 “原始矩阵 A A A 的列” 而言的,而非行阶梯形式的列 —— 行阶梯形式仅用于确定 “哪一列包含主元”,最终需对应回原始矩阵 A A A 的列索引。
- 主元的数量(即主元列的数量)是固定的,与初等行变换的过程无关,这一数量称为矩阵 A A A 的秩(Rank),记为 rank ( A ) \text {rank}(A) rank(A)。
2. 性质与意义
主元列的作用是对应方程组的独立变量(Leading Variables),并反映矩阵的 “有效信息含量”,具体体现在以下三方面:
(1)对应独立变量,可直接求解
在齐次方程组 A x = 0 Ax = 0 Ax=0 中,主元列对应的变量称为独立变量(或 “主导变量”)。由于主元是行阶梯形式中非零行的第一个非零元素,每个独立变量恰好对应一个 “独立方程”—— 通过该行方程可直接用其他变量表示该独立变量(或在 RREF 中直接得到独立变量的解)。
例如:设矩阵
A
A
A 的 RREF 为
(
1
2
0
3
0
0
1
4
0
0
0
0
)
\begin {pmatrix} 1 & 2 & 0 & 3 \\ 0 & 0 & 1 & 4 \\ 0 & 0 & 0 & 0 \end {pmatrix}
100200010340
主元位于第 1 列、第 3 列,对应原始矩阵
A
A
A 的第 1 列、第 3 列为主元列,对应的变量
x
1
,
x
3
x_1, x_3
x1,x3 为独立变量。由 RREF 可直接写出:
x
1
=
−
2
x
2
−
3
x
4
,
x
3
=
−
4
x
4
x_1 = -2x_2 - 3x_4,\quad x_3 = -4x_4
x1=−2x2−3x4,x3=−4x4
其中
x
1
,
x
3
x_1, x_3
x1,x3 由其他变量表示,体现 “可直接求解” 的性质。
(2)主元列数量 = 矩阵的秩,反映 “有效信息”
矩阵的秩 rank ( A ) \text {rank}(A) rank(A) 定义为 “矩阵中线性无关列(或行)的最大数量”,而主元列恰好是矩阵 A A A 中线性无关的列 —— 因为每个主元列对应行阶梯形式中一个 “新的非零行方向”,无法由其他主元列线性表示。
因此,主元列的数量直接等于 rank ( A ) \text {rank}(A) rank(A),其本质是矩阵 A A A 中 “不含冗余信息的列的数量”,决定了方程组 A x = 0 Ax = 0 Ax=0 中 “有效方程” 的个数。
(3)全主元列(满秩)对应唯一平凡解
若矩阵 A A A 是方阵( m = n m = n m=n),且所有列均为主元列(即 rank ( A ) = n \text {rank}(A) = n rank(A)=n,称为 “满秩方阵”),则行阶梯形式中无全零行,每个变量均为独立变量,且每个独立变量对应一个唯一的解(由非零行方程唯一确定)。
对于齐次方程组 A x = 0 Ax = 0 Ax=0,此时唯一解为 x = 0 x = 0 x=0(称为 “平凡解”)。这是因为满秩方阵的行阶梯形式为上三角矩阵(主对角线元素均为主元,非零),方程组无自由变量,解唯一且为零。
三、自由列(Free Column)
1. 定义
矩阵 A A A 的自由列,是指在其行阶梯形式(或简化行阶梯形式)中,不包含主元的列。
与主元列类似,自由列也是针对原始矩阵
A
A
A 的列而言,其列索引由行阶梯形式中 “无主元的列” 确定。自由列的数量记为 “零度(Nullity)”,记为
nullity
(
A
)
\text {nullity}(A)
nullity(A),且满足秩 - 零度定理(Rank-Nullity Theorem):
rank
(
A
)
+
nullity
(
A
)
=
n
\text {rank}(A) + \text {nullity}(A) = n
rank(A)+nullity(A)=n
其中
n
n
n 为矩阵
A
A
A 的列数(即变量个数)。
2. 性质与意义
自由列的作用是对应方程组的自由变量(Free Variables),并决定方程组解的 “多样性”,具体体现在以下三方面:
(1)对应自由变量,可任意取值
自由列对应的变量称为自由变量,其本质是 “无独立方程约束的变量”—— 在行阶梯形式中,自由列所在的列无主元,因此无专门的非零行方程用于确定该变量的值,故可任意取实数(或复数,依数域而定)。
例如,在本节 “主元列” 的例子中,矩阵 A A A 的 RREF 第 2 列、第 4 列为自由列,对应变量 x 2 , x 4 x_2, x_4 x2,x4 为自由变量,可任意取值(通常记为参数,如 x 2 = s x_2 = s x2=s, x 4 = t x_4 = t x4=t,其中 s , t ∈ R s, t \in \mathbb {R} s,t∈R)。
(2)自由列存在 → 非平凡解,决定零空间维数
自由列的数量(零度 nullity ( A ) \text {nullity}(A) nullity(A))恰好是方程组 A x = 0 Ax = 0 Ax=0 解空间(称为 “零空间,Null Space”)的维数。若自由列存在(即 nullity ( A ) ≥ 1 \text {nullity}(A) \geq 1 nullity(A)≥1),则自由变量可取非零值,代入独立变量的表达式后得到非零解(称为 “非平凡解”)。
例如,上述例子中
nullity
(
A
)
=
2
\text {nullity}(A) = 2
nullity(A)=2(2 个自由列),零空间是 2 维的,方程组有无穷多非平凡解,解的形式为:
x
=
(
x
1
x
2
x
3
x
4
)
=
s
(
−
2
1
0
0
)
+
t
(
−
3
0
−
4
1
)
,
s
,
t
∈
R
x = \begin {pmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end {pmatrix} = s\begin {pmatrix} -2 \\ 1 \\ 0 \\ 0 \end {pmatrix} + t\begin {pmatrix} -3 \\ 0 \\ -4 \\ 1 \end {pmatrix}, \quad s, t \in \mathbb {R}
x=
x1x2x3x4
=s
−2100
+t
−30−41
,s,t∈R
其中两个列向量是零空间的一组基,基的个数等于自由列的数量(零度)。
(3)自由变量用于参数化通解
由于自由变量可任意取值,我们可通过 “给自由变量赋值参数” 的方式,将方程组的所有解表示为参数的线性组合,即通解(General Solution)。
通解的结构为:“独立变量的表达式(由自由变量表示)+ 自由变量的参数化”,其本质是零空间的线性组合形式 —— 每个自由变量对应零空间的一个基向量,所有解构成零空间的线性包。
四、主元列与自由列的应用:解的结构与线性相关性
主元列与自由列不仅是求解 A x = 0 Ax = 0 Ax=0 的工具,更从根本上揭示了矩阵列的线性相关性与方程组解的结构,具体体现在以下三方面:
1. 确定方程组解的结构
通过主元列与自由列,可直接判断 A x = 0 Ax = 0 Ax=0 的解的类型:
- 若 rank ( A ) = n \text {rank}(A) = n rank(A)=n(无自由列, nullity ( A ) = 0 \text {nullity}(A) = 0 nullity(A)=0):只有平凡解 x = 0 x = 0 x=0;
- 若 rank ( A ) < n \text {rank}(A) < n rank(A)<n(有自由列, nullity ( A ) ≥ 1 \text {nullity}(A) \geq 1 nullity(A)≥1):有无穷多非平凡解,通解为零空间的线性组合,基向量个数等于自由列数量。
2. 揭示矩阵列的线性相关性
- 主元列:矩阵 A A A 中线性无关的列,构成列空间(Column Space)的一组基,列空间的维数等于 rank ( A ) \text {rank}(A) rank(A);
- 自由列:矩阵 A A A 中线性相关的列,可表示为其左侧所有主元列的线性组合(因行阶梯形式中,自由列的元素对应主元列的 “组合系数”)。
例如,若矩阵 A A A 的第 2 列为自由列,其在 RREF 中的元素为 [ 2 , 0 , 0 ] T [2, 0, 0]^T [2,0,0]T(对应第 1 列主元),则原始矩阵 A A A 的第 2 列 = 2 × 2 \times 2× 第 1 列,即第 2 列可由第 1 列线性表示。
3. 简化求解过程,提升计算效率
在实际求解 A x = 0 Ax = 0 Ax=0 时,无需将矩阵化为完整的 RREF,只需化为 REF 即可快速识别主元列与自由列:
- 由 REF 确定主元位置,对应主元列与独立变量;
- 剩余列为自由列,对应自由变量;
- 对每个自由变量赋值 “单位向量”(如一个自由变量取 1,其余取 0),代入 REF 的方程求解独立变量,即可得到零空间的基,进而写出通解。
这种方法避免了冗余的初等行变换(如将主元列化为标准单位向量),显著提升计算效率,尤其适用于高阶矩阵(如 m , n > 5 m, n > 5 m,n>5)。
五、逻辑演进
主元列与自由列是连接“矩阵形式”与“方程组解结构”的重要桥梁。其逻辑演进可系统地概括为:
初等行变换 → 行阶梯形 → 主元列与自由列的识别 → 基本变量与自由变量的分类 → 解的类型(平凡/非平凡)的确定 → 通解的参数化表示
这一框架不仅有助于对单个线性系统进行系统性分析,更为线性代数中更高级的主题奠定了关键基础。例如,主元列的数量(即矩阵的秩)直接决定了线性变换的单射性和满射性;而自由列的存在则预示着非平凡零空间的存在,这对于理解特征向量和特征空间,以及二次型的性质至关重要。
在后续线性代数的学习中(如线性变换、特征值问题、二次型等),主元列与自由列的思想会进一步延伸(如通过秩判断线性变换的满射性/单射性),是构建线性代数知识体系的基础概念。
via:
-
linear algebra - what do free variable and leading variables mean?
https://math.stackexchange.com/questions/720971/what-do-free-variable-and-leading-variables-mean -
Understanding Pivot and Free Variables in Linear Programming | Senioritis
https://senioritis.io/mathematics/linear-algebra/understanding-pivot-and-free-variables-in-linear-programming/ -
What is a pivot column in a system of linear equations? • Physics Forums
https://www.physicsforums.com/threads/what-is-a-pivot-column-in-a-system-of-linear-equations.486983/ -
在读线性代数导论时书上提到了 pivot column 和 free column 二者在线代中是什么意思? - 知乎
https://www.zhihu.com/question/499489646 -
……
691

被折叠的 条评论
为什么被折叠?



