Matrix
From Math Images
(→Matrix Addition) 

Line 42:  Line 42:  
===Matrix Addition===  ===Matrix Addition===  
  For matrix addition, two matrices <math> A = [a_{ij}]</math> and <math> B = [b_{ij}]</math> must have the same size in which case their matrix sum is defined as <math>A + B = [a_{ij} + b_{ij}]</math>. That is, each entry in the <math>A+B </math> matrix is the sum of the corresponding entries in the separate matrices. For instance:<br />  +  For matrix addition, the sum of two matrices <math> A = [a_{ij}]</math> and <math> B = [b_{ij}]</math> must have the same size in which case their matrix sum is defined as <math>A + B = [a_{ij} + b_{ij}]</math>. That is, each entry in the <math>A+B </math> matrix is the sum of the corresponding entries in the separate matrices. For instance:<br /> 
::<math> \begin{bmatrix}  ::<math> \begin{bmatrix}  
a & b \\  a & b \\  
Line 58:  Line 58:  
====Properties of Matrix Addition====  ====Properties of Matrix Addition====  
  #'''Addition is <balloon title="For two matrices A and B of the same size, the order  +  #'''Addition is <balloon title="For two matrices A and B of the same size, the order of the terms around the operation does not matter; the results are still equal">Commutative</balloon>''':<math>A+B=B+A</math> 
  #'''Addition is <balloon title="For three matrices, A, B and C, of the same size, the way  +  #'''Addition is <balloon title="For three matrices, A, B and C, of the same size, the way the terms are grouped around the operation; the results are still equal.">Associative</balloon>''':<math>(A+B)+C=A+(B+C)</math> 
#'''<balloon title="For an ''m x n'' matrix A and a matrix of the same size as A with all its entries being the number 0, the resulting matrix is one where all its resulting sum of entries is exactly like those of original matrix A">Identity</balloon> of Addition''':<math>A+0=A</math>  #'''<balloon title="For an ''m x n'' matrix A and a matrix of the same size as A with all its entries being the number 0, the resulting matrix is one where all its resulting sum of entries is exactly like those of original matrix A">Identity</balloon> of Addition''':<math>A+0=A</math>  
Line 66:  Line 66:  
1. '''Proof for Commutativity of Addition''': <math>A+B=B+A </math>  1. '''Proof for Commutativity of Addition''': <math>A+B=B+A </math>  
  By the definition of matrix equality, we want to show  +  By the definition of matrix equality, we want to show that the corresponding entries of ''A+B'' and ''B+A'' are the same: 
  :::::<math>  +  :::::<math>Claim: (A+B)_{ij}=(B+A)_{ij} </math> 
  We work from the left hand side  +  We work from the left hand side of the above proposition and attempt to prove that it equals the right hand side of the proposition. 
  So starting from the  +  So starting from the left, we apply the definition of matrix addition to ''A+B'', obtaining: 
:::::<math>(A+B)_{ij}= A_{ij} + B_{ij} </math>  :::::<math>(A+B)_{ij}= A_{ij} + B_{ij} </math>  
  Notice that we have reduced matrices ''A'' and ''B'' down to their real number entries, so the commutativity of real numbers  +  Notice that we have reduced matrices ''A'' and ''B'' down to their real number entries, so the commutativity of real numbers applies. That is: 
:::::<math>A_{ij}+B_{ij}=B_{ij} + A_{ij} </math>  :::::<math>A_{ij}+B_{ij}=B_{ij} + A_{ij} </math>  
Line 84:  Line 84:  
:::::<math> (A+B)_{ij}=(B+A)_{ij} </math>  :::::<math> (A+B)_{ij}=(B+A)_{ij} </math>  
  That is, we have shown that the left hand side of the original proposition equals its right hand side.  +  That is, we have shown that the left hand side of the original proposition equals its right hand side. Thus, matrix addition is commutative. 
2. '''Proof for Associativity of Addition''': <math>(A+B) + C = A + (B+C) </math>  2. '''Proof for Associativity of Addition''': <math>(A+B) + C = A + (B+C) </math>  
  By the definition of matrix equality, we want to show  +  By the definition of matrix equality, we want to show that the entries of (''A+B'')+ ''C'' and ''A''+(''B+C'') are the same. That is: 
  :::::<math>  +  :::::<math> Claim: ((A+B) + C)_{ij} = (A + (B+C))_{ij} </math> 
  We work from the left hand side  +  We work from the left hand side of the above proposition and attempt to prove that it equals the right hand side of the proposition. 
  Starting from the  +  Starting from the left, we apply the definition of matrix addition to the big composite matrix ((A+B)+C), breaking it down into two separate matrices, (''A+B'') and ''C''. 
