Differences between revisions 26 and 27
Revision 26 as of 2016-10-21 19:55:41
Size: 11289
Editor: kcrisman
Comment: Fix suggested by Sharon Robbert
Revision 27 as of 2016-10-21 19:58:01
Size: 11456
Editor: kcrisman
Comment:
Deletions are marked like this. Additions are marked like this.
Line 47: Line 47:
html('<h2>Numerical instability of the classical Gram-Schmidt algorithm</h2>') pretty_print(html('<h2>Numerical instability of the classical Gram-Schmidt algorithm</h2>'))
Line 52: Line 52:
    html('precision in bits: ' + str(precision) + '<br>')     pretty_print(html('precision in bits: ' + str(precision) + '<br>'))
Line 57: Line 57:
    html('Classical Gram-Schmidt:')     pretty_print(html('Classical Gram-Schmidt:'))
Line 59: Line 59:
    html('Stable Gram-Schmidt:')     pretty_print(html('Stable Gram-Schmidt:'))
Line 77: Line 77:
    html('<h3>The determinant of a matrix is equal to the determinant of the transpose</h3>')
    html("$det(%s) = det(%s)=%s$"%(latex(A),latex(A.transpose()),latex(RR(A.determinant()))))
    pretty_print(html('<h3>The determinant of a matrix is equal to the determinant of the transpose</h3>'))
    pretty_print(html("$det(%s) = det(%s)=%s$"%(latex(A),latex(A.transpose()),latex(RR(A.determinant())))))
Line 94: Line 94:
    html("$%s %s=%s$"%tuple(map(latex, [A, v.column().n(4), w.column().n(4)])))     pretty_print(html("$%s %s=%s$"%tuple(map(latex, [A, v.column().n(4), w.column().n(4)]))))
Line 104: Line 104:
html('<h2>The Gerschgorin circle theorem</h2>') pretty_print(html('<h2>The Gerschgorin circle theorem</h2>'))
Line 109: Line 109:
    html('$A = ' + latex(matrix(RealField(10),A))+'$')     pretty_print(html('$A = ' + latex(matrix(RealField(10),A))+'$'))
Line 173: Line 173:
    html('<h3>Singular value decomposition: image of the unit circle and the singular vectors</h3>')
    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())))) 
    pretty_print(html('<h3>Singular value decomposition: image of the unit circle and the singular vectors</h3>'))
    pretty_print(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())))))
Line 189: Line 189:
    html("<h3>Function plot and its discrete Fourier transform</h3>")     pretty_print(html("<h3>Function plot and its discrete Fourier transform</h3>"))

Sage Interactions - Linear Algebra

goto interact main page

Numerical instability of the classical Gram-Schmidt algorithm

by Marshall Hampton

GramSchmidt.png

Equality of det(A) and det(A.tranpose())

by Marshall Hampton

Det_transpose.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)