Assignment 2 - Numpy Array Operations

5 Numpy Linear Algebra Functions You Must Know in 2023

What's Numpy?

The term "numpy" is an acronym for "Numeric Python" or "Numerical Python". Numpy is an open source library that allows you to work efficiently with arrays. The main object of NumPy is the homogeneous multidimensional array. It is an array of elements (usually numbers), all of the same type, that are indexed by a tuple of non-negative integers. In NumPy, the dimensions are called axes.

NumPy enhances the Python programming language by providing powerful data structures implementing multidimensional arrays and matrices. These data structures ensure efficient calculations with matrices and arrays. The implementation even targets large arrays and matrices, better known as "big data". To operate on these matrices and arrays, the module also provides a large library of high-level functions related to mathematics topics such as arithmetics, logarithms, trigonometry, and linear algebra.

Linear Algebra

Linear algebra is a mathematical discipline that treats vectors and matrices and, more generally, vector spaces and linear transformations. When combined with calculus, linear algebra eases the solution of linear systems of differential equations.

Despite the fact that the must common linear algebra functions in NumPy are present in the main numpy namespace, there is a whole sub-module, called linalg, that is dedicated for linear algebra. This module contains almost (if not) all the functions related to linear algebra. We are going to study the must important:

  • linalg.matrix_power(a, n)
  • linalg.solve(a, b)
  • linalg.inv(a)
  • linalg.det(a)
  • linalg.eig(a)
!pip install jovian --upgrade -q
import jovian
jovian.commit(project='assignment-2-numpy-array-operations')
[jovian] Attempting to save notebook..

Let's begin by importing Numpy and listing out the functions covered in this notebook.