Читать книгу Data Science in Theory and Practice - Maria Cristina Mariani - Страница 20

2.2.2 Matrices

Оглавление

Definition 2.4 (Matrix) Let and denote positive integers. An ‐by‐ matrix is a rectangular array of real numbers with rows and columns:


The notation denotes the entry in row , column of . In other words, the first index refers to the row number and the second index refers to the column number.

Example 2.1


then .

Definition 2.5 (Transpose of a matrix) The transpose operation of a matrix changes the columns into rows, i.e. in matrix notation , where “” denotes transpose.

Example 2.2


Definition 2.6 (Scaler multiplication of a matrix) The product of a scalar , and a matrix is the matrix obtained by multiplying each entry in the matrix by the scalar:


In other words, .

Definition 2.7 (Matrix addition) The sum of two vectors of the same size is the vector obtained by adding corresponding entries in the vectors:


In other words, .

Definition 2.8 (Matrix multiplication) Suppose is an ‐by‐ matrix and is an ‐by‐ matrix. Then is defined to be the ‐by‐ matrix whose entry in row , column , is given by the following equation:


In other words, the entry in row , column , of is computed by taking row of and column of , multiplying together corresponding entries, and then summing. The number of columns of must be equal to the number of rows of .

Example 2.3


then


Definition 2.9 (Square matrix) A matrix is said to be a square matrix if the number of rows is the same as the number of columns.

Definition 2.10 (Symmetric matrix) A square matrix is said to be symmetric if or in matrix notation all and .

Example 2.4

The matrix is symmetric; the matrix is not symmetric.

Definition 2.11 (Trace) For any square matrix , the trace of denoted by is defined as the sum of the diagonal elements, i.e.


Example 2.5

Let be a matrix with


Then


We remark that trace are only defined for square matrices.

Definition 2.12 (Determinant of a matrix) Suppose is an ‐by‐ matrix,


The determinant of , denoted det or , is defined by


where are referred to as the “cofactors” and are computed from


The term is known as the “minor matrix” and is the matrix you get if you eliminate row and column from matrix .

Finding the determinant depends on the dimension of the matrix ; determinants only exist for square matrices.

Example 2.6

For a 2 by 2 matrix


we have


Example 2.7

For a 3 by 3 matrix


we have


Definition 2.13 (Positive definite matrix) A square matrix is called positive definite if, for any vector nonidentically zero, we have


Example 2.8

Let be a 2 by 2 matrix


To show that is positive definite, by definition


Therefore, is positive definite.

Definition 2.14 (Positive semidefinite matrix) A matrix is called positive semidefinite (or nonnegative definite) if, for any vector , we have


Definition 2.15 (Negative definite matrix) A square matrix is called negative definite if, for any vector nonidentically zero, we have


Example 2.9

Let be a 2 by 2 matrix


To show that is negative definite, by definition


Therefore, is negative definite.

Definition 2.16 (Negative semidefinite matrix) A matrix is called negative semidefinite if, for any vector , we have


We state the following theorem without proof.

Data Science in Theory and Practice

Подняться наверх