skillfed

lineax

Linear solvers in JAX and Equinox.

lineax v0.1.1 523.2K downloads/30d#6,197 on PyPI572
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) Active released

What it is and what it does

Lineax is a JAX library for solving linear systems and least-squares problems, with support for both explicit matrices and implicit linear operators (e.g., Jacobians, transposes). It integrates with JAX's autodiff, autoparallelism, and GPU/TPU support, allowing you to differentiate through linear solves with numerically stable gradients. The library works with PyTree-valued matrices and vectors, and supports structured matrix types like symmetric matrices.

Typical use cases include solving Ax=b when A may be ill-posed or rectangular, computing least-squares solutions via QR or other solvers, and building implicit operators for problems where materializing the full matrix is infeasible or inefficient. It is part of the broader JAX ecosystem and depends on Equinox for PyTree utilities and jaxtyping for type annotations.

Use it for:

  • Solve overdetermined or underdetermined linear systems without materializing the full matrix operator.
  • Compute least-squares solutions with numerically stable gradients for optimization and inverse problems.
  • Build implicit Jacobian and Hessian operators for Newton-like methods in scientific computing.
  • Solve quadratic minimization problems by constructing a Hessian linear operator and solving the normal equations.
  • Integrate linear solves into JAX-based neural network training pipelines with automatic differentiation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Lineax solves linear systems and least-squares problems in JAX, handling both explicit matrices and implicit linear operators without materializing them.

Yes, if you work in JAX and need linear solves or least-squares. The library is actively maintained, has low install friction, and integrates seamlessly with JAX's autodiff and GPU/TPU support. The Apache 2.0 license poses no restrictions. Alpha status (Development Status 3) means the API may change, but the package is in active use and well-documented.

Install

lineax on PyPI

pip

pip install lineax

uv

uv add lineax

poetry

poetry add lineax

Installing lineax

Before you install

Low install friction with a pure-Python wheel. Actively maintained as of August 2026 with recent releases. Requires JAX 0.4.38+ and Equinox 0.11.10+, which are themselves substantial dependencies.

License in practice

Apache 2.0 permissive license allows commercial and derivative use with minimal restrictions—attribution and license notice required in distributions.

Quickstart

pip install lineax

import jax.random as jr
import lineax as lx

matrix_key, vector_key = jr.split(jr.PRNGKey(0))
matrix = jr.normal(matrix_key, (10, 8))
vector = jr.normal(vector_key, (10,))
operator = lx.MatrixLinearOperator(matrix)
solution = lx.linear_solve(operator, vector, solver=lx.QR())

Requires Python 3.11+, JAX 0.4.38+, and Equinox 0.11.10+.

Verify before relying

  • Whether structured matrix support (e.g. symmetric) provides measurable performance gains in typical workflows.
  • Stability and numerical accuracy of gradients through least-squares compared to alternative autodiff approaches.
  • Performance characteristics of implicit operators on GPU/TPU relative to explicit matrix solves.

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (~=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 4 — equinox, jax, jaxtyping, typing-extensions
Maintenance actively maintained — 105 days since the last release
Last repo commit
First released
Downloads 523,152/month — #6,197 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: lineax-0.1.1-py3-none-any.whl

Keywords: deep-learning, equinox, jax, least-squares, linear-solvers, neural-networks, numerical-methods

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Financial and Insurance IndustryIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: Mathematics

Tags

jax linear solverleast squares solver jaxlinear algebra jaxmatrix equation solverjax numerical linear algebraimplicit linear operatorsqr solver jax
jax-ecosystemnumerical-methodsautodiff

More Artificial Intelligence packages