Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132935 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="RREF"></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 RREF</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"><p id="p-1">To specify a matrix, first specify that your entries are rational numbers, <code class="code-inline tex2jax_ignore">QQ</code> in Sage parlance. This is extremely important, though an explanation is best saved for later. Then the number of rows and columns. Follow this with a list of rows for the matrix, where each row is another list. We use square brackets, <code class="code-inline tex2jax_ignore">[, ]</code> to organize lists. To actually see <code class="code-inline tex2jax_ignore">A</code> we just write it as the last line.</p></div>
A = matrix(QQ, 3, 4, [[-1, 1, 1, 1], [ 2, -1, -2, -3], [-2, 2, 1, -1]]) A
%auto %html(hide=True) <div class="mathbook-content"><p id="p-2">Then use the <code class="code-inline tex2jax_ignore">.rref()</code> method to compute the reduced row-echelon form.</p></div>
%auto %html(hide=True) <div class="mathbook-content"><article class="exercise-like" id="exercise-1"><h6 class="heading"> <span class="type">Demonstration</span> <span class="codenumber">1</span>.</h6> <p id="p-3">Use a new cell, enter <code class="code-inline tex2jax_ignore">A.rref()</code>, and execute the cell.</p></article></div>
%auto %html(hide=True) <div class="mathbook-content"><p id="p-4">Here is a larger example.</p></div>
B = matrix(QQ, [[ 0, 0, -1, 3, 3, -1, 2, -1], [ 1, -5, 0, -4, 5, -2, 4, 4], [-1, 5, -1, 7, -2, 2, -5, -7], [-1, 5, 1, 1, -8, 3, -6, -3]]) B
%auto %html(hide=True) <div class="mathbook-content"><article class="exercise-like" id="exercise-2"><h6 class="heading"> <span class="type">Demonstration</span> <span class="codenumber">2</span>.</h6> <p id="p-5">As above, use a new cell to compute the reduced row-echelon form of <code class="code-inline tex2jax_ignore">B</code>.</p></article></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-6">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>