:::::<math> ((A+B)+C)_{ij}=(A+B)_{ij} + C_{ij} </math>  :::::<math> ((A+B)+C)_{ij}=(A+B)_{ij} + C_{ij} </math>  
  Then, we break down the matrix ''  +  Then, we break down the matrix (''A+B'') into the separate matrices ''A'' and ''B'' into the real number entries of ''A'' and ''B'' by the definition of matrix addition: 
  :::::<math>  +  :::::<math>(A+B)_{ij} + C_{ij}=(A_{ij} + B_{ij})+ C_{ij} </math> 
  Because we are now dealing with real  +  Because we are now dealing with real number entries, the associativity of real numbers applies to the entries of matrices ''A,'' ''B,'' and ''C'': 
:::::<math>(A_{ij} + B_{ij})+ C_{ij} =A_{ij} + (B_{ij} + C_{ij})</math>  :::::<math>(A_{ij} + B_{ij})+ C_{ij} =A_{ij} + (B_{ij} + C_{ij})</math>  
  Notice that the  +  Notice that the right hand side of the above equality includes the sum of the <math>ij</math>th entries for each of the ''B'' and ''C'' matrices, which is actually just the <math>ij</math>th entry of ''B+C'': 
:::::<math>A_{ij} + (B_{ij} + C_{ij})=A_{ij} + (B+C)_{ij}</math>  :::::<math>A_{ij} + (B_{ij} + C_{ij})=A_{ij} + (B+C)_{ij}</math>  
Revision as of 11:36, 26 July 2013
This is a Helper Page for:


Blue Fern 
Summation Notation 
Change of Coordinate Systems 
Math for Computer Graphics and Computer Vision 
A matrix is a rectangular array of numbers that can be used to store numbers for later access. In this helper page, we will discuss the mathematical properties of matrices.
Contents 
Size
A matrix is typically described in terms of its size. If a Matrix M has m rows and n columns, we say that M has size m x n, or more simply, we say M is m x n. The numbers m and n are sometimes called the dimensions of M.
Matrix Notation
Matrices and their entries are closely related. To avoid confusion, separate notation exists for both matrices and entries.
Before we begin, we must introduce the general notation used to indicate a location of an entry in a matrix. For a matrix A, indicates the entry located in the ith row and jth column. Below is matrix A with entries whose row and column locations are explicitly shown.
1.Notation for a Matrix:
 In other words, a matrix can be defined by just a capital letter or by the genral entry inside brackets.
 A matrix is the same thing as its general entry enclosed in brackets.
 In other words, a matrix can be defined by just a capital letter or by the genral entry inside brackets.
2.Notation for an Entry:
 In other words, an entry, as typically represented as a lowercase letter with a subscript, can also be written by enclosing the name of the matrix with parenthesis. This convention applies even to matrices such as C(BA) which has the typical entry denoted as
 and are two ways of saying the same thing.
 In other words, an entry, as typically represented as a lowercase letter with a subscript, can also be written by enclosing the name of the matrix with parenthesis. This convention applies even to matrices such as C(BA) which has the typical entry denoted as
Matrix Equality
In order to prove identities about matrices, we need to first define what it means for two matrices to be equal!
Definition: Two matrices A and B are equal and we write A=B, if they are the same size and for all i rows and j columns.
In other words, matrices are equal if they are of the same size and have the same corresponding entries.
In proving identities and properties of matrices, this definition comes in handy because the proofs rely on proving that the general entry of one matrix equals to the general entry of the other (), which would therefore mean that both matrices is equal if their sizes are equal.
Matrix Operations
There are three fundamental matrix operations: addition, scalar multiplication, and matrix multiplication. Properties for each operation are given below along with proofs.
Matrix Addition
For matrix addition, the sum of two matrices and must have the same size in which case their matrix sum is defined as . That is, each entry in the matrix is the sum of the corresponding entries in the separate matrices. For instance:
Properties of Matrix Addition
 Addition is Commutative:
 Addition is Associative:
 Identity of Addition:
