APPENDIX A

MATRICES

A.1 Overview of Matrices

A matrix represents a table of quantities. It is defined by the number of rows and columns, along with the individual values. For example, the following matrix, X, has three rows and four columns:

images

The following appendix outlines a number of common matrix operations: addition, multiplication, transpose, and inversion.

A.2 MATRIX ADDITION

It is possible to add two or more matrices together, where they have the same number of rows and columns. This is achieved by adding together the individual elements from each matrix. Matrices X and Y are added together in this example.

images

images

A.3 MATRIX MULTIPLICATION

Two matrices may be multiplied only if the number of columns in the first matrix is the same as the number of rows in the second matrix. Two matrices will be used to illustrate the multiplication: P and Q.

images

Initially, the matrices are multiplied by taking the first row of the first matrix and multiplying it by the first column of the second matrix. The value corresponding to this calculation is the first element of the first matrix's row multiplied ...

Get Making Sense of Data II: A Practical Guide to Data Visualization, Advanced Data Mining Methods, and Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.