Matrices: Elementary Operations, Elementary Matrices, Permutation Matrices

The following are the two types of elementary matrix operations:

  • Primary or Elementary Row Operations: Primary or elementary row operations are operations done on the rows of an array or matrix.
  • Primary or Elementary Column Operations: Primary or elementary column operations are the elementary matrix operations performed on its columns.

Given matrix \(A\), let \(R_i\) and \(R_j\) denote rows of \(i\) and \(j\) of \(A\), and let \(s\in \mathbb R\) be a nonzero real number. Then the three basic elementary row operations of \(A\) are as follows:

  • The interchange of any two rows or columns (just think of re-writing the equations in a different order). We notate a swap of the \(\)th and \(j\)th rows of an augmented matrix by \(R_i\leftrightarrow R_j\).
  • Multiplication of a row or a column by a non-zero number. We notate the replacement or row \(R_i\) with the row obtained by scaling the original row by s, by \(sR_i\mapsto R_i\).
  • Multiplication of a row or a column by a non-zero number and adding the result to some other row or column. We notate the replacement of \(R_i\) by the difference of that row and a multiple of \(R_j\) by \(R_i-sR_j\mapsto R_i\).

Interchange of any two rows or two columns


Any 2 columns (or rows) of a matrix can be exchanged. If the ith and \(j\)th rows are exchanged, it is shown by \(R_i \leftrightarrow R_j\) and if the \(i\)th and \(j\)th columns are exchanged, it is shown by \(C_i \leftrightarrow C_j\).

For example, given the matrix \(A\) below:
\[A=\begin{bmatrix} 1 &2  &-3  \\ 4 &-5  &6  \end{bmatrix}\]
We apply \(R_1\leftrightarrow R_2\) and obtain:
\[A=\begin{bmatrix} 4 &-5  &6  \\ 1 &2  &-3  \end{bmatrix}\]

Multiplication of Row or Column by a Non-zero Number


The elements of any row (or column) of a matrix can be multiplied by a non-zero number. So if we multiply the ith row of a matrix by a non-zero number k, symbolically it can be denoted by \(R_i \mapsto kR_i\). Similarly, for column it is given by \(C_i \mapsto kC_i\).

Multiplication of Row or Column by a Non-zero Number and Add the Result to the Other Row or Column


The elements of any row (or column) can be added with the corresponding elements of another row (or column) which is multiplied by a non-zero number. So if we add the ith row of a matrix to the jth row which is multiplied by a non-zero number k, symbolically it can be denoted by Ri → Ri + kRj. Similarly, for column it is given by Ci → Ci + kCj.

Why do we use elementary row operations?


Elementary row operations are used in Gaussian elimination in order to transform the given matrix into the reduced row Echelon form.

Elementary Matrices


An elementary matrix is always a square matrix that is obtained by applying one of the row operations to the Identify matrix of the same size.

For example, the matrix \(E=\begin{bmatrix} 1 &0  &0  \\ 0 &3  &0  \\ 0 &0  & 1 \end{bmatrix}\)
is the elementary matrix obtained from multiplying the second row of the 3x3 identify matrix by 3.

Those which involve switching rows of the identify matrix are called permutation matrices (see below).

Multiplication by an Elementary Matrix and Row Operations


To perform any of the three row operations on a matrix \(A\), it suffices to take the product \(EA\), where \(E\) is the elementary matrix obtained by using the desired row operation on the iedntify matrix.

For example, let \(P^{ij}\) denote the elementary matrix which involves switching \(i^{th}\) and \(j^{th}\) rows. Then \(P^{ij}\) is the permutation matrix and 
\[P^{ij}A=B\]
where \(B\) is obtained from A by switching the \(i^{th}\) and \(j^{th}\) rows.

Therefore, instead of performing row operations on martix A, we can row reduce through matrix multiplciation with the appropriate elementary matrix.

Permutation Matrix


