Differences between revisions 17 and 18
Revision 17 as of 2012-04-28 20:05:15
Size: 10487
Editor: jason
Comment:
Revision 18 as of 2012-04-28 20:09:20
Size: 10450
Editor: jason
Comment:
Deletions are marked like this. Additions are marked like this.
Line 138: Line 138:
def svd_vis(a11=slider(-1,1,.05,1),a12=slider(-1,1,.05,1),a21=slider(-1,1,.05,0),a22=slider(-1,1,.05,1),ofs= selector(['Off','On'],label='offset image from domain')): def svd_vis(a11=slider(-1,1,.05,1),a12=slider(-1,1,.05,1),a21=slider(-1,1,.05,0),a22=slider(-1,1,.05,1),ofs= ('offset image from domain',False)):
Line 142: Line 142:
    if ofs == 'On':     if ofs:
Line 155: Line 155:
    print jsmath("$A = %s = %s %s %s$"%(latex(my_mat), latex(matrix(rf_low,u.tolist())), latex(matrix(rf_low,2,2,[s[0],0,0,s[1]])), latex(matrix(rf_low,vh.tolist()))))
    image_ell = parametric_plot(rotell(s,u,t, offset),0,2*pi)
    html("$A = %s = %s %s %s$"%(latex(my_mat), latex(matrix(rf_low,u.tolist())), latex(matrix(rf_low,2,2,[s[0],0,0,s[1]])), latex(matrix(rf_low,vh.tolist()))))
    image_ell = parametric_plot(rotell(s,u,t, offset),(0,2*pi))
Line 159: Line 159:
    show(graph_stuff,frame = False,axes=False,figsize=[fsize,fsize])
}}}
    show(graph_stuff,frame = False,axes=False,figsize=[fsize,fsize])}}}

Sage Interactions - Linear Algebra

goto interact main page

Numerical instability of the classical Gram-Schmidt algorithm

by Marshall Hampton (tested by William Stein, who thinks this is really nice!)

GramSchmidt.png

Linear transformations

by Jason Grout

A square matrix defines a linear transformation which rotates and/or scales vectors. In the interact command below, the red vector represents the original vector (v) and the blue vector represents the image w under the linear transformation. You can change the angle and length of v by changing theta and r.

Linear-Transformations.png

Gerschgorin Circle Theorem

by Marshall Hampton. This animated version requires convert (imagemagick) to be installed, but it can easily be modified to a static version. The animation illustrates the idea behind the stronger version of Gerschgorin's theorem, which says that if the disks around the eigenvalues are disjoint then there is one eigenvalue per disk. The proof is by continuity of the eigenvalues under a homotopy to a diagonal matrix.

Gerschanimate.png

Gersch.gif

Singular value decomposition

by Marshall Hampton

svd1.png

Discrete Fourier Transform

by Marshall Hampton

dfft1.png

The Gauss-Jordan method for inverting a matrix

by Hristo Inouzhe

gauss-jordan.png

...(goes all the way to invert the matrix)

interact/linear_algebra (last edited 2020-11-27 12:10:23 by pang)