Note 1
Matrices
Matrices are one of the fundamental components that build linear algebra. This note discusses the fundamental concepts and properties of matrices.
1.1 Basic Terms and Notations
As always, let’s get started with the definition.
Definition 1.1.1
A matrix is a 2-dimensional array composed of entries called elements. A matrix is said to have order “\(m\) by \(n\)” and written as \(m \times n\) if there are \(m\) rows and \(n\) columns.
Technically, the elements of a matrix can be anything including functions. However, the majority of the matrices discussed in linear algebra will have numeric elements. Let’s take a look at some examples. \[ A= \begin {bNiceMatrix}[last-row,last-col] 1 & 2 & 3 & 4 & \Vbrace [horizontal-label]{3}{3 \text { rows}} \\ -1 & -2 & -3 & -4 \\ 0 & -1 & 0 & 1 \\ \Hbrace {4}{4 \text { columns}} & \end {bNiceMatrix} \qquad \quad ,\qquad B = \begin {bNiceMatrix}[last-row,last-col] \pi & \Vbrace [horizontal-label]{4}{4 \text { rows}} \\ e \\ 0 \\ 1 \\ \Hbrace {1}{1 \text { column}} \end {bNiceMatrix} \] Here, matrix \(A\) has order \(3 \times 4\) and matrix \(B\) has order \(4 \times 1\). The form of a matrix that has order \(m \times n\) can be generalized as the following. \[ A= \begin {bNiceMatrix}[last-row,last-col] a_{1,1} & a_{1,2} & a_{1,3} & \cdots & a_{1,n} & \Vbrace [horizontal-label]{5}{n \text { rows}} \\ a_{2,1} & a_{2,2} & a_{2,3} & \cdots & a_{2,n} \\ a_{3,1} & a_{3,2} & a_{3,3} & \cdots & a_{3,n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{m,1} & a_{m,2} & a_{m,3} & \cdots & a_{m,n} \\ \Hbrace {5}{m \text { columns}} & \end {bNiceMatrix} \] It is also worth noting that matrix \(A\) is often represented as \([a_{ij}]\) and the elements as \(a_{ij}\) like \(a_{12}\) for \(a_{1, 2}\).
Definition 1.1.2
An element \(a_{ij}\) is said to have row index of \(i\) and column index of \(j\).
As you probably have guessed, we assign special names to some matrices depending on \(m\) and \(n\).
Definition 1.1.3
Square matrices are matrices with an equal number of rows and columns. The elements with the same row and column index are called diagonal elements of the matrix. The collection of such elements is called main diagonal, or principal diagonal.
What if either \(m\) or \(n\) is equal to \(1\)? Yes, we do have special terms for them.
Definition 1.1.4
Row matrices are matrices that are composed of only one row. A column matrix is an array composed of one column.
If you have a machine learning background, you likely have heard of the term “high dimensional arrays or vectors.” Here, the term “dimension” works the same way.
Definition 1.1.5
The dimension of a row or column matrix is the number of components, or the elements. An \(\mathbf {n}\)-tuple is an \(n\)-dimensional row or column vector.
Let’s take a look at an example from the previous matrix \(B\) reproduced below.
We could also define matrices by their elements.
Definition 1.1.6
A zero matrix is a matrix with all its elements as \(0\).
With the fundamental terms in mind, let’s discuss the properties of matrices.