Permutation Matrix is a square binary matrix that has exactly one entry of 1 in each row and each column and 0s elsewhere. Each such matrix, say P, represents a permutation of m elements and, when used to multiply another matrix, say A, results in permuting the rows (when pre-multiplying, to form PA) or columns (when post-multiplying, to form AP) of the matrix A.
The permutation matrices of order two are given by
\[\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix},\,\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\]
and of order three are given by
\[\begin{bmatrix} 1 &0  & 0 \\ 0 & 1 & 0 \\ 0 &0  & 1 \end{bmatrix},\, \begin{bmatrix} 1 &0  & 0 \\ 0 & 0 & 1 \\ 0 &1  & 0 \end{bmatrix},\,\begin{bmatrix} 0 &1  & 0 \\ 1 & 0 & 0 \\ 0 &0  & 1 \end{bmatrix},\, \begin{bmatrix} 0 &1  & 0 \\ 0 & 0 & 1 \\ 1 &0  & 0 \end{bmatrix},\,\]
\[\begin{bmatrix} 0 &0  & 1 \\ 1 & 0 & 0 \\ 0 &1  & 0 \end{bmatrix},\, \begin{bmatrix} 0 &0  & 1 \\ 0 & 1 & 0 \\ 1 &0  & 0 \end{bmatrix}\]
Applied to a matrix \(M\), \(A_p\,M\) gives \(M\) with rows interchanged according to the permutation vector \(p\), and \(M\,A_p\) gives \(M\) with the columns interchanged according to the given permutation vector.


Useful References

 


Vector Multiplication: Outer Product

The outer product of two vectors is a matrix. If the two vectors have dimensions n and m, then their outer product is an n × m matrix. 

Given two vectors of size \( m\times 1\) and \( n\times 1\)respectively

\[\mathbf {u} ={\begin{bmatrix}u_{1}\\u_{2}\\\vdots \\u_{m}\end{bmatrix}},\quad \mathbf {v} ={\begin{bmatrix}v_{1}\\v_{2}\\\vdots \\v_{n}\end{bmatrix}}\]

their outer product, denoted \( \mathbf {u} \otimes \mathbf {v}\) , is defined as the \( m\times n\) matrix \( \mathbf {A}\)  obtained by multiplying each element of \( \mathbf {u} \)  by each element of \(\mathbf {v}\):
\[\mathbf {u} \otimes \mathbf {v} =\mathbf {A} ={\begin{bmatrix}u_{1}v_{1}&u_{1}v_{2}&\dots &u_{1}v_{n}\\u_{2}v_{1}&u_{2}v_{2}&\dots &u_{2}v_{n}\\\vdots &\vdots &\ddots &\vdots \\u_{m}v_{1}&u_{m}v_{2}&\dots &u_{m}v_{n}\end{bmatrix}}\]
Or in index notation:
\[(\mathbf {u} \otimes \mathbf {v} )_{ij}=u_{i}v_{j}\]
The outer product \(\mathbf {u} \otimes \mathbf {v}\)  is equivalent to a matrix multiplication \(\mathbf {u} \mathbf {v} ^{\operatorname {T} }\), provided that \(\displaystyle \mathbf {u} \)  is represented as a \( m\times 1\) column vector and \( \mathbf {v} \)  as a \( n\times 1\) column vector (which makes \( \mathbf {v} ^{\operatorname {T} }\) a row vector).

For instance, if \( m=4\) and \( n=3,\) then

\[ \mathbf {u} \otimes \mathbf {v} =\mathbf {u} \mathbf {v} ^{\textsf {T}}={\begin{bmatrix}u_{1}\\u_{2}\\u_{3}\\u_{4}\end{bmatrix}}{\begin{bmatrix}v_{1}&v_{2}&v_{3}\end{bmatrix}}={\begin{bmatrix}u_{1}v_{1}&u_{1}v_{2}&u_{1}v_{3}\\u_{2}v_{1}&u_{2}v_{2}&u_{2}v_{3}\\u_{3}v_{1}&u_{3}v_{2}&u_{3}v_{3}\\u_{4}v_{1}&u_{4}v_{2}&u_{4}v_{3}\end{bmatrix}}\]


Useful References


Outer product - Wikipedia


Numerical Integration: 2nd and 4th order Runge-Kutta schemes

Second-order Runge-Kutta scheme (RK2) There are several variations of the second order Runge-Kutta schemes of numerical integration. They ar...