Notes on Linear Algebra Part 4
Posted on September 26, 2022 by Bryan Hanson in R bloggers | 0 Comments
[This article was first published on Chemometrics and Spectroscopy Using R , and kindly contributed to R-bloggers ]. (You can report issue about the content on this page here )
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Series: Part 1 Part 2 Part 3
Back in Part 2 I mentioned some of the challenges of learning linear algebra. One of those challenges is making sense of all the special types of matrices one encounters. In this post I hope to shed a little light on that topic.
A Taxonomy of Matrices
I am strongly drawn to thinking in terms of categories and relationships. I find visual presentations like phylogenies showing the relationships between species very useful. In the course of my linear algebra journey, I came across an interesting Venn diagram developed by the very creative thinker Kenji Hiranabe . The diagram is discussed at Matrix World , but the latest version is at the Github link. A Venn diagram is a useful format, but I was inspired to recast the information in different format. Figure 1 shows a taxonomy I created using a portion of the information in Hiranabe’s Venn diagram.1 The taxonomy is primarily organized around what I am calling the structure of a matrix: what does it look like upon visual inspection? Of course this is most obvious with small matrices. To me at least, structure is one of the most obvious characteristics of a matrix: an upper triangular matrix really stands out for instance. Secondarily, the taxonomy includes a number of queries that one can ask about a matrix: for instance, is the matrix invertible? We’ll need to expand on all of this of course, but first take a look at the figure.2
flowchart TD A(all matrices
n x m) --> C(row matrices
1 x n) A --> D(column matrices
n x 1) A ---> B(square matrices
n x n) B --> E(upper triangular
matrices) B --> F(lower triangular
matrices) B --> G{{either
is singular?}} B --> H{{or
is invertible?}} H --> I{{is diagonalizable?}} I --> J{{is normal?}} J --> K(symmetric) K --> L(diagonal) L --> M(identity) J --> N{{is orthogonal?}} N --> M style G fill:#FFF0F5 style H fill:#FFF0F5 style I fill:#FFF0F5 style J fill:#FFF0F5 style N fill:#FFF0F5
Figure 1: Heiarchical relationships between different types of matrices. Blue Rectangles denote matrices with particular, recognizable structures. Pink Hexagons indicate properties that can be queried.
Touring the Taxonomy
Structure Examples
Let’s use R to construct and inspect examples of each type of matrix. We’ll use integer matrices to keep the print output nice and neat, but of course real numbers could be used as well.3 Most of these are pretty straightforward so we’ll keep comments to a minimum for the simple cases.
Rectangular Matrix
A_rect