Proofs for properties of Matrix Addition
Scalar Multiplication
Definition: For a matrix and a scalar value k, the scalar product kA is defined by , where kA is also .
The Entry definition is defined as:
For example:
Properties of Scalar Multiplication
 , where and are real numbers.
Proofs of Scalar Multiplication Properties
Matrix Multiplication
If matrix A (located on the left) has the same number of columns as the number of rows in matrix B (located on the right), then we can multiply the matrices. To be mathematically precise, if A is and B is , then the matrix product AB exists and is a matrix. This matrix product is defined by defining each of its entries: as the Dot Product of the i^{th} row of A and the j^{th} column of B. Because of the requirement on the dimensions of the matrices, these two vectors have the same size, so the dot products make sense.
The following is an example of matrix multiplication:
Now A has size 2x3 and B has size 3x2, so the product AB will have size 2x2. The entries of AB are the dot products of the two rows of A and the two columns of B. Slicing the A matrix in terms of rows and the B matrix in terms of columns like so:
We get that the product AB is equal to:
But numbers make even more sense, so let’s consider the two matrices again.
so the final product is
This animation illustrates the process of matrix multiplication:
There are two special matrices that may appear when making basic operations. The zero matrix is a square matrix whose entries are all zero. If we call this Z, then clearly Z+A = A+Z = A for all matrices A for which this makes sense, so the zero matrix behaves like the number 0 for addition. The identity matrix is a square matrix that has a_{ii}=1, but a_{ij}=0 if i≠j. That is, the identity matrix for the case is:
Matrix multiplication has one other interesting property: it is not commutative. Generally, AB ≠ BA for matrices. You can quickly see this for the matrices A and B above: while AB is a 2x2 matrix, BA is a 3x3 matrix.
Properties of Matrix Muliplication
Let A be and B be Then the product AB is a matrix where:
The above summation formula is a reasonable representation of matrix multiplication because the sum is the dot product of and for any matrices A and B, if both are of multiplicable size.
 Matrix Multiplication is Associative:
 Matrix Multiplication is Distributive over Addition :
 Identity for Multiplication:
Proofs of Matrix Multiplication Properties
Matrix Transposition
Another matrix operation you might see frequently is transposition. Matrix transposition replaces each row of a matrix with the corresponding column of the same matrix. The transpose is written as A^{T} and is defined by . In other words, if A is m x n then A^{T} is n x m; A doesn't necessarily have to be a square matrix in order for it to have a transpose. To make all this a little clearer, let's look at the example for a nonsquare matrix A:
If we take the transpose of the above , we see that:
We are back to the original matrix, A, which we started with. This leads us to one of the properties of Matrix Transposition, defined formally under #1 in the Properties below. Think intuitively about the property #1 and how it is analogous to reflecting over the main diagonal through the three entries as shown in the picture below.
Properties of Matrix Transposition
 Selfinverse of the transpose
 Transposes preserve addition
 Transposes reverse the ordering of the matrices
 Transposes preserve scalar multiplication , where is a scalar multiple.
Proofs of Matrix Transposition Properties
Matrices Are Functions
One of the most common ways to work with matrices is that matrices can represent functions from one Cartesian space to another. We can see this if we think of a point as a vector, and then of a vector as a matrix. So we can write the vector as , and in this form it is a 3x1 matrix. Then we can multiply a 3x3 matrix by V and get another 3x1 matrix as a result. For example,
 if and , then
 if and , then
So the matrix A represents a function on 3D Cartesian space. Matrix multiplication has the properties we would expect a set of functions to have: they are associative, are linear (that is, if V = V_{1} + V_{2}, then AV = AV_{1} + AV_{2}), and has an identity I. In the later pages on transformations we will see exactly how we use matrices as functions in computer graphics. One such page is Math for Computer Graphics and Computer Vision.
References
This page was originally written by Steve Cunningham.
(image for three dimensional matrix)
Source for transpose figure: http://www.katjaas.nl/transpose/transpose.html
Additional Information
Another explanation of matrix operations: http://www.miislita.com/informationretrievaltutorial/matrixtutorial2matrixoperations.html
http://www.millersville.edu/~bikenaga/linearalgebra/matrixproperties/matrixproperties.html