Linear Algebra Assignment 1, 2

Overview

Assignment 1

Goal
• Write Python functions and test your codes for the following two topics that we have learned:
• RREF
• The number of necessary (integer) multiplications for the sequence of matrix multiplications

Assignment 2

  1. Implement a function that calculates a determinant of the given matrices without using NumPy or SciPy libraries. a. Implement it by following a naïve cofactor expansion. b. Implement it by following a Gauss-Jordan (Gaussian) elimination and the property of a determinant for triangular matrices.
  2. Implement codes that compare the above two approaches and report your results. a. Measuring times i. Also, measure the time when you use the det function in the numpy library (numpy.linalg.det) to compare it with your implementations. This is the only part that you can use the built-in function in the numpy library. b. Number of multiplications and additions c. Number of cycles