Commit c0147bc0 authored by Jim Hefferon's avatar Jim Hefferon

get slides to compile from scratch

parent f18bbdd7
......@@ -25,9 +25,8 @@ Why?
Sigh. OK. Here is what I just did on a fresh Linux box (Ubuntu 14.04).
0) Install the Debian TeX Live (that is, the packages from the archive).
(I'd rather go with TeX LIve from tug.org but I had to get Sage also and
it required me to get the Debian packages and .. I didn't want to end
in dependency hell.)
(I'd rather go with TeX Live from tug.org but I had to get Sage and
Asymptote also and they required me to get the Debian packages and ..)
Also install Asymptote.
......@@ -40,13 +39,13 @@ Sigh. OK. Here is what I just did on a fresh Linux box (Ubuntu 14.04).
cd ~/Downloads
wget http://tug.org/fonts/getnonfreefonts/install-getnonfreefonts
sudo texlua install-getnonfreefonts
sudo getnonfreefonts-sys -a
sudo getnonfreefonts --sys --all
sudo texhash
Now comes the sucky part. I could not get it to find Luximono (running
linear-algebra/make_book_for_web.sh says it can't find ul9r8r).
Following the directions on this page
(I don't believe this needs to be done anymore but I am leaving it just
in case I misunderstood what happened: I could not get it to find
Luximono (running linear-algebra/make_book_for_web.sh says it can't
find ul9r8r). Following the directions on this page
http://people.debian.org/~preining/TeX/TeX-on-Debian/ch4.html
I did
sudo mkdir /etc/texmf/updmap.d
......@@ -57,7 +56,7 @@ Sigh. OK. Here is what I just did on a fresh Linux box (Ubuntu 14.04).
sudo update-updmap
sudo texhash
sudo updmap-sys
and it now worked. Dunno.
and it now worked.)
3) I had to get updated packages from ctan becuase the Debian stuff is old:
thmtools, geometry, mh
......
......@@ -30,8 +30,6 @@ pen DXPEN=linecap(0)
pen LIGHTPEN=linewidth(0.4pt); // matches mpost line_width_light
pen DARKPEN=linewidth(0.8pt); // line_width_dark
texpreamble("\usepackage{conc}");
// HSL color space, to lighten or darken
......
// ppiped.asy
import jh;
real height; height=3.5cm; size(0,height);
import settings;
outformat="pdf";
settings.render=0; // make output not be PRC
settings.maxtile=(20,20);
// settings.maxtile=(20,20);
import fontsize;
defaultpen(fontsize(9.24994pt));
import texcolors;
pen THINPEN=linecap(0)
+linewidth(0.25pt);
pen VECTORPEN=linecap(0)
+linewidth(0.8pt);
real VECTORHEADSIZE=5;
pen LIGHTPEN=linewidth(0.4pt); // matches mpost line_width_light
import three;
import graph3;
size(0,200);
size3(200,IgnoreAspect);
currentprojection=orthographic((10,5,4));
// Axes
// axes3(xlabel="",ylabel="",zlabel="",
// min=(-0.2,-0.2,-0.2),
// max=(3,4,5),
// p=AXISPEN,
// ticks=OutTicks,
// arrow=None);
// xaxis3(axis=YZZero,
// xmin=-0.2,xmax=3.2,
// p=AXISPEN,
// ticks=InTicks(),
// arrow=None,
// above=false);
xaxis3("",YZZero,
xmin=-0.2,xmax=3.2,
OutTicks(Label(" "),
// scale(Linear,Linear,Log);
// xaxis3("$x$",0,1,red,OutTicks(2,2));
xaxis3("$x$",YZZero,
xmin=-0.2,xmax=3.2,
OutTicks(Label("%"),
Step=1,step=1,
begin=false,
Size=2, size=2));
yaxis3("",XZZero,
ymin=-0.2,ymax=4.2,
OutTicks(Label(" "),
Step=1,step=1,
begin=false,
Size=2, size=2));
zaxis3("",XYZero,
zmin=-0.2,zmax=4.2,
OutTicks(Label(" "),
Size=2, size=2)
);
yaxis3("$y$",XZZero,
ymin=-0.2,ymax=4.2,
OutTicks(Label("%"),
Step=1,step=1,
begin=false,
Size=2, size=2)
);
zaxis3("$z$",XYZero,
zmin=-0.2,zmax=4.2,
OutTicks(Label("%"),
Step=1,step=1,
begin=false,
Size=2, size=2));
Size=2, size=2)
);
// three vectors
triple origin = (0,0,0);
......@@ -56,7 +60,7 @@ label(Label("{\tiny $\left(\begin{array}{@{}c@{}} 2 \\ 0 \\ 2 \end{array}\right)
label(Label("{\tiny $\left(\begin{array}{@{}c@{}} 0 \\ 3 \\ 1 \end{array}\right)$}"),p2+(0,.15,0),E);
triple p3_offset = (1,-0.8,1.6); // label must move out and away
label(Label("{\tiny $\left(\begin{array}{@{}c@{}} -1 \\ 0 \\ 1 \end{array}\right)$}"),p3+p3_offset,W);
path3 p3_connection = p3+p3_offset+(0,-.1,-.5){(0,1,-.15)} .. {(0,1,0)}p3;
path3 p3_connection = p3+p3_offset+(0,0,-.30){(0,1,-.3)} .. (p3-(0,.5,0)) .. {(0,1,0)}p3;
draw(p3_connection,LIGHTPEN+gray(0.8));
......@@ -64,24 +68,23 @@ draw(p3_connection,LIGHTPEN+gray(0.8));
pen WHITEPEN=linecap(0)
+linewidth(1pt)+white;
pen extra_lines_color = black;
// Uncommenting these makes the black lines not show. Order of drawing?
// draw(p3--(p1+p3),WHITEPEN);
draw(p3--(p1+p3),WHITEPEN);
draw(p3--(p1+p3),THINPEN+extra_lines_color);
// draw(p3--(p2+p3),WHITEPEN);
draw(p3--(p2+p3),WHITEPEN);
draw(p3--(p2+p3),THINPEN+extra_lines_color);
// draw(p2--(p2+p3),WHITEPEN);
draw(p2--(p2+p3),WHITEPEN);
draw(p2--(p2+p3),THINPEN+extra_lines_color);
// draw(p1--(p1+p3),WHITEPEN);
draw(p1--(p1+p3),WHITEPEN);
draw(p1--(p1+p3),THINPEN+extra_lines_color);
draw(p1--(p1+p2),WHITEPEN);
draw(p1--(p1+p2),THINPEN+extra_lines_color);
draw(p2--(p1+p2),WHITEPEN);
draw(p2--(p1+p2),THINPEN+extra_lines_color);
// draw((p2+p3)--(p1+p2+p3),WHITEPEN);
draw((p2+p3)--(p1+p2+p3),WHITEPEN);
draw((p2+p3)--(p1+p2+p3),THINPEN+extra_lines_color);
// draw((p1+p3)--(p1+p2+p3),WHITEPEN);
draw((p1+p3)--(p1+p2+p3),WHITEPEN);
draw((p1+p3)--(p1+p2+p3),THINPEN+extra_lines_color);
// draw((p1+p2)--(p1+p2+p3),WHITEPEN+red);
draw((p1+p2)--(p1+p2+p3),WHITEPEN+extra_lines_color);
draw((p1+p2)--(p1+p2+p3),THINPEN+extra_lines_color);
// Bug: arrows predrawn with white border will have bases with
......
// wilber.asy
// Show Wilberforce's pendulum
import settings;
settings.outformat="pdf";
settings.render=0;
unitsize(0.1cm);
outformat="pdf";
settings.render=0; // make output not be PRC
// settings.maxtile=(20,20);
// cd junk is needed for relative import
// cd("../../../asy/");
import jh;
// cd("");
pair coilpoint(real lambda, real r, real t)
{
......@@ -27,24 +19,7 @@ guide coil(guide g=nullpath, real lambda, real r, real a, real b, int n)
return g;
}
// void drawspring(real x, string label) {
// real r=8;
// real t1=-pi;
// real t2=10*pi;
// real lambda=(t2-t1+x)/(t2-t1);
// pair b=coilpoint(lambda,r,t1);
// pair c=coilpoint(lambda,r,t2);
// pair a=b-10;
// pair d=c+10;
// draw(a--b,BeginBar(2*barsize()));
// draw(c--d);
// draw(coil(lambda,r,t1,t2,100));
// dot(d);
// pair h=20*I;
// draw(label,a-h--d-h,red,Arrow,Bars,PenMargin);
// }
picture p;
int picnum = 0;
......@@ -103,6 +78,7 @@ draw(p,rotate(90)*spr,spring_pen);
shipout(format("wilber%03d",picnum),p,format="pdf");
// ====== Show motions; rotation arrow both ways ==================
picture p;
int picnum = 1;
......@@ -135,17 +111,18 @@ path yaw = shift(0,-60)*shift(rotate(90)*a)*scale(1.5)*scale(4,3)*subpath(unitci
draw(p,yaw,arrow=None);
draw(p,point(yaw,0.65)--point(yaw,0),arrow=EndArrow);
draw(p,point(yaw,4-0.65)--point(yaw,4),arrow=EndArrow);
label(p,"\scriptsize $\theta(t)$",point(yaw,2.75),align=SE);
label(p,"{\scriptsize $\theta(t)$}",point(yaw,2.75),align=SE);
// vert action
path vert = shift(-5,0)*cylinder_left;
draw(p,vert,arrow=Arrows(size=1.5));
label(p,"\scriptsize $x(t)$",point(vert,0.1),align=W);
label(p,"{\scriptsize $x(t)$}",point(vert,0.1),align=W);
shipout(format("wilber%03d",picnum),p,format="pdf");
// ====== Show motions; rotation arrow to make spring longer or shorter =====
picture p;
int picnum = 2;
......@@ -178,10 +155,10 @@ path yaw = shift(0,-60)*shift(rotate(90)*a)*scale(1.5)*scale(4,3)*subpath(unitci
path yaw_lengthen = subpath(yaw,0,3);
draw(p,yaw_lengthen,arrow=None);
draw(p,point(yaw_lengthen,0.65)--point(yaw_lengthen,0),arrow=EndArrow);
label(p,"\scriptsize spring lengthens",point(yaw_lengthen,0.75),align=W);
label(p,"{\scriptsize spring lengthens}",point(yaw_lengthen,0.75),align=W);
path yaw_shorten = shift(0,-20)*subpath(yaw,1,4);
draw(p,yaw_shorten,arrow=None);
label(p,"\scriptsize spring shortens",point(yaw_shorten,3.25)+(1,0),align=E);
label(p,"{\scriptsize spring shortens}",point(yaw_shorten,3.25)+(1,0),align=E);
// vert action
// path vert = shift(-5,0)*cylinder_left;
......@@ -191,17 +168,22 @@ label(p,"\scriptsize spring shortens",point(yaw_shorten,3.25)+(1,0),align=E);
shipout(format("wilber%03d",picnum),p,format="pdf");
// ====== Cosine graph ==================
picture p;
int picnum = 3;
unitsize(p,0.65cm);
import graph;
xlimits( -1, 3pi);
// xlimits( -1, 3pi);
xaxis(p,Label("\makebox[0em][l]{\footnotesize time~$t$}",black),xmin=-0.2,xmax=2pi+0.4,gray(0.5),arrow=None);
ylimits(-1.2, 1.2);
// xaxis(p, xmin=-0.2,xmax=2pi+0.4,gray(0.5),arrow=None);
// ylimits(-1.2, 1.2);
yaxis(p,Label("\makebox[0em][r]{\footnotesize position~$x$}",black),ymin=-1.2,ymax=1.2,gray(0.5),arrow=None);
// yaxis(p,Label("position~$x$"),ymin=-1.2,ymax=1.2,gray(0.5),arrow=None);
// yaxis(p, ymin=-12,ymax=12,gray(0.5),arrow=None);
draw(p,graph(p,new real(real x){return cos((3.5)*x);},0pi,2pi));
dot(p,(-2.5,0),white);
......
......@@ -196,7 +196,7 @@ That agrees with the determinant.
\begin{center}
\parbox{2in}{\hbox{}\hfil\includegraphics{asy/ppiped.pdf}\hfil\hbox{}}
% \parbox{2in}{\hbox{}\hfil\includegraphics{ch4.39}\hfil\hbox{}}
\quad
\hspace{4.5em}
$\begin{vmat}[r]
2 &0 &-1\\
0 &3 &0 \\
......
No preview for this file type
......@@ -54,7 +54,7 @@ then
mpost voting.mp
mpost appen.mp
cd asy
asy -noprc -fpdf ppiped
asy ppiped
asy axes
asy wilber
cd ..
......
No preview for this file type
This diff is collapsed.
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{../../linalgjh}
\setlength{\parindent}{0em}
\begin{document}
\makebox[\linewidth]{\textbf{Homework, MA~213}\hspace*{4in}\textbf{2017-Sep-13}}
\vspace*{3ex}
You may work with others to figure out how to do questions,
and you are welcome to look for answers in the book, online, by talking
to someone who had the course before, etc.
\textit{However, you must write
the answers on your own.
Start with a fresh paper; do not copy from notes, online, etc., when
you are writing it up for handing in.
And, you must show your work.
You can only get credit for work shown.}
\begin{enumerate}
\item Solve each system.
State whether it has a unique solution, no solutions, or infinitely many
solutions.
Give the solution set, in vector form.
\begin{enumerate}
\item
$\begin{linsys}{3}
x &+ &y &+ &z &= &4 \\
2x &- &2y &- &z &= &-1 \\
4x &+ &y &+ &2z &= &10
\end{linsys}$
\item
$\begin{linsys}{4}
x &+ &y &- &z &= &0 \\
2x &+ &y & & &= &1 \\
4x &+ &3y &- &2z &= &0 \\
x & & &+ & z &= &0
\end{linsys}$
\item
$\begin{linsys}{5}
2x &- &y &- &z &+ &2w &= &3 \\
x &+ &y &+ &z & & &= &-1
\end{linsys}$
\end{enumerate}
\item For the third system in the first question,
give the associated homogeneous system and
give its solution set.
\item Do Gauss-Jordan reduction.
Describe the solution set.
\begin{enumerate}
\item
$\begin{linsys}{3}
x &+ &y &+ &z &= &4 \\
2x &- &2y &- &z &= &-1 \\
4x &+ &y &+ &2z &= &10
\end{linsys}$
\item
$\begin{linsys}{3}
x &+ &y &+ &2z &= &0 \\
2x &- &y &+ &z &= &1 \\
4x &+ &y &+ &5z &= &1
\end{linsys}$
\end{enumerate}
\end{enumerate}
\end{document}
%\documentclass{exam}
\documentclass[answers]{exam}
\usepackage[margin=1in]{geometry}
\usepackage{../../linalgjh}
\setlength{\parindent}{0em}
\begin{document}
\makebox[\linewidth]{\textbf{Homework, MA~213}\hspace*{4in}\textbf{2017-Sep-13}}
\vspace*{3ex}
You may work with others to figure out how to do questions,
and you are welcome to look for answers in the book, online, by talking
to someone who had the course before, etc.
\textit{However, you must write
the answers on your own.
Start with a fresh paper; do not copy from notes, online, etc., when
you are writing it up for handing in.
And, you must show your work.
You can only get credit for work shown.}
\begin{questions}
\question
Solve each system.
State whether it has a unique solution, no solutions, or infinitely many
solutions.
Give the solution set, in vector form.
\begin{parts}
\part
$\begin{linsys}{3}
x &+ &y &+ &z &= &4 \\
2x &- &2y &- &z &= &-1 \\
4x &+ &y &+ &2z &= &10
\end{linsys}$
\begin{solution}
\begin{align*}
\begin{amat}{3}
1 &1 &1 &4 \\
2 &-2 &-1 &-1 \\
4 &1 &2 &10
\end{amat}
&\grstep[-4\rho_1+\rho_3]{-2\rho_1+\rho_2}
\begin{amat}{3}
1 &1 &1 &4 \\
0 &-4 &-3 &-9 \\
0 &-3 &-2 &-6
\end{amat} \\
&\grstep{(3/4)\rho_2+\rho_3}
\begin{amat}{3}
1 &1 &1 &4 \\
0 &-4 &-3 &-9 \\
0 &0 &1/4 &3/4
\end{amat}
\end{align*}
Back substitution gives $z=3$, $y=0$, and $x=1$.
\end{solution}
\part
$\begin{linsys}{4}
x &+ &y &- &z &= &0 \\
2x &+ &y & & &= &1 \\
4x &+ &3y &- &2z &= &0 \\
x & & &+ & z &= &0
\end{linsys}$
\begin{solution}
\begin{align*}
\begin{amat}{3}
1 &1 &-1 &0 \\
2 &1 &0 &1 \\
4 &3 &-2 &0 \\
1 &0 &1 &0
\end{amat}
&\grstep[-4\rho_1+\rho_3\\ -1\rho_1+\rho_4]{-2\rho_1+\rho_2}
\begin{amat}{3}
1 &1 &-1 &0 \\
0 &-1 &2 &1 \\
0 &-1 &2 &0 \\
0 &-1 &2 &0
\end{amat} \\
&\grstep[-\rho_2+\rho_4]{-\rho_2+\rho_3}
\begin{amat}{3}
1 &1 &-1 &0 \\
0 &-1 &2 &1 \\
0 &0 &0 &-1 \\
0 &0 &0 &-1
\end{amat}
\end{align*}
Because of the contradictory equation (actually, there are two), stop
and conclude that there is no solution.
\end{solution}
\part
$\begin{linsys}{5}
2x &- &y &- &z &+ &2w &= &3 \\
x &+ &y &+ &z & & &= &-1
\end{linsys}$
\begin{solution}
\begin{align*}
\begin{amat}{4}
2 &-1 &-1 &2 &3 \\
1 &1 &1 &0 &-1
\end{amat}
&\grstep{(1/2)\rho_1+\rho_2}
\begin{amat}{4}
2 &-1 &-1 &2 &3 \\
0 &3/2 &3/2 &-1 &-5/2
\end{amat}
\end{align*}
The free variables are $z$ and~$w$.
In terms of those, the other two are
$y=-z+(2/3)w$ and~$x=(2/3)-(2/3)w$.
\end{solution}
\end{parts}
\question
For the third system in the first question,
give the associated homogeneous system and
give its solution set.
\begin{solution}
The associated homogeneous system
\begin{equation*}
\begin{linsys}{5}
2x &- &y &- &z &+ &2w &= &0 \\
x &+ &y &+ &z & & &= &0
\end{linsys}
\end{equation*}
is solved with the same linear reduction steps.
\begin{align*}
\begin{amat}{4}
2 &-1 &-1 &2 &0 \\
1 &1 &1 &0 &0
\end{amat}
&\grstep{(1/2)\rho_1+\rho_2}
\begin{amat}{4}
2 &-1 &-1 &2 &0 \\
0 &3/2 &3/2 &-1 &0
\end{amat}
\end{align*}
Again $z$ and~$w$ are free.
The solution set is this.
\begin{equation*}
\set{\colvec{x \\ y \\ z \\ w}
=\colvec{0 \\ -1 \\ 1 \\ 0}z+\colvec{-2/3 \\ 2/3 \\ 0 \\ 1}w
\suchthat z,w\in\R}
\end{equation*}
\end{solution}
\question
Do Gauss-Jordan reduction.
Describe the solution set.
\begin{parts}
\part
$\begin{linsys}{3}
x &+ &y &+ &z &= &4 \\
2x &- &2y &- &z &= &-1 \\
4x &+ &y &+ &2z &= &10
\end{linsys}$
\begin{solution}
These steps give the solution shown.
\begin{equation*}
\begin{amat}{3}
1 &1 &1 &4 \\
2 &-2 &-1 &-1 \\
4 &1 &2 &10
\end{amat}
\grstep[-4\rho_1+\rho_3]{-2\rho_1+\rho_2}
\grstep{(3/4)\rho_2+\rho_3}
\grstep[4\rho_3]{(1/4)\rho_2}
\grstep[-(3/4)\rho_3+\rho_2]{-\rho_3+\rho_1}
\grstep{-\rho_2+\rho_1}
\begin{amat}{3}
1 &0 &0 &1 \\
0 &1 &0 &0 \\
0 &0 &1 &3
\end{amat}
\end{equation*}
The solution set has one member, the vector whose components are
$1$, $0$, and $3$.
\begin{equation*}
\set{\colvec{1 \\ 0 \\ 3}}
\end{equation*}
\end{solution}
\part
$\begin{linsys}{3}
x &+ &y &+ &2z &= &0 \\
2x &- &y &+ &z &= &1 \\
4x &+ &y &+ &5z &= &1
\end{linsys}$
\end{parts}
\begin{solution}
Here there are infinitely many solutions.
\begin{equation*}
\begin{amat}{3}
1 &1 &2 &0 \\
2 &-1 &1 &1 \\
4 &1 &5 &1
\end{amat}
\grstep[-4\rho_1+\rho_3]{-2\rho_1+\rho_1}
\grstep{-\rho_2+\rho_3}
\grstep{(1/3)\rho_2}
\grstep{-\rho_2+\rho_1}
\begin{amat}{3}
1 &0 &1 &1/3 \\
0 &1 &1 &-1/3 \\
0 &0 &0 &0
\end{amat}
\end{equation*}
Back substitution gives this description of the solution set.
\begin{equation*}
\set{\colvec{1/3 \\ -1/3 \\ 0}+\colvec{-1 \\ -1 \\ 1}z\suchthat z\in\Re}
\end{equation*}
\end{solution}
\end{questions}
\end{document}
sage: load("../../lab/gauss_method.sage")
sage: M = matrix(QQ, [[1,1,1], [2,-2,-1], [4,1,2]])
sage: v = vector(QQ, [4,-1,10])
sage: M_prime = M.augment(v, subdivide=True)
sage: gauss_method(M_prime)
[ 1 1 1| 4]
[ 2 -2 -1|-1]
[ 4 1 2|10]
take -2 times row 1 plus row 2
take -4 times row 1 plus row 3
[ 1 1 1| 4]
[ 0 -4 -3|-9]
[ 0 -3 -2|-6]
take -3/4 times row 2 plus row 3
[ 1 1 1| 4]
[ 0 -4 -3| -9]
[ 0 0 1/4|3/4]
sage: var('x,y,z,w')
(x, y, z, w)
sage: eqns = [x+y+z==4, 2*x-2*y-z==-1, 4*x+y+2*z==10]
sage: solve(eqns, x, y, z)
[[x == 1, y == 0, z == 3]]
sage: M = matrix(QQ, [[1,1,-1], [2,1,0], [4,3,-2], [1,0,1]])
sage: v = vector(QQ, [0,1,0,0])
sage: M_prime = M.augment(v, subdivide=True)
sage: gauss_method(M_prime)
[ 1 1 -1| 0]
[ 2 1 0| 1]
[ 4 3 -2| 0]
[ 1 0 1| 0]
take -2 times row 1 plus row 2
take -4 times row 1 plus row 3
take -1 times row 1 plus row 4
[ 1 1 -1| 0]
[ 0 -1 2| 1]
[ 0 -1 2| 0]
[ 0 -1 2| 0]
take -1 times row 2 plus row 3
take -1 times row 2 plus row 4
[ 1 1 -1| 0]
[ 0 -1 2| 1]
[ 0 0 0|-1]
[ 0 0 0|-1]
take -1 times row 3 plus row 4
[ 1 1 -1| 0]
[ 0 -1 2| 1]
[ 0 0 0|-1]
[ 0 0 0| 0]
sage: M = matrix(QQ, [[2,-1,-1,2], [1,1,1,0]])
sage: v = vector(QQ, [3,-1])
sage: M_prime = M.augment(v, subdivide=True)
sage: gauss_method(M_prime)
[ 2 -1 -1 2| 3]
[ 1 1 1 0|-1]
take -1/2 times row 1 plus row 2
[ 2 -1 -1 2| 3]
[ 0 3/2 3/2 -1|-5/2]
sage: eqns = [2*x-y-z+2*w==3, x+y+z==-1]
sage: solve(eqns, x, y, z)
[[x == -2/3*w + 2/3, y == -r1 + 2/3*w - 5/3, z == r1]]
sage: solve(eqns, x, y, z, w)
[[x == -2/3*r2 + 2/3, y == 2/3*r2 - r3 - 5/3, z == r3, w == r2]]
sage: M = matrix(QQ, [[1,1,1], [2,-2,-1], [4,1,2]])
sage: v = vector(QQ, [4,-1,10])
sage: M_prime = M.augment(v, subdivide=True)
sage: gauss_jordan(M_prime)
[ 1 1 1| 4]
[ 2 -2 -1|-1]
[ 4 1 2|10]
take -2 times row 1 plus row 2
take -4 times row 1 plus row 3
[ 1 1 1| 4]
[ 0 -4 -3|-9]
[ 0 -3 -2|-6]
take -3/4 times row 2 plus row 3
[ 1 1 1| 4]
[ 0 -4 -3| -9]
[ 0 0 1/4|3/4]
take -1/4 times row 2
take 4 times row 3
[ 1 1 1| 4]
[ 0 1 3/4|9/4]
[ 0 0 1| 3]
take -1 times row 3 plus row 1
take -3/4 times row 3 plus row 2
[1 1 0|1]
[0 1 0|0]
[0 0 1|3]
take -1 times row 2 plus row 1
[1 0 0|1]
[0 1 0|0]
[0 0 1|3]
sage:
sage: M = matrix(QQ, [[1,1,2], [2,-1,1], [4,1,5]])
sage: v = vector(QQ, [0,1,1])
sage: M_prime = M.augment(v, subdivide=True)
sage: gauss_jordan(M_prime)
[ 1 1 2| 0]
[ 2 -1 1| 1]
[ 4 1 5| 1]
take -2 times row 1 plus row 2
take -4 times row 1 plus row 3
[ 1 1 2| 0]
[ 0 -3 -3| 1]
[ 0 -3 -3| 1]
take -1 times row 2 plus row 3
[ 1 1 2| 0]
[ 0 -3 -3| 1]
[ 0 0 0| 0]
take -1/3 times row 2
[ 1 1 2| 0]
[ 0 1 1|-1/3]
[ 0 0 0| 0]
take -1 times row 2 plus row 1
[ 1 0 1| 1/3]
[ 0 1 1|-1/3]
[ 0 0 0| 0]
sage: var('x,y,z')
(x, y, z)
sage: eqns = [x+y+2*z==0, 2*x-y+z==1, 4*x+y+5*z==1]
sage: solve(eqns, x, y, z)
[[x == -r4 + 1/3, y == -r4 - 1/3, z == r4]]
sage:
\documentclass[11pt]{examjh}
\usepackage{../linalgjh}
\examhead{MA 213 Hef{}feron, \yearsemester}{Exam One}
\documentclass[11pt,answers]{examjh}
\usepackage{../../linalgjh}
\examhead{MA 213 Hef{}feron, 2014-Fall}{Exam One}
\begin{document}
\begin{questions}
\question
......@@ -25,7 +25,7 @@ For each, find and parametrize the solution set.
\begin{amat}{3}
2 &1 &0 &3 \\
0 &-7/2 &1 &-7/2 \\
0 &0 &1 &0
0 &0 &0 &0
\end{amat}
\end{equation*}
The parametrization is this.
......
\documentclass[11pt]{examjh}
\usepackage{../linalgjh}
\examhead{MA 213 Hef{}feron, \yearsemester}{Exam Two}
\usepackage{../../linalgjh}
\examhead{MA 213 Hef{}feron, 2014-Fall}{Exam Two}
\printanswers
% \noprintanswers
\begin{document}
......@@ -49,7 +49,7 @@ To see that the map is onto, we suppose that we are given a member~$\vec{w}$
of the codomain and we find a member~$\vec{v}$ of the domain that maps to
it.
Let the member of the codomain be~$\vec{w}=px^2+qx+r$.
Observe that where $\vec{v}=rx^2+px+(-q-r)$ then $t(\vec{v})=\vec{w}$.
Observe that where $\vec{v}=rx^2+px+(-q+r)$ then $t(\vec{v})=\vec{w}$.
Thus~$t$ is onto.