The AI Reskilling Platform

Linear Algebra in Python and NumPy

en 4Geeks

Exercises and examples for linear algebra using Python and NumPy, covering topics such as vectors, matrices, and linear transformations.
Course Report Badge 2025

Get Full Program Details

Apply below to receive the program overview by e-mail and choose how you'd like our admissions team to contact you.

By signing up, you agree to the Terms and Conditions and Privacy Policy

In this tutorial, you will learn to manipulate vectors and matrices in Python using both nested lists and NumPy arrays. We will explore from basic operations to more advanced ones. To ensure you understand both ways of working with data in Python, we will divide the project into two parts:

  • Pure Python: We will use nested lists to represent and operate with vectors and matrices.
  • NumPy: You will learn to work with arrays, which facilitates many operations and optimizes performance.

By the end of this tutorial, you will be able to perform calculations with vectors and matrices in Python efficiently and understand when it is better to use each approach.

How are the exercises organized?

Each exercise is a small Python application that contains the following files:

  1. app.py: Represents the Python entry file that will be executed by the computer.
  2. README.md: Contains the exercise instructions.
  3. test.py: Contains the test script for the exercise (you do not need to open this file).

Note: These exercises have automatic grading. The tests are very rigid and strict; my recommendation is not to pay too much attention to the tests and use them only as a suggestion, or you might get frustrated.

Contributors

This project follows the all-contributors specification. All contributions are welcome!

This and many other exercises are built by students as part of the 4Geeks Academy Coding Bootcamp by Alejandro Sánchez and many other contributors. Find out more about our Full Stack Developer Course, and Data Science Bootcamp.