:orphan:
# MATBAIJ
MATBAIJ = "baij" - A matrix type to be used for block sparse matrices. This matrix type is identical to `MATSEQBAIJ` when constructed with a single process communicator,
and `MATMPIBAIJ` otherwise.
## Options Database Keys
- ***-mat_type baij -*** sets the matrix type to `MATBAIJ` during a call to `MatSetFromOptions()`
## See Also
`Mat`, `MatCreateBAIJ()`, `MATSEQBAIJ`, `MATMPIBAIJ`, `MatMPIBAIJSetPreallocation()`, `MatMPIBAIJSetPreallocationCSR()`
## Level
beginner
## Location
src/mat/impls/baij/mpi/mpibaij.c
## Examples
src/ts/tutorials/ex35.cxx
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/baij/mpi/mpibaij.c)
[Index of all Mat routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)