O'Reilly logo

Statistical Analysis in Forensic Science: Evidential Values of Multivariate Physicochemical Data by Agnieszka Martyna, Grzegorz Zadora, Daniel Ramos, Colin Aitken

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B

Matrices: An introduction to matrix algebra

B.1 Multiplication by a constant

Let us define matrices X and Y with i rows and j columns (i × j):

Unnumbered Display Equation

When multiplying a matrix by a constant each matrix element has to be multiplied:

Unnumbered Display Equation

Example
A matrix inline.jpg multiplied by a constant a = 2, gives the matrix Z:
Unnumbered Display Equation
   In order to load a matrix X and carry out multiplication by a constant, the following commands should be typed into R (Appendix D):
ap02g00
The output is as follows:
ap02g00

B.2 Adding matrices

Adding (or subtracting) matrices can be done only for matrices of the same order. When X and Y are i × j matrices, the corresponding xij and yij elements are summed (or subtracted) to give a resulting matrix Z of the same size i × j:

Unnumbered Display Equation

Example
   In R:
   The output is as follows:

The properties of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required