William Stallings Copyright 2010

Similar documents
REFRESHER. William Stallings

Linear Algebra and Vector Analysis MATH 1120

Introduction to Matrices

Materials engineering Collage \\ Ceramic & construction materials department Numerical Analysis \\Third stage by \\ Dalya Hekmat

Evaluating Determinants by Row Reduction

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

II. Determinant Functions

MATRICES AND MATRIX OPERATIONS

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

Review of Linear Algebra

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

Phys 201. Matrices and Determinants

Elementary maths for GMT

ECON 186 Class Notes: Linear Algebra

Matrices. Chapter Definitions and Notations

CHAPTER 6. Direct Methods for Solving Linear Systems

MATRICES. a m,1 a m,n A =

Presentation by: H. Sarper. Chapter 2 - Learning Objectives

Matrices and Determinants

4. Determinants.

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Determinants. Samy Tindel. Purdue University. Differential equations and linear algebra - MA 262

Algebra & Trig. I. For example, the system. x y 2 z. may be represented by the augmented matrix

Linear Equations in Linear Algebra

Review of Vectors and Matrices

sum of squared error.

Graduate Mathematical Economics Lecture 1

Undergraduate Mathematical Economics Lecture 1

Mathematics 13: Lecture 10

Introduction to Quantitative Techniques for MSc Programmes SCHOOL OF ECONOMICS, MATHEMATICS AND STATISTICS MALET STREET LONDON WC1E 7HX

CS 246 Review of Linear Algebra 01/17/19

MATRICES The numbers or letters in any given matrix are called its entries or elements

ICS 6N Computational Linear Algebra Matrix Algebra

MATH 2050 Assignment 8 Fall [10] 1. Find the determinant by reducing to triangular form for the following matrices.

Section 9.2: Matrices.. a m1 a m2 a mn

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

I = i 0,

Linear Algebra: Lecture notes from Kolman and Hill 9th edition.

LINEAR ALGEBRA WITH APPLICATIONS

Matrix Basic Concepts

Math 240 Calculus III

Matrix Operations: Determinant

Linear Systems and Matrices

Now, if you see that x and y are present in both equations, you may write:

POLI270 - Linear Algebra

Linear Algebra and Matrix Inversion

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

Appendix A: Matrices

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

Determinants of 2 2 Matrices

MATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.

18.S34 linear algebra problems (2007)

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

Section 9.2: Matrices. Definition: A matrix A consists of a rectangular array of numbers, or elements, arranged in m rows and n columns.

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Section 1.6. M N = [a ij b ij ], (1.6.2)

Systems of Linear Equations and Matrices

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

Systems of Linear Equations and Matrices

Gaussian Elimination and Back Substitution

Foundations of Cryptography

ENGR-1100 Introduction to Engineering Analysis. Lecture 21

3 Matrix Algebra. 3.1 Operations on matrices

Linear Algebra Practice Final

Introduction to Matrix Algebra

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

22m:033 Notes: 3.1 Introduction to Determinants

I&C 6N. Computational Linear Algebra

Linear Algebra Primer

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

MATH 2030: EIGENVALUES AND EIGENVECTORS

Determinants by Cofactor Expansion (III)

MATH 2030: MATRICES ,, a m1 a m2 a mn If the columns of A are the vectors a 1, a 2,...,a n ; A is represented as A 1. .

Linear Algebra. James Je Heon Kim

Matrices: 2.1 Operations with Matrices

Linear Equations and Matrix

1300 Linear Algebra and Vector Geometry

Math Camp Notes: Linear Algebra I

A Review of Matrix Analysis

Lecture Notes in Linear Algebra

Linear Algebra Review. Vectors

Vectors and matrices: matrices (Version 2) This is a very brief summary of my lecture notes.

Math 4377/6308 Advanced Linear Algebra

Apprentice Program: Linear Algebra

Exercise Set Suppose that A, B, C, D, and E are matrices with the following sizes: A B C D E

Matrices BUSINESS MATHEMATICS

Ma 227 Review for Systems of DEs

Chapter 4 Mathematics of Cryptography

Matrix Representation

MAC Learning Objectives. Learning Objectives (Cont.) Module 10 System of Equations and Inequalities II

Homework Set #8 Solutions

Determinants - Uniqueness and Properties

det(ka) = k n det A.

Fundamentals of Engineering Analysis (650163)

Differential Equations and Linear Algebra C. Henry Edwards David E. Penney Third Edition

Homework #2 solutions Due: June 15, 2012

Matrix Arithmetic. j=1

Transcription:

A PPENDIX E B ASIC C ONCEPTS FROM L INEAR A LGEBRA William Stallings Copyright 2010 E.1 OPERATIONS ON VECTORS AND MATRICES...2 Arithmetic...2 Determinants...4 Inverse of a Matrix...5 E.2 LINEAR ALGEBRA OPERATIONS OVER Z n...6 Supplement to Cryptography and Network Security, Fifth Edition William Stallings Prentice Hall 2010 ISBN-10: 0136097049 http://williamstallings.com/crypto/crypto5e.html

E.1 OPERATIONS ON VECTORS AND MATRICES We use the following conventions: ( x 1 x 2 x m ) y 1 y 2 y n a 11 a 12 a 1n a 21 a 22 a 11 a m1 a n2 a mn row vector X column vector Y matrix A Note that in a matrix, the first subscript of an element refers to the row and the second subscript refers to the column. Arithmetic Two matrices of the same dimensions can be added or subtracted element by element. Thus, for C = A + B, the elements of C are c ij = a ij + b ij. Example: 1 2 3 0 4 5 3 6 9 + 2 3 3 0 6 4 2 3 1 = 2 1 6 9 6 3 12 12 12 To multiply a matrix by a scalar, every element of the matrix is multiplied by the scalar. Thus, for C = ka, we have c ij = k a ij. Example: 3 1 0 2 4 5 3 3 6 9 = 0 3 12 6 15 9 9 18 27 D-2

