0% found this document useful (0 votes)
14 views39 pages

Lec 1 Matrices

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views39 pages

Lec 1 Matrices

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

 Linear algebra includes the theory and

applications of linear systems of equations,


linear transformations, and eigenvalue
problems, as they arise, for instance, from
electrical networks, computer graphics,
image processing and communication system.
 Linearalgebra makes use of vectors and
matrices offer compact representation of
information. Required functionality can be
achieved by performing appropriate
operations on the matrices and vectors.
 To illustrate the use of matrices, we consider
its application in computer graphics. For
example, the vertices of an object in 3-D
space can be represented in a matrix form of
 Zooming in and out for the object can then
be achieved by using scalar multiplication
operation on the matrix, i.e.

c > 1 corresponds to zooming in and c < 1 corresponds to zooming out.


 Matricesalso occur in various mathematical
contexts. For example, to solve a system of
equations such as
 Thesolution can then be obtained by
performing appropriate operations on this
matrix. This is particularly important in
developing computer programs to solve
system of linear equations because
computers are well suited for manipulating
arrays of numerical information.

A*B
A matrix is a rectangular array of numbers
enclosed in brackets.
 The numbers in the array are called the
entries or elements of the matrix.
 The size of a matrix is described in terms of
the number of rows (horizontal lines) and
columns (vertical lines) it contains.
 The size of A is m x n – m rows and n columns
The size of the above matrices are 3X2 (read 3 by 2), 1X4, 3 X3,2X1,
and 1X1. In a size description, the first number always denotes the
number of rows and the second denotes the number of columns.
A matrix with only one column is called a
column matrix (or a column vector), e.g.
 the 2X1 matrix in Example 1. A matrix with
only one row is called a row matrix (or a
row vector), e.g. the 1X 4
A general mXn matrix has a form:

 Ifm = n , we call A an n X n square


matrix. Its diagonal containing the entries
a11, a22, and ann is called the main
diagonal of A. A matrix that is not square
is called a rectangular matrix.
 Two matrices A = [a jk ] and B = [b jk ] are
equal, written A = B , if and only if they
have the same size and the corresponding
entries are equal, that is, a11 = b11,a12 =
b12, and so on.
 IfA and B are matrices of the same size,
then the sum A + B is the matrix obtained by
adding the entries of B to the corresponding
entries of A. Similarly, the difference A - B is
the matrix obtained by subtracting the
entries of B from the corresponding entries
of A. Matrices of different sizes can not be
added or subtracted.
 Crime against matrices
The expressions A+C, B+C, A-C and B-Care undefined because the
matrices are of different sizes.
 The matrix addition or subtraction has the
following properties
 (a) A + 0 = A
 (b) A - A = 0
 (c) A + B = B + A (commutative law)
 (d) (A+ B)+ C = A + (B+ C) (associative law)

Here 0 is zero matrix of size m x n , that is, a matrix with all entries zero.
 IfA is any matrix and c is any scalar, then the
product cA is the matrix obtained by
multiplying each entry of the matrix A by c.
The matrix cA is said to be a scalar
multiple of A.
 If A is an mXn matrix and B is an r X p
matrix, then the product C = AB exists if n =
r and C is an mXp matrix with entries:

That is, to get c jk , multiply each entry in the jth row of A by the
corresponding entry in the kth column of B and then add these n products.
The following figure illustrates
this.
Calculate the number of multiplication and addition
operations involved in the multiplication of two matrices.

C = A*B, where A is mxn, B is nxp

To perform a math operation on a processor, we need memory


and processing time.

Computation time? Resource consumption?


In terms of clock cycles
Requires knowledge of the kind of arithmetic operations
involved.
 The transpose AT (A’)of an mXn matrix A
is the n Xm matrix that results from
interchanging the rows and columns of A.
That is, the first column of AT is the first
row of A, the second column of AT is the
second row of A, and so forth.
 IfA is a square matrix, then the trace of A,
denoted by tr(A) , is defined to be the sum
of the entries on the main diagonal of A. The
trace of A is undefined if A is not a square
matrix.
29
 Ifa is a row vector and b a column vector,
both with n components, then matrix
multiplication (row times column) gives a 1x1
matrix or a scalar. This product is
called the inner product or dot product of a
and b and is denoted by a · b . Thus,
B = [2 5 8]T
Amxn Bnxp = Cmxp

What is cost of multiplying matrix A with B in terms


of additions and multiplications?

# of additions = 4
# of multiplications = 8

A2x2 , B2x2 = C2x2

C11 = a11b11+a12b21

You might also like