#set document(title: "9.4 Subspaces, Dimension, and The Kernel", author: "Jiří Lebl") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 9.4#h(0.6em)Subspaces, Dimension, and The Kernel === Subspaces, Basis, and Dimension We often find ourselves looking at the set of solutions of a linear equation #math.equation(block: false, alt: "L x → equals 0 →")[$L arrow(x) = arrow(0)$] for some matrix #math.equation(block: false, alt: "L")[$L$], that is, we are interested in the kernel of #math.equation(block: false, alt: "L")[$L$]. The set of all such solutions has a nice structure: It looks and acts a lot like some euclidean space #math.equation(block: false, alt: "R to the power k")[$R^(k)$]. We say that a set #math.equation(block: false, alt: "S")[$S$] of vectors in #math.equation(block: false, alt: "R to the power n")[$R^(n)$] is a #emph[subspace] if whenever #math.equation(block: false, alt: "x →")[$arrow(x)$] and #math.equation(block: false, alt: "y →")[$arrow(y)$] are members of #math.equation(block: false, alt: "S")[$S$] and #math.equation(block: false, alt: "α")[$α$] is a scalar, then #math.equation(block: true, alt: "x → plus y → , and α x →")[$arrow(x) + arrow(y) , #h(2em) "and" #h(2em) α arrow(x)$] are also members of #math.equation(block: false, alt: "S")[$S$]. That is, we can add and multiply by scalars and we still land in #math.equation(block: false, alt: "S")[$S$]. So every linear combination of vectors of #math.equation(block: false, alt: "S")[$S$] is still in #math.equation(block: false, alt: "S")[$S$]. That is really what a subspace is. It is a subset where we can take linear combinations and still end up being in the subset. Consequently the span of a number of vectors is automatically a subspace. #examplebox("Example 1")[][ If we let #math.equation(block: false, alt: "S equals R to the power n")[$S = R^(n)$], then this #math.equation(block: false, alt: "S")[$S$] is a subspace of #math.equation(block: false, alt: "R to the power n")[$R^(n)$]. Adding any two vectors in #math.equation(block: false, alt: "R to the power n")[$R^(n)$] gets a vector in #math.equation(block: false, alt: "R to the power n")[$R^(n)$], and so does multiplying by scalars. The set #math.equation(block: false, alt: "S prime equals { 0 → }")[$S^(′) = \{ arrow(0) \}$], that is, the set of the zero vector by itself, is also a subspace of #math.equation(block: false, alt: "R to the power n")[$R^(n)$]. There is only one vector in this subspace, so we only need to verify the definition for that one vector, and everything checks out: #math.equation(block: false, alt: "0 → plus 0 → equals 0 →")[$arrow(0) + arrow(0) = arrow(0)$] and #math.equation(block: false, alt: "α 0 → equals 0 →")[$α arrow(0) = arrow(0)$]. The set #math.equation(block: false, alt: "S double prime")[$S^(″)$] of all the vectors of the form #math.equation(block: false, alt: "open parenthesis a , a close parenthesis")[$( a , a )$] for any real number #math.equation(block: false, alt: "a")[$a$], such as #math.equation(block: false, alt: "open parenthesis 1 , 1 close parenthesis")[$( 1 , 1 )$], #math.equation(block: false, alt: "open parenthesis 3 , 3 close parenthesis")[$( 3 , 3 )$], or #math.equation(block: false, alt: "open parenthesis minus 0.5 , minus 0.5 close parenthesis")[$( − 0.5 , − 0.5 )$] is a subspace of #math.equation(block: false, alt: "R squared")[$R^(2)$]. Adding two such vectors, say #math.equation(block: false, alt: "open parenthesis 1 , 1 close parenthesis plus open parenthesis 3 , 3 close parenthesis equals open parenthesis 4 , 4 close parenthesis")[$( 1 , 1 ) + ( 3 , 3 ) = ( 4 , 4 )$] again gets a vector of the same form, and so does multiplying by a scalar, say #math.equation(block: false, alt: "8 open parenthesis 1 , 1 close parenthesis equals open parenthesis 8 , 8 close parenthesis")[$8 ( 1 , 1 ) = ( 8 , 8 )$]. ] If #math.equation(block: false, alt: "S")[$S$] is a subspace and we can find #math.equation(block: false, alt: "k")[$k$] linearly independent vectors in #math.equation(block: false, alt: "S")[$S$] #math.equation(block: true, alt: "v → sub 1 , v → sub 2 , … , v → sub k ,")[$arrow(v)_(1) , arrow(v)_(2) , … , arrow(v)_(k) ,$] such that every other vector in #math.equation(block: false, alt: "S")[$S$] is a linear combination of #math.equation(block: false, alt: "v → sub 1 , v → sub 2 , … , v → sub k")[$arrow(v)_(1) , arrow(v)_(2) , … , arrow(v)_(k)$], then the set #math.equation(block: false, alt: "{ v → sub 1 , v → sub 2 , … , v → sub k }")[$\{ arrow(v)_(1) , arrow(v)_(2) , … , arrow(v)_(k) \}$] is called a #emph[basis] of #math.equation(block: false, alt: "S")[$S$]. In other words, #math.equation(block: false, alt: "S")[$S$] is the span of #math.equation(block: false, alt: "{ v → sub 1 , v → sub 2 , … , v → sub k }")[$\{ arrow(v)_(1) , arrow(v)_(2) , … , arrow(v)_(k) \}$]. We say that #math.equation(block: false, alt: "S")[$S$] has dimension #math.equation(block: false, alt: "k")[$k$], and we write #math.equation(block: true, alt: "dim S equals k .")[$dim S = k .$] #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ If #math.equation(block: false, alt: "S ⊂ R to the power n")[$S ⊂ R^(n)$] is a subspace and #math.equation(block: false, alt: "S")[$S$] is not the trivial subspace #math.equation(block: false, alt: "{ 0 → }")[$\{ arrow(0) \}$], then there exists a unique positive integer #math.equation(block: false, alt: "k")[$k$] (the dimension) and a (not unique) basis #math.equation(block: false, alt: "{ v → sub 1 , v → sub 2 , … , v → sub k }")[$\{ arrow(v)_(1) , arrow(v)_(2) , … , arrow(v)_(k) \}$], such that every #math.equation(block: false, alt: "w →")[$arrow(w)$] in #math.equation(block: false, alt: "S")[$S$] can be uniquely represented by #math.equation(block: true, alt: "w → equals α sub 1 v → sub 1 plus α sub 2 v → sub 2 plus ⋯ plus α sub k v → sub k ,")[$arrow(w) = α_(1) arrow(v)_(1) + α_(2) arrow(v)_(2) + ⋯ + α_(k) arrow(v)_(k) ,$] for some scalars #math.equation(block: false, alt: "α sub 1")[$α_(1)$], #math.equation(block: false, alt: "α sub 2")[$α_(2)$], …, #math.equation(block: false, alt: "α sub k")[$α_(k)$]. ] Just as a vector in #math.equation(block: false, alt: "R to the power k")[$R^(k)$] is represented by a #math.equation(block: false, alt: "k")[$k$]-tuple of numbers, so is a vector in a #math.equation(block: false, alt: "k")[$k$]-dimensional subspace of #math.equation(block: false, alt: "R to the power n")[$R^(n)$] represented by a #math.equation(block: false, alt: "k")[$k$]-tuple of numbers. At least once we have fixed a basis. A different basis would give a different #math.equation(block: false, alt: "k")[$k$]-tuple of numbers for the same vector. We should reiterate that while #math.equation(block: false, alt: "k")[$k$] is unique (a subspace cannot have two different dimensions), the set of basis vectors is not at all unique. There are lots of different bases for any given subspace. Finding just the right basis for a subspace is a large part of what one does in linear algebra. In fact, that is what we spend a lot of time on in linear differential equations, although at first glance it may not seem like that is what we are doing. #examplebox("Example 2")[][ The standard basis #math.equation(block: true, alt: "e → sub 1 , e → sub 2 , … , e → sub n ,")[$arrow(e)_(1) , arrow(e)_(2) , … , arrow(e)_(n) ,$] is a basis of #math.equation(block: false, alt: "R to the power n")[$R^(n)$], (hence the name). So as expected #math.equation(block: true, alt: "dim R to the power n equals n .")[$dim R^(n) = n .$] On the other hand the subspace #math.equation(block: false, alt: "{ 0 → }")[$\{ arrow(0) \}$] is of dimension #math.equation(block: false, alt: "0")[$0$]. The subspace #math.equation(block: false, alt: "S double prime")[$S^(″)$] from Example #math.equation(block: false, alt: "1")[$1$], that is, the set of vectors #math.equation(block: false, alt: "open parenthesis a , a close parenthesis")[$( a , a )$], is of dimension 1. One possible basis is simply #math.equation(block: false, alt: "{ open parenthesis 1 , 1 close parenthesis }")[$\{ ( 1 , 1 ) \}$], the single vector #math.equation(block: false, alt: "open parenthesis 1 , 1 close parenthesis")[$( 1 , 1 )$]: every vector in #math.equation(block: false, alt: "S double prime")[$S^(″)$] can be represented by #math.equation(block: false, alt: "a open parenthesis 1 , 1 close parenthesis equals open parenthesis a , a close parenthesis")[$a ( 1 , 1 ) = ( a , a )$]. Similarly another possible basis would be #math.equation(block: false, alt: "{ open parenthesis minus 1 , minus 1 close parenthesis }")[$\{ ( − 1 , − 1 ) \}$]. Then the vector #math.equation(block: false, alt: "open parenthesis a , a close parenthesis")[$( a , a )$] would be represented as #math.equation(block: false, alt: "open parenthesis minus a close parenthesis open parenthesis 1 , 1 close parenthesis")[$( − a ) ( 1 , 1 )$]. ] Row and column spaces of a matrix are also examples of subspaces, as they are given as the span of vectors. We can use what we know about rank, row spaces, and column spaces from the previous section to find a basis. #examplebox("Example 3")[][ In the last section, we considered the matrix #math.equation(block: true, alt: "A equals [ 1, 2, 3, 4; 2, 4, 5, 6; 3, 6, 7, 8 ] .")[$A = [ 1 & 2 & 3 & 4 \ 2 & 4 & 5 & 6 \ 3 & 6 & 7 & 8 ] .$] Using row reduction to find the pivot columns, we found #math.equation(block: true, alt: "column space of A open parenthesis [ 1, 2, 3, 4; 2, 4, 5, 6; 3, 6, 7, 8 ] close parenthesis equals span { [ 1; 2; 3 ] , [ 3; 5; 7 ] } .")[$"column space of " A ( [ 1 & 2 & 3 & 4 \ 2 & 4 & 5 & 6 \ 3 & 6 & 7 & 8 ] ) = op("span") \{ [ 1 \ 2 \ 3 ] , [ 3 \ 5 \ 7 ] \} .$] What we did was we found the basis of the column space. The basis has two elements, and so the column space of #math.equation(block: false, alt: "A")[$A$] is two dimensional. Notice that the rank of #math.equation(block: false, alt: "A")[$A$] is two. ] We would have followed the same procedure if we wanted to find the basis of the subspace #math.equation(block: false, alt: "X")[$X$] spanned by #math.equation(block: true, alt: "[ 1; 2; 3 ] , [ 2; 4; 6 ] , [ 3; 5; 7 ] , [ 4; 6; 8 ] .")[$[ 1 \ 2 \ 3 ] , [ 2 \ 4 \ 6 ] , [ 3 \ 5 \ 7 ] , [ 4 \ 6 \ 8 ] .$] We would have simply formed the matrix #math.equation(block: false, alt: "A")[$A$] with these vectors as columns and repeated the computation above. The subspace #math.equation(block: false, alt: "X")[$X$] is then the column space of #math.equation(block: false, alt: "A")[$A$]. #examplebox("Example 4")[][ Consider the matrix #math.equation(block: true, alt: "L equals [ 1, 2, 0, 0, 3; 0, 0, 1, 0, 4; 0, 0, 0, 1, 5 ] .")[$L = [ 1 & 2 & 0 & 0 & 3 \ 0 & 0 & 1 & 0 & 4 \ 0 & 0 & 0 & 1 & 5 ] .$] Conveniently, the matrix is in reduced row echelon form. The matrix is of rank 3. The column space is the span of the pivot columns. It is the 3-dimensional space #math.equation(block: true, alt: "column space of L equals span { [ 1; 0; 0 ] , [ 0; 1; 0 ] , [ 0; 0; 1 ] } equals ℝ cubed .")[$"column space of " L = op("span") \{ [ 1 \ 0 \ 0 ] , [ 0 \ 1 \ 0 ] , [ 0 \ 0 \ 1 ] \} = ℝ^(3) .$] The row space is the 3-dimensional space #math.equation(block: true, alt: "row space of L equals span { [ 1, 2, 0, 0, 3 ] , [ 0, 0, 1, 0, 4 ] , [ 0, 0, 0, 1, 5 ] } .")[$"row space of " L = op("span") \{ [ 1 & 2 & 0 & 0 & 3 ] , [ 0 & 0 & 1 & 0 & 4 ] , [ 0 & 0 & 0 & 1 & 5 ] \} .$] As these vectors have 5 components, we think of the row space of #math.equation(block: false, alt: "L")[$L$] as a subspace of #math.equation(block: false, alt: "ℝ to the power 5")[$ℝ^(5)$]. ] The way the dimensions worked out in the examples is not an accident. Since the number of vectors that we needed to take was always the same as the number of pivots, and the number of pivots is the rank, we get the following result. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #strong[Rank] The dimension of the column space and the dimension of the row space of a matrix #math.equation(block: false, alt: "A")[$A$] are both equal to the rank of #math.equation(block: false, alt: "A")[$A$]. ] === Kernel The set of solutions of a linear equation #math.equation(block: false, alt: "L x → equals 0 →")[$L arrow(x) = arrow(0)$], the kernel of #math.equation(block: false, alt: "L")[$L$], is a subspace: If #math.equation(block: false, alt: "x →")[$arrow(x)$] and #math.equation(block: false, alt: "y →")[$arrow(y)$] are solutions, then #math.equation(block: true, alt: "L open parenthesis x → plus y → close parenthesis equals L x → plus L y → equals 0 → plus 0 → equals 0 → , and L open parenthesis α x → close parenthesis equals α L x → equals α 0 → equals 0 → .")[$L ( arrow(x) + arrow(y) ) = L arrow(x) + L arrow(y) = arrow(0) + arrow(0) = arrow(0) , #h(2em) "and" #h(2em) L ( α arrow(x) ) = α L arrow(x) = α arrow(0) = arrow(0) .$] So #math.equation(block: false, alt: "x → plus y →")[$arrow(x) + arrow(y)$] and #math.equation(block: false, alt: "α x →")[$α arrow(x)$] are solutions. The dimension of the kernel is called the #emph[nullity] of the matrix. The same sort of idea governs the solutions of linear differential equations. We try to describe the kernel of a linear differential operator, and as it is a subspace, we look for a basis of this kernel. Much of this book is dedicated to finding such bases. The kernel of a matrix is the same as the kernel of its reduced row echelon form. For a matrix in reduced row echelon form, the kernel is rather easy to find. If a vector #math.equation(block: false, alt: "x →")[$arrow(x)$] is applied to a matrix #math.equation(block: false, alt: "L")[$L$], then each entry in #math.equation(block: false, alt: "x →")[$arrow(x)$] corresponds to a column of #math.equation(block: false, alt: "L")[$L$], the column that the entry multiplies. To find the kernel, pick a non-pivot column make a vector that has a #math.equation(block: false, alt: "minus 1")[$− 1$] in the entry corresponding to this non-pivot column and zeros at all the other entries corresponding to the other non-pivot columns. Then for all the entries corresponding to pivot columns make it precisely the value in the corresponding row of the non-pivot column to make the vector be a solution to #math.equation(block: false, alt: "L x → equals 0 →")[$L arrow(x) = arrow(0)$]. This procedure is best understood by example. #examplebox("Example 5")[][ Consider #math.equation(block: true, alt: "L equals [ 1, 2, 0, 0, 3; 0, 0, 1, 0, 4; 0, 0, 0, 1, 5 ] .")[$L = [ #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"1"$] & 2 & 0 & 0 & 3 \ 0 & 0 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"1"$] & 0 & 4 \ 0 & 0 & 0 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"1"$] & 5 ] .$] This matrix is in reduced row echelon form, the pivots are marked. There are two non-pivot columns, so the kernel has dimension 2, that is, it is the span of 2 vectors. Let us find the first vector. We look at the first non-pivot column, the #math.equation(block: false, alt: "2 to the power nd")[$2^("nd")$] column, and we put a #math.equation(block: false, alt: "minus 1")[$− 1$] in the #math.equation(block: false, alt: "2 to the power nd")[$2^("nd")$] entry of our vector. We put a #math.equation(block: false, alt: "0")[$0$] in the #math.equation(block: false, alt: "5 to the power th")[$5^("th")$] entry as the #math.equation(block: false, alt: "5 to the power th")[$5^("th")$] column is also a non-pivot column: #math.equation(block: true, alt: "[ ?; minus 1; ?; ?; 0 ] .")[$[ ? \ − 1 \ ? \ ? \ 0 ] .$] Let us fill the rest. When this vector hits the first row, we get a #math.equation(block: false, alt: "minus 2")[$− 2$] and #math.equation(block: false, alt: "1")[$1$] times whatever the first question mark is. So make the first question mark #math.equation(block: false, alt: "2")[$2$]. For the second and third rows, it is sufficient to make it the question marks zero. We are really filling in the non-pivot column into the remaining entries. Let us check while marking which numbers went where: #math.equation(block: true, alt: "[ 1, 2, 0, 0, 3; 0, 0, 1, 0, 4; 0, 0, 0, 1, 5 ] [ 2; minus 1; 0; 0; 0 ] equals [ 0; 0; 0 ] .")[$[ 1 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"2"$] & 0 & 0 & 3 \ 0 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"0"$] & 1 & 0 & 4 \ 0 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"0"$] & 0 & 1 & 5 ] [ #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"2"$] \ − 1 \ #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"0"$] \ #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"0"$] \ 0 ] = [ 0 \ 0 \ 0 ] .$] Yay! How about the second vector. We start with #math.equation(block: true, alt: "[ ?; 0; ?; ?; minus 1 . ]")[$[ ? \ 0 \ ? \ ? \ − 1 . ]$] We set the first question mark to 3, the second to 4, and the third to 5. Let us check, marking things as previously, #math.equation(block: true, alt: "[ 1, 2, 0, 0, 3; 0, 0, 1, 0, 4; 0, 0, 0, 1, 5 ] [ 3; 0; 4; 5; minus 1 ] equals [ 0; 0; 0 ] .")[$[ 1 & 2 & 0 & 0 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"3"$] \ 0 & 0 & 1 & 0 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"4"$] \ 0 & 0 & 0 & 1 & #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"5"$] ] [ #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"3"$] \ 0 \ #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"4"$] \ #box(stroke: 0.6pt, inset: 3pt, outset: 0pt)[$"5"$] \ − 1 ] = [ 0 \ 0 \ 0 ] .$] There are two non-pivot columns, so we only need two vectors. We have found the basis of the kernel. So, #math.equation(block: true, alt: "kernel of L equals span { [ 2; minus 1; 0; 0; 0 ] , [ 3; 0; 4; 5; minus 1 ] }")[$"kernel of " L = op("span") \{ [ 2 \ − 1 \ 0 \ 0 \ 0 ] , [ 3 \ 0 \ 4 \ 5 \ − 1 ] \}$] ] What we did in finding a basis of the kernel is we expressed all solutions of #math.equation(block: false, alt: "L x → equals 0 →")[$L arrow(x) = arrow(0)$] as a linear combination of some given vectors. The procedure to find the basis of the kernel of a matrix #math.equation(block: false, alt: "L")[$L$]: + Find the reduced row echelon form of #math.equation(block: false, alt: "L")[$L$]. + Write down the basis of the kernel as above, one vector for each non-pivot column. The rank of a matrix is the dimension of the column space, and that is the span on the pivot columns, while the kernel is the span of vectors one for each non-pivot column. So the two numbers must add to the number of columns. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #strong[Rank-Nullity] If a matrix #math.equation(block: false, alt: "A")[$A$] has #math.equation(block: false, alt: "n")[$n$] columns, rank #math.equation(block: false, alt: "r")[$r$], and nullity #math.equation(block: false, alt: "k")[$k$] (dimension of the kernel), then #math.equation(block: true, alt: "n equals r plus k .")[$n = r + k .$] ] The theorem is immensely useful in applications. It allows one to compute the rank #math.equation(block: false, alt: "r")[$r$] if one knows the nullity #math.equation(block: false, alt: "k")[$k$] and vice versa, without doing any extra work. Let us consider an example application, a simple version of the so-called #emph[Fredholm alternative]. A similar result is true for differential equations. Consider #math.equation(block: true, alt: "A x → equals b → ,")[$A arrow(x) = arrow(b) ,$] where #math.equation(block: false, alt: "A")[$A$] is a square #math.equation(block: false, alt: "n times n")[$n × n$] matrix. There are then two mutually exclusive possibilities: + A nonzero solution #math.equation(block: false, alt: "x →")[$arrow(x)$] to #math.equation(block: false, alt: "A x → equals 0 →")[$A arrow(x) = arrow(0)$] exists. + The equation #math.equation(block: false, alt: "A x → equals b →")[$A arrow(x) = arrow(b)$] has a unique solution #math.equation(block: false, alt: "x →")[$arrow(x)$] for every #math.equation(block: false, alt: "b →")[$arrow(b)$]. How does the Rank–Nullity theorem come into the picture? Well, if #math.equation(block: false, alt: "A")[$A$] has a nonzero solution #math.equation(block: false, alt: "x →")[$arrow(x)$] to #math.equation(block: false, alt: "A x → equals 0 →")[$A arrow(x) = arrow(0)$], then the nullity #math.equation(block: false, alt: "k")[$k$] is positive. But then the rank #math.equation(block: false, alt: "r equals n minus k")[$r = n − k$] must be less than #math.equation(block: false, alt: "n")[$n$]. It means that the column space of #math.equation(block: false, alt: "A")[$A$] is of dimension less than #math.equation(block: false, alt: "n")[$n$], so it is a subspace that does not include everything in #math.equation(block: false, alt: "ℝ to the power n")[$ℝ^(n)$]. So #math.equation(block: false, alt: "ℝ to the power n")[$ℝ^(n)$] has to contain some vector #math.equation(block: false, alt: "b →")[$arrow(b)$] not in the column space of #math.equation(block: false, alt: "A")[$A$]. In fact, most vectors in #math.equation(block: false, alt: "ℝ to the power n")[$ℝ^(n)$] are not in the column space of #math.equation(block: false, alt: "A")[$A$].