Matrices in machine learning part 01

Matrices in machine learning

The importance of study of matrices lies in the fact that many situations in both pure and applied mathematics involve rectangular arrays of numbers. In many branches of business, biological and social sciences, it is necessary to express and use a set of numbers arranged in a rectangular array. For example, suppose a firm produces three apes of good [katex]G_1, G_2, [/katex] and [katex]G_3[/katex] which it sells to two customers [katex]C_1[/katex] and [katex]C_2[/katex]. The monthly sales of these goods (in hundreds) are given in the following table:

Earn Money online without investment Earn Money online from home without investment

Ignoring table headings, we usually write this information more concisely as

\left[\begin{array}{lll}
9 & 4 & 5 \\
2 & 6 & 7
\end{array}\right]

is an example of a matrix. It has two rows and three columns. A formal definition matrix as a rectangular array of numbers follows:

Matrix

Definition. Let F denote the field of real or complex numbers. A rectangular array of m, n elements [katex]a_{j j} \in F,(1 \leq i \leq m, 1 \leq j \leq n)[/katex] arranged in m rows and n columns and enclosed by square brackets such as

\left[\begin{array}{cccccc}
a_{11} & a_{12} & \cdots & a_{1 j} & \cdots & a_{1 n} \\
a_{21} & a_{22} & \cdots & a_{2 j} & \cdots & a_{2 n} \\
\vdots & \vdots & \cdots & \vdots & \cdots & \vdots \\
a_{i 1} & a_n & \cdots & a_{i j} & \cdots & a_{i n} \\
\vdots & \vdots & \cdots & \vdots & \cdots & \vdots \\
a_{m 1} & a_{m 2} & \cdots & a_{m j} & \cdots & a_{m n}
\end{array}\right]

is called an [katex]m \times n[/katex] matrix over the field F (or with entries from the field F ). Matrices are usually designated by capital letters. Instead of writing all the entries of a matrix as above, it is convenient to write the same in an abbreviated notation as [katex]A=\left[a_{i j}\right]_{m \times n}[/katex]. Here [katex]a_{i j}[/katex] denotes the element (or entry) in the ith row and the jth column of the matrix A which hasm rows and n columns. Thus the subscripts i and j of he element [katex]a_{i j}[/katex] of a matrix indicate respectively the row and the column in which [katex]a_0[/katex] is located.

Rectangular matrix

If a matrix A has m rows and n columns then A is said to be a rectangular matrix of order (or size) [katex]m \times n[/katex]. In case m=n, A is said to be a square matrix of order n. vector. Similarly, a single column

\left[\begin{array}{c}
a_{1 j} \\
a_{2 j} \\
\vdots \\
a_{n j}
\end{array}\right]

is an [katex]m \times 1[/katex] matrix and is called a column vector.

Triangular matrix

Definition. An upper (lower) triangular matrix (or a triangular matrix) is a square matrix all of whose elements below (above) the main diagonal (running from upper left to lower right comer) are zero. Thus

A=\left[\begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{1 n} \\
0 & a_{22} & \cdots & a_{2 n} \\
\vdots & \vdots & \cdots & \vdots \\
0 & 0 & \cdots & a_{n n}
\end{array}\right]

is an upper triangular matrix. [katex]a_{11}, a_{22}, \cdots, a_{n n}[/katex] are called elements of the main diagonal.

Definition. A square matrix, all of whose elements are zero except those in the main diagonal, is called a diagonal matrix. Thus, a square matrix [katex]A=\left[a_{i j}\right][/katex] is a diagonal matrix if [katex]a_{i j}=0[/katex] whenever i = j. (Note that this does not say [katex]a_{i j} \neq 0[/katex] whenever i=j ). An example of a diagonal matrix is

\left[\begin{array}{lll}
a & 0 & 0 \\
0 & b & 0 \\
0 & 0 & c
\end{array}\right]

Here [katex]a, b, c \in F[/katex] which may or may not be zero. Definition. A square matrix of size n in which each element of the main diagonal is one and the same nonzero number [katex]k \in F[/katex] and all other elements are zero is alled a scalar matrix of order n. Thus

\left[\begin{array}{llll}
k & 0 & 0 & 0 \\
0 & k & 0 & 0 \\
0 & 0 & k & 0 \\
0 & 0 & 0 & k
\end{array}\right] \text { is a scalar matrix of order 4}

Every scalar matrix is a diagonal matrix. When each k=1 (the identity element of F with respect to multiplication), the war matrix of order n is called the identity matrix and is denoted by [katex]I_n[/katex]. Thus

I_3=\left[\begin{array}{lll}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{array}\right],
I_4=\left[\begin{array}{llll}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{array}\right]

are identity matrices of order 3 and 4 respectively.

Algebra of matrices

Leave a Comment