CHAPTER 1 PROGRAM OF MATRICES

Similar documents
Chapter 3 MATRIX. In this chapter: 3.1 MATRIX NOTATION AND TERMINOLOGY

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24

Introduction To Matrices MCV 4UI Assignment #1

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

Matrices. Elementary Matrix Theory. Definition of a Matrix. Matrix Elements:

September 13 Homework Solutions

Geometric Sequences. Geometric Sequence a sequence whose consecutive terms have a common ratio.

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT

Bases for Vector Spaces

Lecture Solution of a System of Linear Equation

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

4 VECTORS. 4.0 Introduction. Objectives. Activity 1

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

The Algebra (al-jabr) of Matrices

INTRODUCTION TO LINEAR ALGEBRA

HW3, Math 307. CSUF. Spring 2007.

Quadratic Forms. Quadratic Forms

Parse trees, ambiguity, and Chomsky normal form

Module 6: LINEAR TRANSFORMATIONS

Analytically, vectors will be represented by lowercase bold-face Latin letters, e.g. a, r, q.

Convert the NFA into DFA

MATRIX DEFINITION A matrix is any doubly subscripted array of elements arranged in rows and columns.

Linear Inequalities. Work Sheet 1

Elements of Matrix Algebra

Algebra Of Matrices & Determinants

Chapter 14. Matrix Representations of Linear Transformations

MATRICES AND VECTORS SPACE

Matrices and Determinants

Lecture 3: Equivalence Relations

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

CM10196 Topic 4: Functions and Relations

set is not closed under matrix [ multiplication, ] and does not form a group.

Coalgebra, Lecture 15: Equations for Deterministic Automata

CHAPTER 2d. MATRICES

Determinants Chapter 3

Introduction to Algebra - Part 2

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Name Ima Sample ASU ID

Here we study square linear systems and properties of their coefficient matrices as they relate to the solution set of the linear system.

Jim Lambers MAT 169 Fall Semester Lecture 4 Notes

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

2.4 Linear Inequalities and Interval Notation

Designing finite automata II

The Regulated and Riemann Integrals

Chapter 2 Finite Automata

Chapter 2. Determinants

Lecture 2 : Propositions DRAFT

308K. 1 Section 3.2. Zelaya Eufemia. 1. Example 1: Multiplication of Matrices: X Y Z R S R S X Y Z. By associativity we have to choices:

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac

Rudimentary Matrix Algebra

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

N 0 completions on partial matrices

Review of Gaussian Quadrature method

Homework 3 Solutions

Things to Memorize: A Partial List. January 27, 2017

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Lecture 2e Orthogonal Complement (pages )

Elementary Linear Algebra

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!!

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

1 Nondeterministic Finite Automata

Math 4310 Solutions to homework 1 Due 9/1/16

ECON 331 Lecture Notes: Ch 4 and Ch 5

MATHEMATICS FOR MANAGEMENT BBMP1103

M344 - ADVANCED ENGINEERING MATHEMATICS

MATH 573 FINAL EXAM. May 30, 2007

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

STRAND J: TRANSFORMATIONS, VECTORS and MATRICES

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

3 Regular expressions

Matrix Solution to Linear Equations and Markov Chains

Physics 201 Lab 3: Measurement of Earth s local gravitational field I Data Acquisition and Preliminary Analysis Dr. Timothy C. Black Summer I, 2018

a a a a a a a a a a a a a a a a a a a a a a a a In this section, we introduce a general formula for computing determinants.

Nondeterminism and Nodeterministic Automata

Chapter 8.2: The Integral

A matrix is a set of numbers or symbols arranged in a square or rectangular array of m rows and n columns as

