applications of linear algebra

35
Applications of Linear Algebra A Group I Project By : Nirav Patel - 140110111041 Parth Patel - 140110111042 Vishal Patel -140110111043 Prerak Trivedi - 140110111045 Prutha Parmar - 140110111046 Tanvi Ray - 140110111048

Upload: prerak-trivedi

Post on 09-Aug-2015

265 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Applications of linear algebra

Applications of Linear Algebra

A Group I Project By :Nirav Patel - 140110111041Parth Patel - 140110111042Vishal Patel -140110111043

Prerak Trivedi - 140110111045Prutha Parmar - 140110111046Tanvi Ray - 140110111048

Page 2: Applications of linear algebra

Linear Algebra› What is Linear Algebra?

› Applications of Linear Algebra in various fields.– Abstract Thinking– Chemistry– Coding Theory– Cryptography– Economics– Elimination Theory– Games– Genetics– Geometry– Graph Theory– Heat Distribution– Image Compression– Linear Programming– Markov Chains– Networking– Sociology– The Fibonacci Numbers– Eigenfaces and many more….

Page 3: Applications of linear algebra

What is Linear Algebra?

› Linear Algebra is the branch of mathematics concerning vector spaces and linear mappings between such spaces. It includes the study of lines, planes, and subspaces, but is also concerned with properties common to all vector spaces.

› Hence, the above definition confirms that Linear Algebra is an integral part of mathematics.

Page 4: Applications of linear algebra

Abstract Thinking

› Linear Algebra has over some other subjects for introducing abstract thinking, is that much of the material has a geometric interpretation.

› In low dimensions, one can "visualize" algebraic results, and happily, the converse is also true: linear algebra helps develop your geometric instinct.

› The geometric intuition you already have will be complemented by an "algebraic picture", one that will allow you, with practice, to "see" in higher dimensions that are inaccessible to our normal senses.

Page 5: Applications of linear algebra

Chemical Applications

› Application of linear systems to chemistry is balancing a chemical equation and also finding the volume of substance. The rationale behind this is the Law of conservation of mass which states the following:

› “Mass is neither created nor destroyed in any chemical reaction. Therefore balancing of equations requires the same number of atoms on both sides of a chemical reaction. The mass of all the reactants (the substances going into a reaction) must equal the mass of the products (the substances produced by the reaction).”

Page 6: Applications of linear algebra

As an example consider the following chemical equation

C2H6 + O2 → CO2 + H2O.

Balancing this chemical reaction means finding values of x, y, z and t so that the number of atoms of each element is the same on both sides of the equation:

xC2H6 + yO2 → zCO2 + tH2O.

This gives the following linear system:

The general solution of the above system is:

Since we are looking for whole values of the variables x, y z, and t, choose x=2 and get y=7, z= 4 and t=6. The balanced equation is then:

2C2H 6 + 7O2 → 4CO2 + 6H2O.

Page 7: Applications of linear algebra

Applications in Coding Theory

Transmitted messages, like data from a satellite, are always subject to noise. It is important; therefore, to be able to encode a message in such a way that after noise scrambles it, it can be decoded to its original form.

This is done sometimes by repeating the message two or three times, something very common in human speech. However, copying data stored on a compact disk, or a floppy disk once or twice requires extra space to store.

In this application, we will examine ways of decoding a message after it gets distorted by some kind of noise. This process is called coding. A code that detects errors in a scrambled message is called error detecting. If, in addition, it can correct the error it is called error correcting. It is much harder to find error correcting than error-detecting codes

Page 8: Applications of linear algebra

Most messages are sent as digital-sequences of 0’s and 1’s, such as 10101 or 1010011, so let us assume we want to send the message 1011. This binary “word” may stand for a real word, such as buy, or a sentence such as buy stocks.

One way of encoding 1011 would be to attach a binary “tail” to it so that if the message gets distorted to, say, 0011, we can detect the error. One such tail could be a 1 or 0, depending on whether we have an odd or an even number of 1’s in the word. This way all encoded words will have an even number of 1’s. So 1011 will be encoded as 10111. Now if this is distorted to 00111 we know that an error has occurred, because we only received an odd number of 1’s. This error-detecting code is called a parity check and is too simple to be very useful.

For example, if two digits were changed, our scheme will not detect the error, so this is definitely not an error-correcting code. Another approach would be to encode the message by repeating it twice, such as 10111011.

Then if 00111011 were received, we know that one of the two equal halves was distorted. If only one error occurred, then it is clearly at position 1. This coding scheme also gives poor results and is not often used. We could get better results by repeating the message several times, but that takes space and time.

Page 9: Applications of linear algebra

Coupled Oscillations› Everyone unconsciously knows this Law. Everyone knows that

heavier objects require more force to move the same distance than do lighter objects. The Second Law, however, gives us an exact relationship between force, mass, and acceleration:

› In the presence of external forces, an object experiences an acceleration directly proportional to the net external force and inversely proportional to the mass of the object.

› This Law Is widely known with the following equation:

F=ma

Page 10: Applications of linear algebra

› The above Newton’s Second Law when used with Hooke’s Second Law

helps to find the oscillations of coupled springs arranged in various

examples.

Page 11: Applications of linear algebra

› Cryptography, to most people, is concerned with keeping communications private. Indeed, the protection of sensitive communications has been the emphasis of cryptography throughout much of its history.

› Encryption is the transformation of data into some unreadable form. Its purpose is to ensure privacy by keeping the information hidden from anyone for whom it is not intended, even those who can see the encrypted data. Decryption is the reverse of encryption; it is the transformation of encrypted data back into some intelligible form.

CRYPTOGRAPHY

Page 12: Applications of linear algebra

Encryption and decryption require the use of some secret information, usually referred to as a key. Depending on the encryption mechanism used, the same key might be used for both encryption and decryption, while for other mechanisms, the keys used for encryption and decryption might be different.

Today governments use sophisticated methods of coding and decoding messages. One type of code, which is extremely difficult to break, makes use of a large matrix to encode a message. The receiver of the message decodes it using the inverse of the matrix. This first matrix is called the encoding matrix and its inverse is called the decoding matrix.

Page 13: Applications of linear algebra

› Example Let the message be

PREPARE TO NEGOTIATE

and the encoding matrix be

We assign a number for each letter of the alphabet. For simplicity, let us associate each letter with its position in the alphabet: A is 1, B is 2, and so on. Also, we assign the number 27 (remember we have only 26 letters in the alphabet) to a space between two words. Thus the message becomes:

Page 14: Applications of linear algebra

› Solving the above matrix in various ways, we can decrypt the message as:

› So finally decrypting the message, we get :

Page 15: Applications of linear algebra

Economics› In order to understand and be able to manipulate the

economy of a country or a region, one needs to come up with a certain model based on the various sectors of this economy.

› The Leontief model is an attempt in this direction. Based on the assumption that each industry in the economy has two types of demands: external demand (from outside the system) and internal demand (demand placed on one industry by another in the same system), the Leontief model represents the economy as a system of linear equations.

Page 16: Applications of linear algebra

› Consider an economy consisting of n interdependent industries (or sectors) S1,…,Sn. That means that each industry consumes some of the goods produced by the other industries, including itself (for example, a power-generating plant uses some of its own power for production).

› We say that such an economy is closed if it satisfies its own needs; that is, no goods leave or enter the system. Let mij be the number of units produced by industry Si and necessary to produce one unit of industry Sj. If pk is the production level of industry Sk, then mij pj represents the number of units produced by industry Si and consumed by industry Sj .

Page 17: Applications of linear algebra

› If pk is the production level of industry Sk, then mij pj represents the number of units produced by industry Si and consumed by industry Sj. Then the total number of units produced by industry Si is given by:

p1mi1+p2mi2+…+pnmin

In order to have a balanced economy, the total production of each industry must be equal to its total consumption. This gives the linear system:

If

Page 18: Applications of linear algebra

› then the above system can be written as AP=P, where

A is called the input-output matrix.

Page 19: Applications of linear algebra

Application to Elimination Theory› Many problems in linear algebra (and many other branches of science)

boil down to solving a system of linear equations in a number of variables. This in turn means finding common solutions to some “polynomial” equations of degree 1 (hyperplanes).

› In many cases, we are faced with “nonlinear” system of polynomial equations in more than one variable. Geometrically, this means finding common points to some “surfaces”. Like the Gaussian elimination for linear systems, the elimination theory in general is about eliminating a number of unknowns from a system of polynomial equations in one or more variables to get an easier equivalent system.

› One way of find common solutions to polynomial equations is to solve each equation separately and then compare all the solutions. As you can guess, this is not an efficient way especially if the goal is only to show the existence of a solution.

Page 20: Applications of linear algebra

› To understand the importance of elimination theory, let us start by considering the following example.

› Example 1 Without solving the polynomial equations, show that the following system has solutions.

Solution We compute the resultant of the two polynomials

therefore, the polynomials f(x), g(x) have a common root by the above theorem.

› One can use the above theorem to determine if a polynomial system in more than one variable has a solution. The trick is to look at the polynomials in the system as polynomials in one variable with coefficients polynomials in the other variables.

Page 21: Applications of linear algebra

Applications in various GAMES

› GAME OF MAGIC SQUARES :

› A magic square of size n is an n by n square matrix whose entries consist of all integers between 1 and n2, with the property that the sum of the entries of each column, row, or diagonal is the same.

› The sum of the entries of any row, column, or diagonal, of a magic square of size n is n(n2+1)/2 (to see this, use the identity: 1+2+...+k=k(k+1)/2).

Page 22: Applications of linear algebra
Page 23: Applications of linear algebra

Application to Genetics› Living things inherit from their parents many of their physical

characteristics. The genes of the parents determine these characteristics. The study of these genes is called Genetics; in other words genetics is the branch of biology that deals with heredity.

› In particular, population genetics is the branch of genetics that studies the genetic structure of a certain population and seeks to explain how transmission of genes changes from one generation to another. Genes govern the inheritance of traits like sex, color of the eyes, hair (for humans and animals), leaf shape and petal color (for plants).

› There are several types of inheritance; one of particular interest for us is the autosomal type in which each heritable trait is assumed to be governed by a single gene. Typically, there are two different forms of genes denoted by A and a.

› Each individual in a population carries a pair of genes; the pairs are called the individual’s genotype. This gives three possible genotypes for each inheritable trait: AA, Aa, and aa (aA is genetically the same as Aa).

Page 24: Applications of linear algebra

› in a certain animal population, an autosomal model of inheritance controls eye coloration. Genotypes AA and Aa have brown eyes, while genotype aa has blue eyes. The A gene is said to dominate the a gene. An animal is called dominant if it has AA genes, hybrid with Aa genes, and recessive with aa genes. This means that genotypes AA and Aa are indistinguishable in appearance.

› Each offspring inherits one gene from each parent in a random manner. Given the genotypes of the parents, we can determine the probabilities of the genotype of the offspring. Suppose that, in this animal population, the initial distribution of genotypes is given by the vector

is called the transition matrix.  In general, Xn=AXn-1. Explicitly, we have:

Page 25: Applications of linear algebra

› Observe that the aa type disappears after the initial generation and that the Aa type becomes a smaller and smaller fraction of each successive generation. It is obvious that this sequence of vectors converges to the vector

in the long run.

Now try to create a similar model for crossing offspring with a hybrid animal. You will see that some offspring will have brown eyes and some blue eyes.

Page 26: Applications of linear algebra

GEOMETRICAL APPLICATIONS› Given some fixed points in the plane or in 3-D space,

many problems require finding some geometric figures passing through these points. The examples we are going to see in this page require knowledge of solving linear systems and computing determinants.

› Application 1 Let A1 = (x1, y1) and A2 =(x2, y2) be two fixed points in the plane. Find the equation of the straight line L going through A1 and A2.

Page 27: Applications of linear algebra

› Solution Let M= (x, y) be an arbitrary point on L, then one can find three constants a, b and c satisfying

Since A1 and A2 are on L, one has

Together with the above equation, we have a homogeneous system in three equations and three variables a, b and c:

Since we know that there will be a line through A1 and A2; this system will have at least one solution (a, b, c).

Page 28: Applications of linear algebra

› However, if (a, b, c) is a solution, so is k(a, b, c) for any scalar k and so the system has infinitely many solutions. Therefore, the determinant of the coefficient matrix must be zero.

or

For example if A1 =(-1, 2) and A2= =(0,1), then the equation of the line L is in this case:

Page 29: Applications of linear algebra

› Application 2 Given three points A1 =(x1, y1), A2 =(x2, y2) and A3 =(x3, y3) in the plan (and not on the same line), find the equation of the circle going through these points.

› If M =(x, y) is an arbitrary point on the circle, then we can write

Page 30: Applications of linear algebra

where a, b, c and d are constants. Substituting the three points in the above equation gives the following homogeneous system in four equations and four variables a, b, c and d:

As in Example 1, the system has infinitely many solutions. So, the determinant:

For example, to find the equation of the circle going through the points A1 (1, 0), A2 (-1, 2) and A3 (3, 1), we write

Page 31: Applications of linear algebra

which gives after simplification

The circle has (7/6, 13/6) as center and 37/18 as radius.

This can also be used to calculate orbit of planets using Kepler’s First Law.

Page 32: Applications of linear algebra
Page 33: Applications of linear algebra
Page 34: Applications of linear algebra
Page 35: Applications of linear algebra