Skip to content

DiogoRibeiro7/linear-algebra-with-python

Linear Algebra with Python

Course: Linear Algebra and Analytic Geometry (TSIW, ESMAD -- IPP)
Instructor: Diogo Ribeiro (dfr@esmad.ipp.pt, ORCID: 0009-0001-2022-7072)

Python 3.11+ License: MIT

About

Seven practical assignments covering matrices, determinants, linear systems, and analytic geometry, with a Python reference implementation and a TypeScript port.

Repository layout:

  • packages/python: Python library (linalg_utils) and tests.
  • packages/js: TypeScript port and tests.
  • assignments: Assignment statements and starter files.
  • assignments/ASSIGNMENTS.tex: Full assignment specification (2025/2026).
  • assignments/submissions: Submission templates and grading rubric.
  • exercises / solutions: Assignment-aligned exercise and solution notebooks.
  • notebooks: Lesson notebooks.
  • scripts: Demo scripts to regenerate figures in assets/figures.
  • shared/fixtures: Cross-language fixtures (JSON) for parity testing.

Prerequisites

  • Python 3.11+
  • Poetry
  • Node.js 20+ (for the TypeScript port)

Installation (Python)

git clone https://github.com/diogoribeiro7/linear-algebra-with-python
cd linear-algebra-with-python/packages/python
poetry install

Installation (TypeScript)

cd packages/js
yarn install

Yarn is used for the TypeScript package (Berry/PnP by default).

Assignments

| Title | Module | Difficulty

-- | ----------------------------------------- | --------------------- | ------------ A1 | Matrices: Construction and Classification | Matrices | Introductory A2 | Matrix Operations and Property Verification | Operations, Transpose | Introductory A3 | Determinants and Invertibility | Determinants, Inverse | Intermediate A4 | Linear Systems: Gauss and Classification | Gaussian Elimination | Intermediate A5 | Cramer and LU Decomposition | Cramer, LU | Intermediate A6 | Analytic Geometry: Lines and Planes | Analytic Geometry | Intermediate A7 | Surfaces of Revolution | Surfaces | Intermediate

Run (Python)

cd packages/python
poetry run python ../../assignments/01_matrizes_tipos/matrizes_tipos.py

Demos (Python)

cd packages/python
poetry run python ../../scripts/run_all_demos.py

Tests

cd packages/python
poetry run pytest

Tests (TypeScript)

cd packages/js
yarn test

Submissions

Official PR-based submissions use the following format:

  • Target branch: develop
  • Source branch example: 40250001-A01
  • PR title example: Submission 40250001 --- A01
  • Submission path example: assignments/submissions/40250001/01/
  • Supported assignments in automated submission control: A01 to A06 only

Each submission folder must contain:

  • README.md
  • reflexao.md
  • Exactly one implementation track:
    • python/ with at least one file
    • or javascript/ with at least one file

assignments/07_superficies_revolucao remains available as teaching material, but A07 is outside the submission-control workflow.

License

MIT.

Author

Diogo Ribeiro -- ORCID: https://orcid.org/0009-0001-2022-7072

About

Course repository for Linear Algebra and Analytic Geometry, featuring Python and TypeScript implementations, lesson notebooks, practical assignments, exercises, solutions, demos, and submission workflows.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors