nalgebra
General-purpose linear algebra library with transformations and statically-sized or dynamically-sized matrices.
0.35.0
85M downloads/mo
#892 most downloaded on crates.io
dimforge/nalgebra
What this package is like to depend on
Last release 3 months ago
24 May 2026
Release timing varies
gaps range from 2 weeks to 9 months
Rarely documented
notes for 20 of 118 stable releases
6 versions withdrawn
withdrawn after publishing
12 years old
124 releases · first in 2014
4 releases in the last 12 months
see the full history below
Release timeline
124 releases · Nov 2014 to May 2026Releases
latest 60 of 124-
0.35.024 May 2026Release notes
Open source →Added
- Add the Bunch–Kaufman LDL decomposition (
LBLT) via the newMatrix::lbltmethod #1591. - Add
OneNormand theMatrix::one_normmethod computing the induced matrix 1-norm (maximum absolute column sum) #1591. - Add the
convert-glam033feature to enable conversion from/to types fromglamv0.33.
Changed
- Bumped MSRV to 1.89.0.
- Updated
simbadependency to 0.10. - Updated
randdependency to 0.10 andrand_distrto 0.6. - Removed the
convert-glamXXXfeatures for allglamversions prior to 0.30 #1598. - Clarified norm documentation:
EuclideanNormis the Frobenius norm for matrices,LpNorm/UniformNormare entrywise, not induced matrix norms #1591. nalgebra-lapack: updatedthiserrorto 2.0.
Fixed
- Fix the
T: Syncbound onimpl Send for ViewStorageso view storages can be sent across threads whenT: Send#1581.
- Add the Bunch–Kaufman LDL decomposition (
-
0.34.228 Mar 2026Release notes
Open source →Added
- Add
convert-glam031andconvert-glam032features for conversion from/toglamv0.31 and v0.32 #1597.
Fixed
- Fix
SymmetricEigenroutine #1210. - Fix matrix parsing grammar to accept numbers without leading zeros, e.g. ".45" #1578.
- Fix build with
glaminno_stdenvironments #1555. - Fix rustdoc warnings #1511.
- Implement absolute threshold for early deflation in Schur algorithm #1565.
- Assert matrix shapes for
Matrix::abs_diff_eq#1568.
- Add
-
0.34.120 Sep 2025Release notes
Open source →Added
- Added
encasefeature, providingencasetrait implementations fornalgebratypes.
- Added
-
0.34.031 Jul 2025Release notes
Open source →Added
- Add the
convert-glam030feature to enable conversion from/to types fromglamv0.30. - Add the
defmtcargo feature that enables derives ofdefmt::Formatfor all no-std types.
Changed
- Bumped MSRV to 1.87.0.
- Updated rand dependency to 0.9.0.
- Renamed associated const
DimName::USIZEtoDimName::DIM. - Moved to Rust 2024 edition.
- Several methods are now
constwhenever possible. See details in #1522. - Features for conversion from/to types from
glam(such asconvert-glam029) no longer enable default features forglam, allowing use inno_stdenvironments.
Fixed
- Fix infinite loop when attempting to take the Schur decomposition of a 0 matrix.
- Add the
-
0.33.328 Mar 2026 -
0.33.229 Oct 2024Release notes
Open source →Added
- Add the
convert-glam029feature to enable conversion from/to types fromglamv0.29.
- Add the
-
0.33.116 Oct 2024Release notes
Open source →Added
- Add implementations of
bytemucktraits for isometries and similarities. - Implement
AsRef<[T]>for matrices with contiguous storage. - Enable the
num-complex/bytemuckfeature when theconvert-bytemuckfeature is enabled.
- Add implementations of
-
0.33.023 Jun 2024Release notes
Open source →Fixed
- Fix a memory leak in
Matrix::generic_resize. - Fix
glm::is_nullto check the vector magnitude instead of individual components. - Ensure that inverting a 4x4 matrix leaves it unchanged if the inversion fails.
Added
- Add the
glam-0.28feature to enable conversion from/to types fromglamv0.28. - Add a
stack!macro for concatenating matrices. See #1375.
Modified
- The
cudafeature has been removed, as the toolchain it depends on is long abandoned. - Update to
simba0.9. See the changelog ofsimbafor details. - Update the
nalgebra-macroscrate tosyn2.0. - Remove the scalar type
Tfrom theAllocatortrait parameters. Instead ofAllocator<T, R, C>, use the simplerAllocator<R, C>.
- Fix a memory leak in
-
0.32.612 Jun 2024Release notes
Open source →Added
- Add the
glam-0.27feature to enable conversion from/to types fromglamv0.27.
- Add the
-
0.32.528 Mar 2024Nothing published for this version
-
0.32.419 Feb 2024Release notes
Open source →Added
- Add the
glam-0.25feature to enable conversion from/to types fromglamv0.25.
- Add the
-
0.32.309 Jul 2023Release notes
Open source →Modified
- Statically sized matrices are now serialized as tuples to match how serde serialized plain arrays.
- Don’t require
Scalarfor matrixPartialEqandEq.
Added
- Allow trailing punctuation in macros
vector!,matrix!,point!, etc. - Add the methods
Matrix1::as_scalar,::as_scalar_mut,::to_scalar,::into_scalar. - Add
Rotation3::euler_angles_ordered, a generalized euler angles calculation. - Add the
glam-0.24feature to enable conversion from/to types fromglamv0.24. - Add the
glam-0.25feature to enable conversion from/to types fromglamv0.25. - Add the
lerpmethod to points. - Implement
CloneforMatrixIter.
Fixed
- Fixed severe catastrophic cancellation issue in variance calculation.
-
0.32.207 Mar 2023Release notes
Open source →Added
- Add the
glam-0.23to enable conversion from/to type fromglamv0.23.
- Add the
-
0.32.114 Jan 2023Release notes
Open source →Modified
- Updated
nalgebra-macrosto use the newDyn, avoiding macro-generated deprecation warnings.
- Updated
-
0.32.014 Jan 2023 withdrawnRelease notes
Open source →Modified
- Renamed all
MatrixSlicetypes toMatrixView. In general all occurrences of the worldSliceorslicehave been replaced byVieworview. - Deprecated all the types involving
Slicein its name, in favor of the wordView. - Make it so that most
nalgebraobjects archive as themselves (when usingrkyvfor serialization). - Renamed
DynamictoDynand makeDyna tuple struct.
Added
- Add
Cholesky::ln_determinantto compute the natural logarithm of the determinant of a matrix decomposed with Cholesky. This can be more numerically stable than computing the determinant itself when very small and/or large values are involved. - Added new methods
Matrix::as_viewandMatrix::as_view_mut, which are very useful when working with view-based APIs. - Added parallel column iterator using
rayon:Matrix::par_column_iterandMatrix::par_column_iter_mut. Therayonfeature must be enabled to access these methods. - Implement
ReshapableStoragefor matrix slices (only for unit strides at the moment). - Add
U0, U1, …constants alongside theU0, U1, …types. This lets us writeU4instead ofU4::name()orConst::<4>when we need const dimensions.
Fixed
- Fixed the implementation of
Rotation3::euler_anglesto return the angles in the documented order (roll, pitch, yaw).
- Renamed all
-
0.31.413 Nov 2022Release notes
Open source →Added
- Add a
convert-glam022feature to enable conversion betweennalgebraandglam v0.22.
- Add a
-
0.31.330 Oct 2022Release notes
Open source →Added
- Add
Matrix::try_castto attempt casting the inner scalar types when that cast may fail.
Fixed
- Fixed the usage of
CheckByteswithrkyv.
- Add
-
0.31.209 Oct 2022Release notes
Open source →Modified
- Use
#[inline]on theDimimplementation forConstto improve opt-level 1 performance. - Make the
Point::newconstructions const-fn.
Added
- Add
UnitVector::castto change the underlying scalar type.
- Use
-
0.31.131 Jul 2022Release notes
Open source →Modified
- Improve performances of multiplication of two sparse matrices.
Added
- Add
Matrix::from_row_iteratorto build a matrix from an iterator yielding components in row-major order. - Add support for conversion from/to types of
glam0.21. nalgebra-sparse: add support for the matrix-market export of sparse matrices.nalgebra-lapack: add aGEfor solving the generalized eigenvalues problem.
Fixed
- Fix
Rotation3::from_matrixandUnitQuaternion::from_matrixwhen the input matrix is already a valid rotation matrix.
-
0.31.030 Apr 2022Release notes
Open source →Breaking changes
- Switch to
cust0.3 (for CUDA support). - Switch to
rkyv0.7 - Remove support for serialization based on
abomonation. - Remove support for conversions between
nalgebratypes andglam0.13.
Modified
- The aliases for
Consttypes have been simplified to helprust-analyzer.
Added
- Add
TryFromconversion betweenUnitVector2/3/4andglam’sVec2/3/4. nalgebra-sparse: added support for serialization of sparse matrices withserde.nalgebra-sparse: add a CSC matrix constructor from unsorted (but valid) data.nalgebra-lapack: add generalized eigenvalues/eigenvectors calculation + QZ decomposition.
Fixed
- Improve stability of SVD.
- Fix slerp for
UnitComplex.
- Switch to
-
0.30.109 Jan 2022 -
0.30.002 Jan 2022Release notes
Open source →Breaking changes
- The
Dimtrait is now marked as unsafe. - The
Matrix::powandMatrix::pow_mutmethods only allow positive integer exponents now. To compute negative exponents, the user is free to invert the matrix before callingpowwith the exponent’s absolute value. - Remove the
Boundedrequirement fromRealField. Replace it by methods returningOption<Self>so that they can still be implemented by unbounded types (by returningNone). - The
ComplexFieldtrait derives fromFromPrimitiveagain. We can actually keep this because all its methods returnOption<Self>, meaning that it could be implemented by any type.
Modified
- Use more concise debug impls for matrices and geometric transformation types.
- The singular values computed by the SVD are now sorted in increasing order by default. Use
SVD::new_unorderedinstead to reproduce the older behavior without the sorting overhead. - The
UnitDualQuaternion::sclerpmethod will no longer panic when given two equal rotations. - The
Matrix::select_rowsandMatrix::select_columnsmethods no longer require the matrix components to implement the traitZero. - The
Matrix::powandMatrix::pow_mutmethods will now also work with integer matrices.
Added
- Added the conversion trait
From<Vec<T>>and methodfrom_vec_storageforRowDVector. - Added implementation of
FromandIntofor converting betweennalgebratypes and types fromglam 0.18. These can be enabled by enabling theconvert-glam018cargo features. - Added the methods
Matrix::product,::row_product,::row_product_tr, and::column_productto compute the product of the components, rows, or columns, of a single matrix or vector. - The
Defaulttrait is now implemented for most geometric types:Point,Isometry,Rotation,Similarity,Transform,UnitComplex, andUnitQuaternion. - Added the
Scalegeometric type for representing non-uniform scaling. - Added
Cholesky::new_with_substitutethat will replace diagonal elements by a given constant wheneverCholeskymeets a non-definite-positiveness. - Re-added the conversion from a vector/matrix slice to a static array.
- Added the
cudafeature that enables the support of rust-cuda for usingnalgebrafeatures with CUDA kernels written in Rust. - Added special-cases implementations for the 2x2 and 3x3 SVDs for better accuracy and performances.
- Added the methods
Matrix::polar,Matrix::try_polar, andSVD::to_polarto compute the polar decomposition of a matrix, based on its SVD. nalgebra-sparse: provide constructors for unsorted but otherwise valid data using the CSR format.nalgebra-sparse: added reading MatrixMarked data files to a sparseCooMatrix.
Fixed
- Fixed a potential unsoundness with
matrix.get(i)andmatrix.get_mut(i)whereiis anusize, andmatrixis a matrix slice with non-default strides. - Fixed potential unsoundness with
vector.perpwherevectorisn’t actually a 2D vector as expected. - Fixed linkage issue with
nalgebra-lapack: the user ofnalgebra-lapackno longer have to addextern crate lapack-srcto theirmain.rs. - Fixed the
no-stdbuild ofnalgebra-glm. - Fix the
powandpow_mutfunctions (the result was incorrect for some exponent values).
- The
-
0.29.008 Aug 2021Nothing published for this version
-
0.28.011 Jul 2021Nothing published for this version
-
0.27.104 Jun 2021Nothing published for this version
-
0.27.002 Jun 2021 withdrawnNothing published for this version
-
0.26.227 Apr 2021Nothing published for this version
-
0.26.112 Apr 2021Nothing published for this version
-
0.26.012 Apr 2021 withdrawnNothing published for this version
-
0.25.401 Apr 2021Nothing published for this version
-
0.25.307 Mar 2021Nothing published for this version
-
0.25.206 Mar 2021Nothing published for this version
-
0.25.102 Mar 2021Nothing published for this version
-
0.25.001 Mar 2021 withdrawnRelease notes
Open source →This updates all the dependencies of nalgebra to their latest version, including:
- rand 0.8
- proptest 1.0
- simba 0.4
New crate: nalgebra-sparse
Alongside this release of
nalgebra, we are releasingnalgebra-sparse: a crate dedicated to sparse matrix computation withnalgebra. Thesparsemodule ofnalgebraitself still exists for backward compatibility, but it will be deprecated soon in favor of thenalgebra-sparsecrate.Added
- Add
UnitDualQuaternion, a dual-quaternion with unit magnitude which can be used as an isometry transformation. - Add
UDU::new()andmatrix.udu()to compute the UDU factorization of a matrix. - Add
ColPivQR::new()andmatrix.col_piv_qr()to compute the QR decomposition with column pivoting of a matrix. - Add
from_basis_uncheckedto all the rotation types. This builds a rotation from a set of basis vectors (representing the columns of the corresponding rotation matrix). - Add
Matrix::cap_magnitudeto cap the magnitude of a vector. - Add
UnitQuaternion::append_axisangle_linearizedto approximately append a rotation represented as an axis-angle to a rotation represented as an unit quaternion. - Mark the iterators on matrix components as
DoubleEndedIter. - Re-export
simba::simd::SimdValueat the root of thenalgebracrate.
-
0.24.129 Jan 2021Nothing published for this version
-
0.24.030 Dec 2020Nothing published for this version
-
0.23.218 Dec 2020Nothing published for this version
-
0.23.119 Nov 2020Nothing published for this version
-
0.23.026 Oct 2020Nothing published for this version
-
0.22.113 Oct 2020Nothing published for this version
-
0.22.025 Aug 2020Nothing published for this version
-
0.21.107 Jun 2020Nothing published for this version
-
0.21.005 Apr 2020Nothing published for this version
-
0.20.002 Mar 2020Nothing published for this version
-
0.19.028 Oct 2019Nothing published for this version
-
0.18.127 Aug 2019Nothing published for this version
-
0.18.031 Mar 2019Nothing published for this version
-
0.17.318 Mar 2019Nothing published for this version
-
0.17.218 Feb 2019Nothing published for this version
-
0.17.117 Feb 2019Nothing published for this version
-
0.17.003 Feb 2019Nothing published for this version
-
0.16.1408 Sep 2019Nothing published for this version
-
0.16.1329 Dec 2018Nothing published for this version
-
0.16.1204 Dec 2018Nothing published for this version
-
0.16.1123 Nov 2018Nothing published for this version
-
0.16.1010 Nov 2018Nothing published for this version
-
0.16.908 Nov 2018Nothing published for this version
-
0.16.801 Nov 2018Nothing published for this version
-
0.16.730 Oct 2018Nothing published for this version
-
0.16.627 Oct 2018Nothing published for this version