The product of a row vector of dimension m and a column vector of dimension m is a scalar: x 1 x 2 x m y 1 y 2 y m = x 1 y 1 + x 2 y 2 + + x m y m Two matrices A and B are conformable for multiplication, in that order, if the number of columns in A is the same as the number of rows in B. Let A be of order m n (m rows and n columns) and B be of order n p. The product is obtained by multiply every row of A into every column of B, using the rules just defined for the product of a row vector and a column vector. Thus, for C = AB, we have c ij = n k=1 a ik b kj, and the resulting matrix is of order m p. Notice that, by these rules, we can multiply a row vector by a matrix that has the same number of rows as the dimension of the vector; and we can multiply a matrix by a column vector if the matrix has the same number of columns as the dimension of the vector. Thus, using the notation at the beginning of this section: For D = XA, we end up with a row vector with elements d i = m k=1 vector with elements e i = a ik y k. m k=1 x k a ki. For E = AY, we end up with a column Example: ( 2 5 3) 1 0 2 4 5 3 3 6 9 = ( 2 + 3 3 2 ( 2 ) + ( 5) 4 + 3 6 2 3+ ( 5) 5 + 3 9) = 11 6 8 D-3

Example: ( 5) + 3 3 + 5 3 + 9 3 1 2 3 2 1 2 + 2 0 4 5 5 3 6 9 3 = 4 5 3 2 + 6 5 = 21 5 3 Determinants The determinant of the square matrix A, denoted by det(a), is a scalar value representing sums and products of the elements of the matrix. For details, see any text on linear algebra. Here, we simply report the results. For a 2 2 matrix A, det(a) = a 11 a 22 a 21 a 12. For a 3 3 matrix A, det(a) = a 11 a 22 a 33 + a 12 a 23 a 31 + a 13 a 21 a 32 a 31 a 22 a 13 a 32 a 23 a 11 a 33 a 21 a 12 In general, the determinant of a square matrix can be calculated in terms of its cofactors. A cofactor of A is denoted by cof ij (A) and is defined as the determinant of the reduced matrix formed by deleting the ith row and jth column of A and choosing positive sign if i + j is even and the negative sign if i + j is odd. For example: 2 4 3 cof 23 6 1 5 2 1 3 = det 2 4 2 1 = 10 The determinant of an arbitrary n n square matrix can be evaluated as: det(a) = det(a) = n j=1 n i=1 [ a ij cof ij (A)] or [ a ij cof ij (A)] for any i for any j D-4

For example: 2 4 3 det 6 1 5 2 1 3 =a cof +a cof +a cof 21 21 22 22 23 23 = 6 det 4 1 3 3 +1 det 2 3 + 5 det 2 4 2 3 2 1 = 6 9 +1( 12) + 5( 10) = 92 Inverse of a Matrix If a matrix A has a nonzero determinant, then it has an inverse, denoted as A 1. The inverse has that property that AA 1 = A 1 A = I, where I is the matrix that is all zeros except for ones along the main diagonal from upper left to lower right. I is known as the identity matrix because any vector or matrix multiplied by I results in the original vector or matrix. The inverse of a matrix is calculated as follows. For B = A 1, b ij = cof ji A det A For example, if A is the matrix in the preceding example, then for the inverse matrix B, we can calculate: b 32 = cof A 23 det A = 10 92 = 10 92 Continuing in the fashion, we can compute all nine elements of B. Using Sage, we can easily calculate the inverse: D-5

sage: A = Matrix([[2,4,3],[6,1,5],[-2,1,3]]) sage: A [ 2 4 3] [ 6 1 5] [-2 1 3] sage: A^-1 [ 1/46 9/92-17/92] [ 7/23-3/23-2/23] [ -2/23 5/46 11/46] And we have: 2 9 17 2 9 17 2 4 3 92 92 92 92 92 92 2 4 3 1 0 0 6 1 5 28 12 8 2 1 3 92 92 92 = 28 12 8 92 92 92 6 1 5 8 10 22 8 10 22 2 1 3 = 0 1 0 0 0 1 92 92 92 92 92 92 E.2 LINEAR ALGEBRA OPERATIONS OVER Z n Arithmetic operations on vectors and matrices can be carried out over Z n ; that is, all operations can be carried out modulo n. The only restriction is that division is only allowed if the divisor has an multiplicative inverse in Z n. For our purposes, we are interested primarily in operations over Z 26. Because 26 is not a prime, not every integer in Z 26 has a multiplicative inverse. Table E.1 lists all the multiplicative inverses modulo 26. For example 3 9 = 1 mod 26, so 3 and 9 are multiplicative inverses of each other. Table 1.1 Multiplicative Inverses mod 26 Value Inverse Value Inverse 1 1 15 7 3 9 17 23 5 21 19 11 7 15 21 5 9 3 23 17 11 19 D-6

4 3 As an example, consider the following matrix in Z 26. A =. Then, 9 6 det(a) = (4 6) (3 9) mod 26 = 3 mod 26 = 23 From Table E.1, we have (det(a)) 1 = 17. We can now calculate the inverse matrix: 1 cof A 11 A 1 = det( A) cof 12 A cof 21 ( A) cof 22 ( A) =17 6 3 9 4 mod26 = 24 1 3 16 To verify: AA 1 = 4 9 6 3 24 1 3 16 mod26 = 105 52 234 105 mod26 = 1 0 0 1 A 1 A = 24 3 16 1 4 3 9 6 mod26 = 105 78 156 105 mod26 = 1 0 0 1 D-7