28: Sparse Matrices in Matlab
- Page ID
- 48483
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
Throughout this chapter we shall assume that \(A\) is an \(n \times n\) sparse matrix. By "sparse" here we mean that most of the entries of \(A\) are zero. We shall define the number of nonzero entries of \(A\) by \(n n z(A)\). Thus, by our assumption on sparsity, \(n n z(A)\) is small compared to \(n^{2}\); in fact, in all of our examples, and indeed in many MechE examples, \(n \mathrm{nz}(A)\) is typically \(c n\), for a constant \(c\) which is \(\mathcal{O}(1)\) - say \(c=3\), or 4 , or 10 . (We will often consider families of matrices \(A\) in which case we could state more precisely that \(c\) is independent of \(n\).)