Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Matrix Laravel Package

markbaker/matrix

PHPMatrix is a PHP matrix algebra library supporting addition, subtraction, multiplication, division, determinants, inverses, transpose, trace, solve (A·X=B), and LU/QR decompositions. Install via Composer as markbaker/matrix and use Matrix objects from arrays.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables PHP-based applications to perform complex linear algebra operations (e.g., financial modeling, image processing, data analysis) without custom implementation, reducing development time and errors.
  • Supports roadmap items requiring matrix operations such as machine learning model inference in PHP environments or scientific computation tools.
  • Clear "buy" decision for build-vs-buy: avoids reinventing core matrix math functionality with a well-tested, MIT-licensed package.
  • Use cases include solving linear systems (via solve()), QR/LU decompositions for numerical stability, and statistical calculations where PHP is the primary backend language.

When to Consider This Package

  • Adopt when your PHP project requires standard matrix operations (addition, multiplication, inversion, LU/QR decomposition) and your use cases align with the implemented features (check TO DO list for missing needs like Eigenvalue decomposition).
  • Avoid if:
    • Your project requires advanced decompositions (Cholesky, Eigenvalue) not yet implemented (per TO DO).
    • You're building a new system where Python/R would be more appropriate for heavy numerical computing (e.g., full ML pipelines).
    • Long-term maintenance is critical—last release was 2021, though the package is stable for existing features.
  • Look elsewhere if your stack is non-PHP, or if you need real-time high-performance matrix math (consider C++/Python bindings instead).

How to Pitch It (Stakeholders)

  • Executives: "This package provides a battle-tested, open-source solution for matrix operations in PHP—saving 3-6 months of development time and eliminating custom math code risks. It’s MIT-licensed with zero dependencies, making it cost-effective for financial modeling, image processing, and data analysis features without requiring new infrastructure or specialist hires."
  • Engineering: "It’s a drop-in Composer dependency with clear immutability guarantees, comprehensive tests, and intuitive APIs for common operations (e.g., solve(), QR decomposition). Documentation is thorough, and the BC note for v3.0 ensures smooth upgrades. While advanced features like Eigenvalue decomposition are pending, the current implementation covers 90% of enterprise matrix needs with minimal maintenance overhead."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport