PHPackages                             baha2rmirzazadeh/phpmath - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. baha2rmirzazadeh/phpmath

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

baha2rmirzazadeh/phpmath
========================

A powerful Math Library for PHP!

1.5.2(6y ago)011MITPHPPHP &gt;=7.1.0

Since Oct 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Baha2rM98/PHPMath)[ Packagist](https://packagist.org/packages/baha2rmirzazadeh/phpmath)[ Docs](https://github.com/Baha2rM98/PHPMath)[ RSS](/packages/baha2rmirzazadeh-phpmath/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (4)Used By (0)

PHPMath
=======

[](#phpmath)

This library contains efficient classes and methods to calculate mathematical things.

Features
--------

[](#features)

Some of this facilities is solving system of equations, linear, quadratic and cubic equation solver, work with prime numbers and etc.

You can find more information in documentation.

**\[Statistics Class\] will be add soon**

Installation
------------

[](#installation)

Use \[Composer\] to install the package:

```
$ composer require baha2rmirzazadeh/phpmath

```

Example
-------

[](#example)

```
use PHPMath\Math\Math;
use PHPMath\Algebra\Algebra;
use PHPMath\Algebra\MatrixFactory;

$math = new Math();
print_r($math->ProbablePrimeNumbersList(20000, 185));
print_r($math->dividable(1858));

$algebra = new Algebra();
print_r($algebra->systemOfLinearEquation([[2, -4, 5], [4, -1, 0], [-2, 2, -3]], [[-33], [-5], [19]]));
print_r($algebra->cubicEquation(1, 2, -1, -2));

$matrix = new MatrixFactory();
print_r($matrix->transpose([[2, 4, 6, -4], [3, 4, 5, 0]]));
print_r($matrix->multiply($matrix->inverse([[1, 2], [3, 4]]), [[1, 2], [3, 4]]));
print_r($matrix->reShape([1, 2, 4, 5, 8, 9], 2, 3));
```

### Classes and Methods description

[](#classes-and-methods-description)

All of classes and methods have documentation, you can read them and figure out how they work

Authors
-------

[](#authors)

- \[Bahador Mirzazadeh\]
- E-Mail: \[\]

License
-------

[](#license)

All contents of this package library are licensed under the \[MIT license\].

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

3

Last Release

2405d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d07b50b87fe3e0736d8fd5f904b0a7ef27c03e23edfee48c61e01729699301f0?d=identicon)[Baha2r](/maintainers/Baha2r)

---

Top Contributors

[![Baha2rM98](https://avatars.githubusercontent.com/u/49520007?v=4)](https://github.com/Baha2rM98 "Baha2rM98 (110 commits)")

---

Tags

math-libraryphp-librarryphpmatrixmathalgebraequation

### Embed Badge

![Health badge](/badges/baha2rmirzazadeh-phpmath/health.svg)

```
[![Health](https://phpackages.com/badges/baha2rmirzazadeh-phpmath/health.svg)](https://phpackages.com/packages/baha2rmirzazadeh-phpmath)
```

###  Alternatives

[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[andig/php-shunting-yard

Refactored repack of https://github.com/droptable/php-shunting-yard

26219.4k](/packages/andig-php-shunting-yard)[rindow/rindow-math-matrix

The fundamental package for scientific matrix operation

13281.5k7](/packages/rindow-rindow-math-matrix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
