Pixelate:Issue 15/la1

From Allegro Wiki

Jump to: navigation, search

Introduction

Linear Algebra describes a relationship between variables.

We use linear algebra so often in our daily lives that it has become almost transparent to us. But as you will see, when complex systems arise we need a concrete method of finding a solution.

Ill start of by introducing some basic concepts Terms Linear Equation

A Linear Equation is an equation of the form A1X1 + A2X2 + ... + AnXn = B Where A(1..n) and B are real numbers and X(1..n) are the variables. Example

2x + 5y = 11 Geomerical Interpretation

The geometrical interpretation of a linear equation in two varables is a line

In the example above the intercepts with the x and y axis can be found by substituting x=0 then y=0

Substituting x=0 gives 5y = 11 Substituting y=0 gives 2x = 11

Image:line.gif

The geometical form of a linear equation in 3 variables is a plane. Linear System (simutaneous equations)

A Linear System is simply a group of Linear Equations. Example

2x + 5y = 11 x - 3y = 0 System Solution

A system solution is a sequence of numbers S1, S2, ... Sn such that X1=S1, X2=S2, ... Xn=Sn and the Linear System is true for all equations. A system with no solutions is called "inconsistent". Example

2x + 5y = 11 x - 3y = 0

Solution = { x=3 y=1 Geomerical Interpretation

The geometrical interpretation of a solution is a point or line in space where all of the equations intersect.

Image:solution.gif

Operations On Equations

There are a 3 ways that a system of linear equations can be manipulated and still retain its original solution set.

  1.
     Equations in a system may exchange places.
     x + y = 4
     x + 2y = 5
     	   is equivalent to   	
     x + 2y = 5
     x + y = 4
  2. Equations may be multiplied by a constant value.
     x + 2y = 5
     	   is equivalent to   	
     3x + 6y = 15
  3. Equations may be added to each other.
     x + 2y = 5
     x + y = 4
     	   is equivalent to   	
     x + 2y = 5
     2x + 3y = 9
     	
       (1) + (2) -> (2)

An Example:

I have 6 coins, some are pennies (5c) and some are dimes (10c). Together they add up to 35 cents. What coins do I have?

Let p be the number of pennies

Let d be the number of dimes

(1)... p + d = 6 (2)... 5p + 10d = 35 Solving Via Substitution

To solve via substitution we simply rearrange one of the equations and substitute into the others.

From (1)

p = 6-d

Substituting this into (2) gives

5(6-d) + 10d = 35 30-5d + 10d = 35 30 + 5d = 35 5d = 5 d = 1

Therefore the number of dimes is 1 Solving Via Elimination

Multiply (1) by -5 to give...

(3)... -5p -5d = -30

Adding equations (3) and (2) gives...

(5p + 10d) + (-5p -5d) = (35) + (-30) 5p - 5p + 10d - 5d = 35 - 30 5d = 5 d = 1 Back-Substitution

We can back-substitute d=1 back in to find the value for p

p + d = 6 p + (1) = 6 p = 5

Hence the number of pennies is 5

Most of you guys could of worked that out in your heads in a couple of seconds flat so I'll give you something a little harder Something Harder

   * John is 3 years older than Jane
   * 7 Years ago, Jennifer was 9 times as old as James
   * Jennifer is twice as old as James
   * When James is 10 Jack will be twice as old as Jennifer
   * Jill is half Janes age
   * Jack and Jill are twins 

So lets form some equations from the above information to help us solve this. (each line above corresponds to the relative line below)

John = Jane + 3 (Jen - 7) = 9(James - 7) Jen = 2 James Jack + (10-James) = 2(Jen + (10-James)) Jane = 2 Jill Jack = Jill

Now we rearrange these into the form A1X1 + A2X2 + ... + AnXn = B

(1) John - Jane = 3 (2) 9 James - Jen = 56 (3) -2 James + Jen = 0 (4) James - 2 Jen + Jack = 10 (5) Jane - 2 Jill = 0 (6) Jack - Jill = 0

We can reduce this system to a much simpler system with the same solution by using the equation operations.

   * Equations in a system may exchange places.
   * Equations may be multiplied by a constant value.
   * Equations may be added to each other. 

Add (3) to (2)

(1) John - Jane = 3 (2) 7 James = 56 (3) -2 James + Jen = 0 (4) James - 2 Jen + Jack = 10 (5) Jane - 2 Jill = 0 (6) Jack - Jill = 0

Multiply (2) by 1/7

(1) John - Jane = 3 (2) James = 8 (3) -2 James + Jen = 0 (4) James - 2 Jen + Jack = 10 (5) Jane - 2 Jill = 0 (6) Jack - Jill = 0

Multiply (2) by 2 and add to (3)

(1) John - Jane = 3 (2) James = 8 (3) Jen = 16 (4) James - 2 Jen + Jack = 10 (5) Jane - 2 Jill = 0 (6) Jack - Jill = 0

Multiply (2) by -1 and add to (4)

(1) John - Jane = 3 (2) James = 8 (3) Jen = 16 (4) - 2 Jen + Jack = 2 (5) Jane - 2 Jill = 0 (6) Jack - Jill = 0

Multiply (3) by 2 and add to (4)

(1) John - Jane = 3 (2) James = 8 (3) Jen = 16 (4) Jack = 34 (5) Jane - 2 Jill = 0 (6) Jack - Jill = 0

Multiply (4) by -1 and add to (6)

(1) John - Jane = 3 (2) James = 8 (3) Jen = 16 (4) Jack = 34 (5) Jane - 2 Jill = 0 (6) - Jill = -34

Multiply (6) by -1

(1) John - Jane = 3 (2) James = 8 (3) Jen = 16 (4) Jack = 34 (5) Jane - 2 Jill = 0 (6) Jill = 34

Multiply (6) by 2 and add to (5)

(1) John - Jane = 3 (2) James = 8 (3) Jen = 16 (4) Jack = 34 (5) Jane = 68 (6) Jill = 34

Add (5) to (1)

John = 71 James = 8 Jen = 16 Jack = 34 Jane = 68 Jill = 34 In the next issue:

I know alot of the stuff in this Article was covered in Highschool, but it was important that I go from the ground up as I dont want to leave too many people behind.

In the next one, I will introduce the concept of Augmented Matrices and explain how to use them to solve a system linear equations efficiently and quickly.

Until next time... Steven Ashley

Personal tools