#include "petscmat.h" PetscErrorCode MatSetTransposeNullSpace(Mat mat,MatNullSpace nullsp)Logically Collective on Mat and MatNullSpace
mat | - the matrix | |
nullsp | - the null space object |
The fundamental theorem of linear algebra (Gilbert Strang, Introduction to Applied Mathematics, page 72) states that the domain of a matrix A (from R^n to R^m (m rows, n columns) R^n = the direct sum of the null space of A, n(A), + the range of A^T, R(A^T). Similarly R^m = direct sum n(A^T) + R(A). Hence the linear system A x = b has a solution only if b in R(A) (or correspondingly b is orthogonal to n(A^T)) and if x is a solution then x + alpha n(A) is a solution for any alpha. The minimum norm solution is orthogonal to n(A). For problems without a solution the solution that minimizes the norm of the residual (the least squares solution) can be obtained by solving A x = \hat{b} where \hat{b} is b orthogonalized to the n(A^T).
Krylov solvers can produce the minimal norm solution to the least squares problem by utilizing MatNullSpaceRemove().
Level:advanced
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages