03 Added in Boost 1.29.0
Categories: Math

uBLAS provides tensor, matrix, and vector classes as well as basic linear algebra routines. Several dense, packed and sparse storage schemes are supported.


Stefan Seefeld
David Bellot

Boost.uBLAS Linear Algebra Library

Boost.uBLAS is part of the Boost C++ Libraries. It is directed towards scientific computing on the level of basic linear algebra constructions with matrices and vectors and their corresponding abstract operations.


uBLAS is documented at The development has a wiki page. The tensor extension has a separate wiki page.


Distributed under the Boost Software License, Version 1.0.


  • Header-only
  • Tensor extension requires C++17 compatible compiler, compiles with
    • gcc 7.3.0
    • clang 6.0
    • msvc 14.1
  • Unit-tests require Boost.Test

Build Status

Branch Travis Appveyor Docs
master Build Status Build status codecov Documentation
develop Build Status Build status codecov Documentation


Name Purpose
doc documentation
examples example files
include headers
test unit tests
benchmarks timing and benchmarking

More information

  • Ask questions in stackoverflow with boost-ublas or ublas tags.
  • Report bugs and be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
  • Submit your patches as pull requests against develop branch. Note that by submitting patches you agree to license your modifications under the Boost Software License, Version 1.0.
  • Developer discussions about the library are held on the Boost developers mailing list. Be sure to read the discussion policy before posting and add the [ublas] tag at the beginning of the subject line
  • For any other questions, you can contact David, Stefan or Cem: david.bellot-AT-gmail-DOT-com, cem.bassoy-AT-gmail-DOT-com stefan-AT-seefeld-DOT-name