Linear Algebra from Scratch, A Guided Series
Welcome to the companion guides for the lars crate.
Alongside developing the crate itself, this series of articles is designed to help you build your own linear algebra functionality from the ground up. Each guide focuses on a small, well-defined task so you can learn and implement concepts step by step. The idea is to make the process approachable, modular, and transferable whether you want to follow the full series or just complete a few select parts.
If you only need a 2D vector type, for example, you can complete the vector-related tasks and stop there. If you want to extend into 3D space or matrix transformations, you can build on top of what you’ve already written.
Each guide includes: - Mathematical background and conceptual explanations - Step-by-step implementation tasks - Full Rust code examples and solutions - Notes on extending or adapting the ideas further
Although the examples are written in Rust, the core concepts can be adapted to any language with relative ease.
Guides
-
Introduction and Setup
An overview of the project’s structure, environment setup, and what to expect from the series. Read it here: → -
2D Vector Guide
Implement a simple two-dimensional vector type, including construction, arithmetic operations, scaling, dot products, and normalization.
Read it here: → -
3D Vector Guide (coming soon)
Extend your 2D implementation into 3D space, introducing concepts such as the cross product and vector magnitude. -
Matrix Guide (coming soon)
Build a foundation for matrix operations, transformations, and composition. -
Practical Applications (planned)
Apply your implementations in areas like computer graphics, physics simulations, or data transformations.
Modularity and Design Philosophy
Each guide is written to be self-contained. You can treat them as individual learning modules or as chapters in a longer course. The goal is to make each piece useful on its own while still contributing to a larger, cohesive system.
This approach mirrors how the lars crate itself is structured: small, reusable components that can stand alone or combine to form a complete linear algebra library.
Contributing and Next Steps
The guides are a work in progress and will continue to grow alongside the crate. Contributions, feedback, and suggestions are welcome.
You can find the project on GitHub here:
https://github.com/JCooper-Bit/lars
These guides are written to teach by doing. Work through them in order, or pick the pieces you need, and you’ll have a solid understanding of the principles behind linear algebra, and the tools to implement them yourself.
About the Author
___ _______ __ __ _______ _______ _______
| || _ || | | || || || |
| || |_| || |_| || || ___|| ___|
| || || || || |___ | |___
___| || ||_ _|| _|| ___|| ___|
| || _ | | | | |_ | |___ | |___
|_______||__| |__| |___| |_______||_______||_______|
J. Cooper (JayCee) is a software developer, Maths enthusiast and musician based in the UK. They are the creator and maintainer of the lars crate and they have various other projects in progress
- GitHub: @JCooper-Bit
- Project Repo: lars on GitHub
This article was published on October 29, 2025 with mkdocs.