Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

preface

Hello! Friend!!!

Thank you very much for reading haihong’s article, if there are any mistakes in the article, please point out ~

 

Self-introduction ଘ(੭, ᵕ)੭

Nickname: Haihong

Tag: programmer monkey | C++ contestant | student

Introduction: because of C language to get acquainted with programming, then transferred to the computer major, had the honor to get some national awards, provincial awards… Has been confirmed. Currently learning C++/Linux/Python

Learning experience: solid foundation + more notes + more code + more thinking + learn English well!

 

Machine learning little White stage

The article is only used as my own study notes for the establishment of knowledge system and review

Know what is, know why!

If the view mathematical formula is incomplete or display error

You can view: MML Learning Notes (12) : the rank of vector groups

4.3 Rank of vector groups

Define 5

Let’s say the vector group AAA, if RRR vectors a1, A2… ,ara_1,a_2,… ,a_ra1,a2,… , ar, meet

  • Vector set A0, a1, a2,… ,arA_0:a_1,a_2,… ,a_rA0:a1,a2,… Ar is linearly independent
  • Any r+1r+1r+1 vector in the vector group AAA (in the case of r+1r+1r+1 vector) is linearly dependent

Let A0A_0A0 be A maximum linearly independent vector group of vector group AAA, referred to as the maximum independent group, where the number of vectors contained in the maximum independent group RRR is called the rank of vector group AAA, denoted as R(A)R(A)R(A)

Note0: A vector group containing only the zero vector has no maximal independent group and its rank is specified to be 0 Note1: The maximal independent group of a vector group is generally not unique

Theorem 6

The rank of a matrix is equal to the rank of its column vector group, and is equal to the rank of its row vector group

Corollary (Equivalent definition of maximum independent group)

Let the vector group A0: A1, A2,.. ,arA_0:a_1,a_2,.. ,a_rA0:a1,a2,.. ,ar is a partial group of vector group AAA, and satisfies

  • The set of vectors A0A_0A0 is linearly independent
  • Any member of the vector group AAA can be linearly represented by the vector group A0A_0A0

So the vector group A0A_0A0 is the largest independent group of the vector group AAA

For example,

Example 9

Odd linear equations set {x1 + x2 + 2 x3-2 x4 = 02 x1 + x2-3 x4 = 0 x1 – x2 x3-5 + 7 x4 = 0 \ begin {cases} x_1 + 2 x_2 + x_3-2 x_4 = 0 \ \ 2 + 3 x_2 x_1 – x_4 = 0 \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ⎪⎪⎨⎪⎪⎧x1+2×2+x3−2×4=02×1+3×2−x4=0x1−x2−5×3+7×4=0 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

answer

Let’s call the coefficient matrix AAA


A = [ 1 2 1 2 2 3 0 1 1 1 5 7 ] A=\begin{bmatrix} 1 & 2 & 1 & -2\\ 2 & 3 & 0 & -1\\ 1 & -1 & -5 & 7 \end{bmatrix}

Jane, too

get


{ x 1 3 x 3 + 4 x 4 = 0 x 2 + 2 x 3 3 x 4 = 0 \begin{cases} x_1 – 3x_3+4x_4=0\\ x_2+2x_3-3x_4=0\\ \end{cases}

transpose


{ x 1 = 3 x 3 4 x 4 x 2 = 2 x 3 + 3 x 4 \begin{cases} x_1 = 3x_3-4x_4\\ x_2=-2x_3+3x_4 \end{cases}

The x3 = c1, x4 = c2x_3 = c_1, x_4 = c_2x3 = c1, x4 = c2


{ x 1 = 3 c 1 4 c 2 x 2 = 2 c 1 + 3 c 2 x 3 = c 1 x 4 = c 2 \begin{cases} x_1 = 3c_1-4c_2\\ x_2=-2c_1+3c_2\\ x_3=c_1\\ x_4=c_2 \end{cases}

General solution for


x = [ x 1 x 2 x 3 x 4 ] = c 1 [ 3 2 1 0 ] + c 2 [ 4 3 0 1 ] x=\begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4 \end{bmatrix}=c_1\begin{bmatrix} 3\\ -2\\ 1\\ 0 \end{bmatrix}+c_2\begin{bmatrix} -4\\ 3\\ 0\\ 1 \end{bmatrix}

make


zeta 1 = [ 3 2 1 0 ] . zeta 2 = [ 4 3 0 1 ] \zeta_1=\begin{bmatrix} 3\\ -2\\ 1\\ 0 \end{bmatrix},\zeta_2=\begin{bmatrix} -4\\ 3\\ 0\\ 1 \end{bmatrix}

There are


x = c 1 zeta 1 + c 2 zeta 2 x=c_1\zeta_1+c_2\zeta_2

The solution space SSS is obtained


S = { x = c 1 zeta 1 + c 2 zeta 2 | c 1 . c 2 R } S=\{x=c_1\zeta_1 + c_2\zeta_2 | c_1,c_2 \in R \}

The results show that SSS can be linearly expressed by vector groups ζ1,ζ2\zeta_1,\zeta_2ζ1,ζ2

Obviously, zeta 1, 2 \ zeta_1 zeta, \ zeta_2 zeta 1, zeta 2 out of proportion, zeta 1, 2 \ zeta_1 zeta, \ zeta_2 zeta 1, zeta 2 linear independence

Therefore,ζ 1,ζ2\zeta_1,\zeta_2ζ1,ζ2 is the largest independent group of SSS


R ( S ) = 2 R(S)=2

Example 11

A matrix


A = [ 2 1 1 1 2 1 1 2 1 4 4 6 2 2 4 3 6 9 7 9 ] A=\begin{bmatrix} 2 & -1 & -1 & 1 & 2\\ 1 & 1 & -2 & 1 & 4\\ 4 & -6 & 2 & -2 & 4\\ 3 & 6 & -9 & 7 & 9\\ \end{bmatrix}

Find a maximal independent group of column vectors of matrix AAA, and express the column vectors that do not belong to the maximal independent group linearly by maximal independent group

answer


A = [ 2 1 1 1 2 1 1 2 1 4 4 6 2 2 4 3 6 9 7 9 ] …… [ 1 1 2 1 4 2 1 1 1 2 2 3 1 1 2 3 6 9 7 9 ] ( r 1 r 2 . r 3 / 2 ) A=\begin{bmatrix} 2 & – 1& -1 & 1 & 2\\ 1 & 1 & -2 & 1 & 4\\ 4 & -6 & 2 & -2 & 4\\ 3 & 6 & -9 & 7 & 9 \end{bmatrix} \sim\begin{bmatrix} 1 & 1 & -2 & 1 & 4\\ 2 &-1 &-1 &1 &2\\ 2 &-3 &1 &-1& 2\\ 3& 6& -9& 7 &9 \end{bmatrix}(r_1 \leftrightarrow r_2,r_3/2)

…… [ 1 1 2 1 4 0 2 2 2 0 0 5 5 3 6 0 3 3 4 3 ] ( r 2 r 3 . r 3 2 r 1 . r 4 3 r 1 ) …… [ 1 1 2 1 4 0 1 1 1 0 0 0 0 2 6 0 0 0 1 3 ] ( r 2 / 2 . r 3 + 5 r 2 . r 4 3 r 2 ) \sim\begin{bmatrix} 1 &1& -2 &1& 4\\ 0& 2 &-2& 2 &0\\ 0 &-5& 5 &-3& -6\\ 0& 3 &-3 &4 &-3\\ \end{bmatrix}(r_2-r_3,r_3-2r_1,r_4-3r_1) \sim\begin{bmatrix} 1 &1& -2 &1& 4\\ 0& 1 &-1& 1 &0\\ 0 &0&0 &2& -6\\ 0& 0 &0 &1 &-3\\ \end{bmatrix}(r_2/2,r_3 + 5r_2,r_4-3r_2)

…… [ 1 1 2 1 4 0 1 1 1 0 0 0 0 1 3 0 0 0 0 0 ] ( r 3 r 4 . r 4 2 r 3 ) …… [ 1 0 1 0 4 0 1 1 0 3 0 0 0 1 3 0 0 0 0 0 ] ( r 1 r 2 ) \sim\begin{bmatrix} 1 &1& -2 &1& 4\\ 0& 1 &-1& 1 &0\\ 0 &0&0 &1& -3\\ 0& 0 &0 &0 &0\\ \end{bmatrix}(r_3\leftrightarrow r_4,r_4-2r_3)\sim\begin{bmatrix} 1 &0& -1 &0& 4\\ 0& 1 &-1& 0 &3\\ 0 &0&0 &1& -3\\ 0& 0 &0 &0 &0\\ \end{bmatrix}(r_1-r_2)

known


R ( A ) = 3 R(A)=3

So the maximum independent set of AAA has three vectors in the 1,2,4 columns (a1,a2,a4)(a_1,a_2,a_4)(a1,a2,a4)

From the row minima matrix


a 3 = [ 1 1 0 0 ] = ( 1 ) [ 1 0 0 0 ] + ( 1 ) [ 0 1 0 0 ] = a 1 a 2 a_3=\begin{bmatrix} -1\\ -1\\ 0\\ 0 \end{bmatrix}=(-1)\begin{bmatrix} 1\\ 0\\ 0\\ 0 \end{bmatrix}+(-1)\begin{bmatrix} 0\\ 1\\ 0\\ 0 \end{bmatrix}=-a_1-a_2

The same can be


a 5 = 4 a 1 + 3 a 2 3 a 4 a_5=4a_1+3a_2-3a_4

To sum up


{ a 3 = a 1 a 2 a 5 = 4 a 1 + 3 a 2 3 a 4 \begin{cases} a_3=-a_1-a_2\\ a_5=4a_1+3a_2-3a_4 \end{cases}

conclusion

Description:

  • Refer to textbook “linear algebra” fifth edition tongji University mathematics department
  • With the book concept explanation combined with some of their own understanding and thinking

The essay is just a study note, recording a process from 0 to 1

Hope to help you, if there is a mistake welcome small partners to correct ~

I am haihong ଘ(੭, ᵕ)੭

If you think it’s ok, please give it a thumbs up

Thanks for your support ❤️