Author Archives: lipshitz@uoregon.edu

Random matrices for practice

The topic in class this week is abstract vector spaces. Sage does understand abstract vector spaces (and many other abstract algebraic structures) to some extent, but not in a way that is useful at the level of this class. So, here’s a brief discussion of creating matrices for computational practice. First, for row reduction practice, […]

Posted in Uncategorized | Comments closed

Determinants

Determinants in Sage work exactly how you would expect: M = matrix([[1,2,3],[4,5,6],[3,2,1]]) M.determinant() (If you’re surprised you got 0, check the RREF: M is, indeed, singular.) There are two shortcuts for the determinant, giving exactly the same thing: M.det() det(M) Go wild.

Posted in Uncategorized | Comments closed

Subspaces and Dimension

Amazingly, Sage knows what a linear subspace is, and can do basic computations with them. (Why is this amazing? This is a fairly abstract concept to implement on a computer. You can reduce most computations involving subspaces to computations about matrices. Usually, I would expect a human would do that reduction, and then ask a […]

Posted in Uncategorized | Comments closed

Matrix algebra 2

Inverting matrices   The first topic we discussed this week is inverting matrices. This works exactly as you would expect: M = matrix([[1,2,3],[1,1,1],[3,1,4]]) M.inverse() As a sanity check: M * M.inverse() (Note that the .inverse() comes first in the order of operations, as it should. If we didn’t know Python would do this way, we […]

Posted in Uncategorized | Comments closed

Matrix algebra 1

This week, we talked about matrix addition, scalar multiplication, matrix multiplication, and the transpose. These all work pretty much how you would expect in Sage: Let’s create some matrices to play with: %typeset_mode True M = matrix([[1,2],[3,4],[5,6]]) N = matrix([[3,1],[4,1],[5,9]]) P = matrix([[2,7],[1,8]]) I = identity_matrix(3) Z = zero_matrix(3,2) R = random_matrix(ZZ, 2, 2) [M, […]

Posted in Uncategorized | Comments closed

Creating convenient matrices

In class this week, we’ve been discussing linear independence and linear transformations. There’s not really any new computation in this material: all of the computations boil down to row-reducing matrices (to see if a set of vectors is linearly independent), or multiplying matrices by vectors (to compute a “matrix transformation”). So, this post will be […]

Posted in Uncategorized | Comments closed

Vector algebra, implicit and parametric descriptions of solution sets

Last week, we saw how to create an account, project, and Sage worksheet in CoCalc, and some basic operations inside the Sage worksheet — arithmetic, plotting, solving systems of equations, creating and row-reducing matrices. This week, we will focus on two topics: Vector arithmetic, and Understanding solution sets of systems of linear equations. Start by […]

Posted in Uncategorized | Comments closed

Getting Started

Since most real-world linear algebra computations are much too large to do by hand, software is essential for practical applications of the material in Math 341. The main software tools that are used are Matlab, Mathematica, and Maple; various extensions of Python; the statistics programming language R; and various low-level languages like C. In this […]

Posted in Uncategorized | Leave a comment
Skip to toolbar