## Class Matrix

The right-hand-side is usually dense or at least it was the case in my applications. In this case I have used the class Matrix that was already employed previously in sections devoted to dense matrices. I will describe this class in more detail here. The class is declared in matrices.h and actually most functions are defined […]

## Using LAPACK from C++

I like C++ and after I have switched from Fortran to C++ at the beginning of the nineties, I wanted to do everything in C++ including linear algebra. My first linear algebra in C++ was GNUSSL by Robert D. Pierce. It was a nice template library that helped me a lot to understand how one […]

## Using decomp and solve from C++

The goal of this section is basically to repeat the rules from the section Using Fortran Subroutines from C++ with the example of the Fortran subroutines decomp and solve from the book Computer Methods for Mathematical Computations. I will use a simple matrix class described in matrix.h (see also Class Matrix). The class is based on vector<double> and it […]

## Linear Solve in Python (NumPy and SciPy)

The LAPACK library for linear algebra is integrated in many interactive environments (for example, Mathematica or Matlab) and this is the simplest way to access it. In this chapter, I will demonstrate the use of some LAPACK routines from SciPy in Python. Below it is assumed that NumPy and SciPy are installed in your Python […]

## Using decomp and solve from Fortran

decomp is a simple implementation in Fortran of the LU-decomposition from the book Computer Methods for Mathematical Computations. It is just 169 lines and theoretically one can use the code to learn the algorithm. It also allows you to get the flavor of Fortran, the code, I guess, is written in Fortran IV. Fortran is a […]

## Linear Solve: Overview

Solution of a system of linear equations is the task encountered most often in linear algebra. A good starting point from the theoretical side is the page in Wikipedia http://en.wikipedia.org/wiki/System_of_linear_equations Numerical methods to solve a linear system are divided in two groups: direct and iterative methods. For dense matrices, people use mostly direct methods and […]

## NumPy and SciPy

At IMTEK, I have been working with Mathematica and I should say that it is a pretty good tool for fast prototyping. The only disadvantage is that it is a commercial tool and it is necessary to purchase a license. As a result, when I finished my work at IMTEK, I have decided to look what […]

## LAPACK Users’ Guide

LAPACK is the best linear algebra library and it is free. Hence it would be just stupid not to use it. LAPACK Users’ Guide gives a good introduction in the library, so it is good to have it. The guide with the difference to the code does cost some money but this will be a […]

## BLAS: Basic Linear Algebra System

Linear algebra algorithms can be written in terms of standard matrix-vector operations. This operations could be optimized for a particular hardware and thus one can increase performance by using the optimized BLAS libraries. In practice this means that it is must to use an optimized BLAS in your work. A nice introduction to BLAS is in […]

## Numerical Methods and Software

David Kahaner, Cleve Moler, Stephen Nash, 1988 This book is similar to the Forsythe book, in a way this is an update. I have browsed the book in 1989, while being at NIST and then used the code from the book for some time. The code is available now at the pages of Stephen Nash […]

## Computer Methods for Mathematical Computations

George Elmer Forsythe, Michael A. Malcolm, Cleve B. Moler, 1977 With this book, I have learned numerical methods, well, it was already pretty long ago, in 1980. I still like this book though. It is nicely written and well suited to  learn numerical methods from the practical side. Some disadvantage nowadays is that the code […]

## Matrix Multiplication

Introduction Interactive System for Numerical Linear Algebra Direct Implementation with Compiled Language Fortran C C++ Using Specialized Libraries: BLAS and ATLAS Using make Compiling BLAS and ATLAS Calling DGEMM from Fortran Calling DGEMM from C and C++ Conclusion Problems Discussion code for the chapter compiled ATLAS 3.6 for Windows Introduction Matrix multiplication is a common […]