Implement various vector and matrix math functions using no math libraries.
After completing this assignment, you should understand:
- List comprehensions
- Introductory linear algebra concepts
- Raising exceptions
After completing this assignment, you should be able to:
- Perform mathematical operations on complex list structures
- A Git repo called vectors-and-matrices containing at least:
README.md
file explaining how to run your project- a module called
matrix_math
- tests for
matrix_math
- Passing unit tests
- No PEP8 or Pyflakes warnings or errors
- No use of third-party libraries - only built in
+ - / *
operators and themath
module - No use of
for
orwhile
loops
Implement these linear algebra functions:
- vector addition and subtraction
- vector multiplication by a scalar
- mean of multiple vectors
- dot product
- magnitude
- matrix addition and subtraction
- matrix multiplication by a scalar
- matrix multiplication by a vector
- matrix multiplication by a matrix
These functions are all defined in the formulas notebook included with this assignment as well as the tests.
These functions must:
- Check the shape of the incoming vector or matrix before any calculations
- Reuse any duplicated code