Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132934 views
License: OTHER
Kernel:
%%html <link href="https://pretextbook.org/beta/mathbook-content.css" rel="stylesheet" type="text/css" /> <link href="https://aimath.org/mathbook/mathbook-add-on.css" rel="stylesheet" type="text/css" /> <style>.subtitle {font-size:medium; display:block}</style> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic" rel="stylesheet" type="text/css" /> <link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&subset=latin,latin-ext" rel="stylesheet" type="text/css" /><!-- Hide this cell. --> <script> var cell = $(".container .cell").eq(0), ia = cell.find(".input_area") if (cell.find(".toggle-button").length == 0) { ia.after( $('<button class="toggle-button">Toggle hidden code</button>').click( function (){ ia.toggle() } ) ) ia.hide() } </script>

Important: to view this notebook properly you will need to execute the cell above, which assumes you have an Internet connection. It should already be selected, or place your cursor anywhere above to select. Then press the "Run" button in the menu bar above (the right-pointing arrowhead), or press Shift-Enter on your keyboard.

ParseError: KaTeX parse error: \newcommand{\lt} attempting to redefine \lt; use \renewcommand

Sage and Linear Algebra Worksheet: FCLA Section FS

Robert Beezer
Department of Mathematics and Computer Science
University of Puget Sound
Fall 2019
Section 1 Four Subsets

A is an 8×108\times 10 matrix.

A = matrix(QQ, [[194, -41, -899, -396, 49, 112, 874, -355, 1139, -1221], [269, -57, -1247, -549, 68, 155, 1212, -492, 1579, -1693], [16, -3, -73, -33, 4, 10, 72, -30, 95, -101], [115, -24, -532, -235, 29, 67, 518, -211, 676, -724], [ 10, 1, -37, -23, 2, 12, 44, -24, 67, -65], [-59, 13, 275, 120, -15, -33, -266, 107, -345, 371], [ 36, -7, -165, -74, 9, 22, 162, -67, 213, -227], [-20, 4, 92, 41, -5, -12, -90, 37, -118, 126]]) A

We get the extended echelon form, along with the natural subdivisions into four submatrices. We unpack the four submatrices, and stack them in pairs to also get the left and right portions.

N = A.extended_echelon_form(subdivide=True) N
C = N.subdivision(0,0) Z = N.subdivision(1,0) K = N.subdivision(0,1) L = N.subdivision(1,1)

And build two bigger pieces.

B = C.stack(Z) J = K.stack(L)
B
J
Demonstration 1.

Verify some of the properties of these matrices, as given in Theorem PEEF.

  1. Is J nonsingular?
  2. How are A, B, and J related? Observe that the matrix J effectively reproduces the net effect of a sequence of row operations that converts A to B.

Imagine the equation in the last part of the exercise, but instead replace AA by an augmented matrix of a linear system with a vector of constants b. The row operations that convert A to B, will also act on the vector of constants. Will the result be a pivot column (an inconsistent system) or a vector with zeros in all of the same rows as the zero rows of B? Equivalent question: is the vector of constants outside the column space, or within the column space?

The answer to the first question is that the zeros will occur in the proper entries to avoid a pivot column exactly if b is in the null space of the matrix L. So consistent systems come from the vectors in the null space of L, and by Theorem CSCS, we know this set of vectors is also the column space.

Demonstration 2.

Illustrate the previous discussion with a random choice of the vector b from the null space of L.

NL = L.right_kernel(basis='pivot') NL

We create an arbitrary element of the null space of L with a linear combination.

NLbasis = NL.basis()
b = *NLbasis[0] + *NLbasis[1] + *NLbasis[2] b

b will create a consistent system with A as coefficient matrix.

P = A.augment(b, subdivide=True) P.rref()

The column space of A is equal to the null space of L. This is part of Theorem FS.

CA = A.column_space() CA

Since the vector b leads to a consistent system, we know it is in the column space of A. But we can check with Sage.

b in CA

Sage relies on to represent infinite sets of vectors and to be able to test vector space equality (which seems pretty amazing at first!).

NL.echelonized_basis()
CA == NL

This work is Copyright 2016–2019 by Robert A. Beezer. It is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.