Fractions arise to express PART of a UNIT 1 What part of an HOUR is thirty minutes? Fifteen minutes? tw elve minutes? (The UNIT here is HOUR.

UNIT 5 QUADRATIC FUNCTIONS Lesson 3: Creating Quadratic Equations in Two or More Variables Instruction

THE DISCRIMINANT & ITS APPLICATIONS

Bridging the gap: GCSE AS Level

2. VECTORS AND MATRICES IN 3 DIMENSIONS

Special Relativity solved examples using an Electrical Analog Circuit

NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

New Expansion and Infinite Series

MTH 5102 Linear Algebra Practice Exam 1 - Solutions Feb. 9, 2016

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Pre-Session Review. Part 1: Basic Algebra; Linear Functions and Graphs

dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω.

Operations with Polynomials

The practical version

Improper Integrals, and Differential Equations

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

1 ELEMENTARY ALGEBRA and GEOMETRY READINESS DIAGNOSTIC TEST PRACTICE

Multiplying integers EXERCISE 2B INDIVIDUAL PATHWAYS. -6 ì 4 = -6 ì 0 = 4 ì 0 = -6 ì 3 = -5 ì -3 = 4 ì 3 = 4 ì 2 = 4 ì 1 = -5 ì -2 = -6 ì 2 = -6 ì 1 =

Transcription:

CHPTER PROGRM OF MTRICES -- INTRODUCTION definition of engineering is the science y which the properties of mtter nd sources of energy in nture re mde useful to mn. Thus n engineer will hve to study the properties nd ehvior of physicl systems, pplying his knowledge to ttin purposes useful to society. Such ctivity cn e considered s consisting of the study nd solution of rel physicl. The complexities involved in deling with ll the prmeters reltive to the properties of rel prolem will, on mny occsions, force him to study n equivlent engineering prolem which cn e mthemticlly defined. He will try to solve such prolem ccording to his knowledge nd experience, nd using the computtionl tools t hnd. When we think of tody s engineering prolems, such s the construction of nucler rectors, spce stellites, oil rigs in the se, etc. it is cler tht they must e nlyzed using very relined discrete models, so s to closely pproximte their rel ehvior. Fortuntely, with the help of the modern computer, it is possile tody to tret discrete models with up to severl thousnds of degrees of freedom. Thus, the need for formulting lrger nd more complex discrete models, nd the vilility of computers which mke fesile their nlysis, re the cuses of the considerle interest produced in reltion to numericl methods nd computer nlysis techniques.

-- PROGRMMING LNGUGES computer cn perform elementry opertions using stored informtion. The user cn order the computer to perform n opertion, giving the proper instruction, s prt of his progrm. The set of ll the instructions which computers ccepts constitutes the mchine lnguge, or solute lnguge of tht computer. The mchine instructions re lwys expressed y numeric codes. Ech instruction normlly consists of one opertion code, nd one or more prmeters or rguments. For instnce, the sequence cn represent two instructions written ccording to given mchine lnguge. He first step in progrmming the solution of prolem, is to mke n nlysis of the prolem. The prolem is studied in ll its detil, nd n pproprite solution scheme is selected. Then the computer solution to e implemented is schemtized grphiclly, y mens of digrm clled flow chrt. These digrms cn e detiled to greter or leser extent, ccording to circumstnces, ut they re fundmentl to the nlysis nd understnding of ll spects of the computer solution. The person in chrge of this tsk is normlly clled n nlyst. Once the flow-chrt is completed, the computer solution is coded, writing the computer progrm using the lnguge selected. This tsk is crried out y progrmmer. With the progrm registered in some informtion support, nd the dt nd proper control commnds dded, the progrm is tested y sumitting it for processing. t the eginning the progrm will include some errors. These cn e syntx errors nd logic errors. Syntx errors pper ecuse some of the rules of the lnguge re violted. Normlly These cn e esily detected nd corrected. Logic errors correspond to the cse tht syntx errors-free progrm is sumitted for execution, nd it does not produce the desired results.

The following situtions cn e encountered.. Execution of the progrm stops efore producing results.. Execution of the progrm does not stop nd results re not produced. The progrm is finlly discontinued fter exceeding the llowed time.. Results re produced, ut they re incorrect.. The progrm works successfully. -- ELEMENTRY MTRIX OPERTION -- Definitions nd Rules Mtrix lger is the set of rules which defines opertions performed with mtrices. mtrix is i-dimensionl rry of numers orgnized ccording to n rows nd m columns, which we refer to s mtrix of order n x m. In wht follows, mtrix will e indicted y old type. Thus, R will e mtrix, while T is sclr numer. The elements or coefficients of mtrix will e two su-indices, indicting row nd column position, respectively. For instnce (-) is rectngulr mtrix, of order x, tht is hving rows nd columns. The su-indices of the coefficients indicte their position within the mtrix. Thus, the coefficient is plced in the first row nd the second column. mtrix hving the sme numer of rows nd columns is clled squre mtrix, such s

B (-) which is squre mtrix of rows nd columns, or of order x. In cse such s this, when speking specificlly of squre mtrices, we cn simply sy tht B is of order. The coefficients,, nd or in generl ij for i = j, re clled the coefficients of the principl or min digonl of the mtrix. Severl types of squre mtrices cn e considered. When the coefficients of squre mtrix B stisfy the condition ij = ji, for i =,,.,n nd j =,,.,n (-) this clled symmetric mtrix. In prticulr, if B is symmetric mtrix of order, it will hve the following structure B (-) On the other hnd, skew-symmetric mtrix is such tht ij = - ji, for i j & ij =, for i = j (-) for exmple, B (-) when ll the coefficients of squre mtrix B re null, except for the min digonl, such s, B (-)

this is clled digonl mtrix. If, in prticulr, ll the coefficients of the min digonl re equl to, the mtrix is clled unit mtrix, nd is symolized I. For instnce, the following is the unit mtrix of order. I (-) mtrix hving only one column is clled column vector. Normlly, the coefficients of column vector will e given only one suscript, corresponding to the row position, nd will e enclosed y curled rckets insted of squre rckets, plced verticlly, s in c c C c (-9) where C is column vector of order. When mtrix hs only one row it will e clled row vector nd gin, ech of its coefficients will e given only one suscript. For instnce, D d d d (-) d is row vector of order. In wht follows the use of the term vector lone will lwys e tken to men column vector. The trnspose of mtrix is otined y interchnging rows nd columns, of the mtrix, nd is indicted y n upper-index T. For instnce, the trnspose of, given y eq. (-) is

T (-) while the trnspose of mtrix B, given y eq. (-) is B T (-) It cn e noticed tht the trnspose of column vector is row vector, nd vice vers. Thus, the trnspose of column vector, given y eq. (-9) is C T c c (-) c While the trnspose of row vector, given y eq. (-) is d d d d D T (-) The trnspose of the trnspose gives the originl mtrix, tht is T T (-) For symmetric mtrix, the trnspose of the mtrix is the originl mtrix, B B T (-)

nother specil mtrix which cn e defined s the null mtrix, represented y, whose coefficients re ll equl to zero. For instnce, (-) is null mtrix of order x -- Trnspose of Rectngulr Mtrix The following routine is very simple exmple of computer progrm operting with mtrices which cn e used to otin the trnspose of rectngulr mtrix. C This progrm computes the trnspose of mtrix of order n x m DIMENSION (,),B(,) DO I=,n DO J=,m B(J,I) = (I,J) END where the rry contins the mtrix to e trnsposed, the integer n contins the numer of rows, nd the integer m contins the numer of columns.

-- Trnspose of Squre Mtrix In the cse of squre mtrix it is possile to trnspose the mtrix in itself, without creting new one. The following routine receives the originl mtrix in the rry, of order n, nd fter operting returns the trnsposed mtrix in the sme rry. Note tht n uxiliry vrile S is used to llow for the trnsposition in plce. C This progrm computes the trnspose of squre mtrix of order n DIMENSION (,) n = n - DO I=,n I = I + DO J=I,n S = (,J) (I,J) = (J,I) (J,I) = S END -- ddition nd Sutrction of Mtrices Two different mtrices cn e dded or sutrcted, provided they re of the sme order. Let us consider the following two mtrices, B (-) By definition the sum of nd B will give nother mtrix C, lso of the sme order, i.e. c c C (-9) c c c c

where coefficients re c = + c = + c = + c = + c = + c = + In generl, c ij = ij + ij for i =,,.,n nd j =,,.,m (-) -- Progrm of ddition nd Sutrction of Mtrices The following routine cn e used for ddition nd sutrction of mtrices. The rrys nd B contin the mtrices to e dded or sutrcted, which of order n x m. The rry C will contin the result mtrix. When the integer L = is specified the routine will perform the ddition opertion, ut when L = the routine will perform the sutrction opertion. C This progrm computes the mtrix opertion C C = + B when L = nd C C = - B when L = C n : numer of rows C m : numer of columns DIMENSION (,), B(,), C(,) DO I=,n DO J=,m GO TO (,), L C(I,J) = (I,J) + B(I,J) GO TO C(I,J) = (I,J) - B(I,J) CONTINUE END 9

-- Multipliction of Mtrices Multipliction of mtrices cn lso e performed. Let us consider mtrix of order n x m, nd mtrix B of order m x n, such s, B (-) The mtrix multipliction eqution C B (-) gives s result new mtrix with coefficients: c = + + c = + + c = + + c = + + or, in generl: c ij m k ik kj (-) It is esily seen tht two mtrices cn e multiplied only if the numer of columns of the first mtrix is equl to the numer of rows of the second mtrix. The result mtrix will hve the sme numer of rows of the first mtrix nd the sme numer of columns of the second mtrix. Notice tht ccording to its definition, mtrix multipliction is not commuttive, i.e.,

[] [B] [B] [] (-) nd tht, in prticulr, if the left hnd side is defined, the right-hnd side my e undefined unless the numer of rows of mtrix is equl to the numer of columns of mtrix B. Even in tht cses, the results of the left-hnd side, nd the right-hnd side will e different, excluding very prticulr cses. -- Progrm of Multipliction of Mtrices The multipliction of two mtrices cn e redily progrmmed. The following routine receives the first mtrix of order n x m, in the rry, nd the second mtrix of order m x h, in the rry B. The result mtrix, of order n x h, will e stored in the rry C. Note tht since the implementtion of eq. (-) requires ccumulting the prtil multiplictions in the rry C, we hve een creful in previously setting c ij =. C C C C C This progrm computes the mtrix opertion C = * B n : numer of rows of nd C m : numer of columns of nd rows of B h : numer of columns of B nd C DIMENSION (,), B(,), C(,) DO I=,n DO J=,h C(I,J) = DO K=,m C(I,J) = C(I,J) + (I,K) * B(K,J) END

-- Progrm of Inverse of Mtrices The inverse of mtrix C is the mtrix which stisfy the following reltion [C] [C] - = [I] The following routine cn e used for computing the mtrix inverse [C] -. C This progrm computes the mtrix opertion DIMENSION C(,), ST(,), C(,) DO I=, DO J=, ST(I,J) = C(I,J) M = K= DO I=, DO J=, IF (I.EQ.(J-)) GO TO ST(I,J) =. GO TO ST(I,J) = CONTINUE L = DO J=,K IF (L.EQ.J) GO TO ST(L,J) = ST(L,J) / ST(L,L) CONTINUE ST(L,L) = DO J=, IF(J.EQ.L) GO TO IF(ST(I,J).EQ..) GO TO DO M=,K IF(L.EQ.M) GO TO ST(J,M) = ST(J,M) ST(J,L) * ST(L,M) CONTINUE ST(J,L) =. CONTINUE IF(L.EQ.) GO TO GO TO DO 9 I=, DO 9 J=, 9 C(I,J) = ST(I,J+) END

Solved Prolems - For the following mtrices, evlute the following expressions if possile. If not possile, stte the reson: ) [D] [E] ] ) [] x [C] c) [] x.[b]. B C D E Solution ) [D] [E] ] [ ] [ E D 9 9 9 9

) [] x x [C] x ةيناثلا ةفوفصملا فوفص ددع عم ىلولأا ةفوفصملا ةدمعأ ددع يواست مدعل ةنكمم ريغ c) [] x [B].. ]. [ ] [ x B x... x.... ) Find the inverse of the following mtrix: x Solution dj By using Srus method, we cn get

= + + + + (-) (-9) = is nonsingulr mtrix. 9. 9.....9. 9.9..9 9....9.. 9. 9...... 9. 9..9.9... 9...... min ors of Mtrix 9. 9.....9. 9.9..9 9....9.. 9. 9...... 9. 9..9.9... 9...... mtrix fctor Co 9.... 9. 9. 9. 9.9.9..9......9...9..... 9. 9.....9. 9. 9... T dj 9.... 9. 9. 9. 9.9.9..9......9...9..... 9. 9.....9. 9. 9.........9.......9....9..99...9....9..........

SHEET () ) Identify the properties of ech of the following mtrices:...... B C D.... E F ) Evlute the following expressions if possile. If not possile, stte the reson. [C] + [B] [] + [C] [F] T x [D] + [F] x [E] x [F] T [E] x [F] [] - [B] - [B] x [C] [] - [F] T x [C] [D] - [C] x [B] ) Solve the following simultneous equtions: X X + X = 9 X + X X = X + X =