This section is devoted to very important practical techniques about extracting submatrices from larger matrices and how to build
matrices from smaller parts/blocks.
Recall that we denote by 𝔽m×n the vector space of all m-byn matrices with entries from field 𝔽, which is either ℤ, the set of integers, or ℚ, the set of rational numbers, or ℝ, the set of real numbers, or ℂ, the set of complex numbers.
Manipulations with vectors
Usually, an n-tuple (x₁, x₂, … , xn), written in parenthesis and a row vector [x₁, x₂, … , xn], written in brackets, look as the same object to human eyes. One of the pedagogical virtues of any software package is its requirement to pay close attention to the types of objects used in specific contexts. In particular, the system Python treats these two versions of a vector differently because
where x [bold] is a matrix and 𝔽m×n
is read “m by n” indicating dimensions of a (rows by columns) matrix, not m multiplied by n. This denotes the space of m × n matrices with coefficients from field 𝔽.
If we work only with vectors as one dimension arrays, numpy is good
for their representations. The operations of addition of vectors and multiplication by scalars
work as expected. When we want to work with matrix multiplication, it's
better to define the dimension of the vectors explicitly.
Below we will show how vectors works in numpy first. Then we introduce
matrix and matrix opearitions in numpy.
Comment: break code into three parts: (1) define n-tuple ∈ 𝔽n as x = (1, 2, 3)
(2) define row vector as y = [10, 20, 30]
(3) define column vector z = [100, 200, 300]
append their dimensions!!
When we work with matrices, it is better to define the dimension of
the row vector and column vector explicitly. Otherwise, we will get
unexpected values. Matrix multiplication use the @ peration.
Row vector multiply column vector as inner product calculation.
Column vector multiply row vector as outter procuct calculatin.
Transpose and conjugate transpose in Python package numpy
To extract partitioned matrix, we use row and column index. Pay attention
that matrix in numpy starts row and column index from zero, not one.
Below we show how to extract row, column and block from matrix defined
in numpy. Please note that the ending index after : is not included.
If there is no index number before or after :, it means from the start
or to the end respectively.
Comment: this code does not work
Comment: push all code regarding matrices into next subsection
Example 1:
Show how to break a vector (n-tuple, ro, and column) into two parts
Take x = (1, 2, 3, 4, 5) → x1 = (1, 2, 3) and x2 = (4, 5)
then unite these vectors x1 and x2 into one vector x.
Repeat with row vwcor y = (10, 20, 30, 40, 50) and break in into y1 and y2
Repeat with column vecort z = [100, 200, 300, 400, 500]
■
End of Example 1
Partition Matrices
A block matrix or a partitioned matrix is a matrix that is interpreted as having
been broken into sections called blocks or submatrices.
Partitoned matrices appear in most modern applications of linear algebra because the notation highlights
essential structures of matrices. Partititoning a matrix is a generalization to used previously a list of columns or
rows. Intuitively, a matrix interpreted as a block matrix can be visualized as the original matrix with a collection
of horizontal and vertical lines, which break it up, or partition it, into a collection of smaller matrices. Especially when dimensions of a matrix are large, it may
be beneficial to view a matrix as combined from smaller submatrices. If we simultaneously partition adjacent rows
and adjacent columns of a matrix into groups, this partitions the matrix into submatrices or blocks, resulting
in a representation of the matrix as a partitioned or block matrix.
Example 1: We partition a \( 4 \times 5 \) matrix into 6 blocks:
If matrices A and B are the same size and are partitioned in exactly the same way,
then it is natural to make the same partition of the ordinary matrix sum A + B,
and sum corresponding blocks. Similarly, one can subtract the partitioned matrices. Multiplication of a partitioned
matrix by a scalar is also computed block by block.
It is possible to use a block partitioned matrix product that involves only algebra on submatrices of the
factors. The partitioning of the factors is not arbitrary, however, and requires "conformable partitions" between two
matrices A and B such that all submatrix products that will be used are defined
in usual row-column rule.
where both matrices A and D are square matrices of dimensions \( p\times p \)
and \( q\times q, \) respectively.
If A is nonsingular, the Schur complement of M with respect to A is defined as
The Schur complement is named after Issai Schur (1875--1941), who introduced it in 1917 (I. Schur, Potenzreihen
im Innern des Einheitskreises, J. Reine Angew. Math., 147, 1917, 205–232). The USA mathematician Emilie Virginia Haynsworth (1916--1985) was the first in
1968 paper to call it the Schur complement. The Schur complement is a key tool in the fields of numerical analysis, statistics
and matrix analysis.
Issai Schur was a Russian mathematician (he was born in Mogilev, now Belarus) who worked in Germany for most of his
life. Issai spoke German without a trace of an accent, and nobody even guessed that it was not his first language.
He obtained his doctorate in 1901, became lecturer in 1903 and, after a stay at the University of Bonn,
professor in 1919. As a student of Ferdinand Georg Frobenius (1849--1917), he worked on group representations.
He is perhaps best known today for his result on the existence of the Schur decomposition, which we will discuss later.
In 1922 Schur was elected to the Prussian Academy, proposed by Planck, the secretary of the Academy. From 1933 events
in Germany made Schur's life increasingly difficult. Schur considered himself as a German, not a Jew, but the Nazis
had different opinion. Later in 1935 Schur was dismissed from his chair in Berlin but he continued to work there
suffering great hardship and difficulties. Schur left Germany for Palestine in 1939, broken in mind and body, having
the final humiliation of being forced to find a sponsor to pay the 'Reichs flight tax' to allow him to leave Germany.
Without sufficient funds to live in Palestine he was forced to sell his beloved academic books to the Institute for
Advanced Study in Princeton.
where I is the identity matrix (taken to
be of the appropriate dimension), and square matrix D is assumed to be nonsingular. Similar formula
is valid for invertible matrix A. The following block diagonalization forms learly display the Schur complement
role. If A is nonsingular,
A block diagonal matrix is a block matrix that is a square matrix, and having main diagonal blocks square matrices,
such that the off-diagonal blocks are zero matrices. A block diagonal matrix M has the form
where Ak is a square matrix; in other words, it is the direct sum of
1, ... , An: \( {\bf M} = {\bf A}_1 \oplus {\bf A}_2 \oplus
\cdots \oplus {\bf A}_n . \) It can also be indicated as diag(\( {\bf A}_1 , {\bf A}_2 , \ldots , {\bf A}_n \) ).
Any square matrix can trivially be considered a block diagonal matrix with only one block.
For the determinant and trace, the following properties hold
A block tridiagonal matrix is another special block matrix, which is just like the block diagonal matrix a square
matrix, having square matrices (blocks) in the lower diagonal, main diagonal and upper diagonal, with all other
blocks being zero matrices. It is essentially a tridiagonal matrix but has submatrices in places of scalars.
A block tridiagonal matrix M has the form
where Ak, Bk and Ck are square
sub-matrices of the lower, main and upper diagonal respectively.
Direct Sum
For any arbitrary matrices \( {\bf A} = [a_{i,j} ] \) (of size \( n \times m \) )
and \( {\bf B} = [b_{i,j} \) (of size \( p \times q \) ),
we have the direct sum of A and B, denoted by \( {\bf A} \oplus {\bf B} \) and defined as
Let A be n-by-m matrix and B be p-by-q matrix, then
their Kronecker product or direct product, denoted by \( \otimes ,\)
is the \( pn \times mq \) block matrix:
The Kronecker product is named after the German mathematician Leopold Kronecker (1823--1891), even though there is
little evidence that he was the first to define and use it. Indeed, the Kronecker product should be called the
Zehfuss product because Johann Georg Zehfuss published a paper in 1858 (Zeit. fur Math und Physik, 3, 1858, 298--301),
in which he described the matrix operation we now know as the Kronecker product.