Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132939 views
License: OTHER
%auto %html(hide=True) <div class="mathbook-content"> <link rel="stylesheet" type="text/css" href="http://buzzard.ups.edu/mathbook-content.css"> <link rel="stylesheet" type="text/css" href="https://aimath.org/mathbook/mathbook-add-on.css"> </div>
%auto %html(hide=True) <div class="mathbook-content"><div class="hidden-content" style="display:none">\( \newcommand{\lt}{&lt;} \newcommand{\gt}{&gt;} \newcommand{\amp}{&amp;} \)</div></div>
%auto %html(hide=True) <div class="mathbook-content"><table width="90%" style="font-size: 200%;"><tr></tr></table></div>
%auto %html(hide=True) <div class="mathbook-content"><section class="article" id="IVLT"></section></div>
%auto %html(hide=True) <div class="mathbook-content"><section class="frontmatter" id="frontmatter-1"></section></div>
%auto %html(hide=True) <div class="mathbook-content"> <h2 class="heading"> <span class="title">Sage and Linear Algebra Worksheet:</span> <span class="subtitle">FCLA Section IVLT</span> </h2> <div class="author"> <div class="author-name">Robert Beezer</div> <div class="author-info">Department of Mathematics and Computer Science<br>University of Puget Sound</div> </div> <div class="date">Fall 2019</div> </div>
%auto %html(hide=True) <div class="mathbook-content"><section class="section" id="section-1"><h6 class="heading hide-type"> <span class="type">Section</span> <span class="codenumber">1</span> <span class="title">Invertible Linear Transformations</span> </h6></section></div>
%auto %html(hide=True) <div class="mathbook-content"><p id="p-1">A carefully-crafted invertible linear transformation from \(\mathbb{Q}^5\) to \(\mathbb{Q}^5\text{.}\)</p></div>
A = matrix(QQ, [[1, 1, -1, -2, 0], [-3, -2, 1, 4, 7], [2, 2, -1, -3, -4], [-4, -3, 3, 8, 3], [5, 6, -7, -8, 8]]) T = linear_transformation(QQ^5, QQ^5, A, side='right') T
T.is_injective(), T.is_surjective()
T.is_invertible()
S = T.inverse() S
%auto %html(hide=True) <div class="mathbook-content"><p id="p-2">The <code class="code-inline tex2jax_ignore">*</code> operator, like we would use for multiplication, will create a composition. This will be perfectly natural once we discuss Section MR. Here, composing an invertible linear transformation with its inverse will yield an identity linear transformation.</p></div>
comp = S*T comp
comp.is_identity()
%auto %html(hide=True) <div class="mathbook-content"><section class="section" id="section-2"><h6 class="heading hide-type"> <span class="type">Section</span> <span class="codenumber">2</span> <span class="title">Defining an Invertible Linear Transformation on Bases</span> </h6></section></div>
%auto %html(hide=True) <div class="mathbook-content"><p id="p-3">Now, an invertible linear transformation defined on a basis, and the resulting inverse linear transformation. We get two “random” bases of \(\mathbb{Q}^7\) from nonsingular (determinant one) matrices.</p></div>
C = random_matrix(QQ, 7, 7, algorithm='unimodular', upper_bound=99) Cbasis = C.columns() D = random_matrix(QQ, 7, 7, algorithm='unimodular', upper_bound=99) Dbasis = D.columns()
%auto %html(hide=True) <div class="mathbook-content"><p id="p-4">Vector spaces with defined user bases.</p></div>
Cspace = (QQ^7).subspace_with_basis(Cbasis) Dspace = (QQ^7).subspace_with_basis(Dbasis) Cspace, Dspace
%auto %html(hide=True) <div class="mathbook-content"><p id="p-5">The invertible linear transformation defined with images as the vectors in the codomain basis <code class="code-inline tex2jax_ignore">D</code>.</p></div>
T = linear_transformation(Cspace, QQ^7, Dbasis) T
T.is_invertible()
%auto %html(hide=True) <div class="mathbook-content"><p id="p-6">Now we simply “turn around” the definition, to make the inverse.</p></div>
S = linear_transformation(Dspace, QQ^7, Cbasis) S
S.is_invertible()
%auto %html(hide=True) <div class="mathbook-content"><p id="p-7">Composition with vector spaces using different bases does not seem to be working properly. So we just check some random inputs to the composition.</p></div>
comp = S*T comp.is_identity()
v = random_vector(QQ, 7) v, T(S(v)) == v, S(T(v)) == v
%auto %html(hide=True) <div class="mathbook-content"><section class="section" id="section-3"><h6 class="heading hide-type"> <span class="type">Section</span> <span class="codenumber">3</span> <span class="title">Rank and Nullity</span> </h6></section></div>
%auto %html(hide=True) <div class="mathbook-content"><p id="p-8">A general (i.e. not invertible) linear transformation from \(\mathbb{Q}^6\) to \(\mathbb{Q}^5\text{.}\)</p></div>
F = matrix(QQ, [[1, 0, 2, -1, -4, 2], [-1, -1, -4, 3, 6, -5], [0, 1, 3, -2, -4, 5], [0, 4, 6, -8, -4, 8], [0, 1, 2, -2, -2, 3]]) R = linear_transformation(QQ^6, QQ^5, F, side='right') R
%auto %html(hide=True) <div class="mathbook-content"><p id="p-9">Rank is dimension of range (image). Note there are not left/right variants.</p></div>
R.image()
R.rank()
%auto %html(hide=True) <div class="mathbook-content"><p id="p-10">Nullity is dimension of kernel. Note there are not left/right variants.</p></div>
R.kernel()
R.nullity()
%auto %html(hide=True) <div class="mathbook-content"><p id="p-11">Note that rank and nullity sum to the dimension of the domain (which is \(6\) here).</p></div>
%auto %html(hide=True) <div class="mathbook-content"><article class="conclusion" id="conclusion-1"><h5 class="heading"><span></span></h5></article></div>
%auto %html(hide=True) <div class="mathbook-content"><p id="p-12">This work is Copyright 2016–2019 by Robert A. Beezer. It is licensed under a <a class="external" href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p></div>
%auto %html(hide=True) <div class="mathbook-content"><table width="90%" style="font-size: 200%;"><tr></tr></table></div>