Math 218: Matrices and Vector Spaces

This is the webpage for the Fall 2018 manifestation of Dr. Fitzpatrick's section of Math 202 at Duke University.

SageMath

SageMath is an open source computer algebra system written python.

Useful Commands

Use the syntax A = matrix([[1/2,-3,5],[-4/5,2,11],[6,-4,9]]) to define the matrix \[ A = \left[\begin{array}{rrr} \frac{1}{2} & -3 & 5 \\ -\frac{4}{5} & 2 & 11 \\ 6 & -4 & 9 \end{array}\right] \] Avoid using decimal notation! Input 1/2 instead of .5.

  • The command A.rref() computes the reduced row-echelon form of A.
  • The command A.det() computes the determinant of A, provided that A is square.
  • The command A.rank() computes the rank of A.
  • If A and B are \(m\times n\) matrices, then the command A+B computes the sum of A and B.
  • If c is a scalar, then the command c*A computes the scalar product of c and A.
  • If A is \(\ell\times m\) and B is \(m\times n\), then A*B computes the product of A and B.
  • The command A.transpose() computes the transpose of A.
  • The command A.is_symmetric() tests if A is symmetric.

Reduced Row-Echelon Form

The following code computes the reduced row-echelon form of a given matrix \(A\).