Friday, August 8, 2014

Scalar Multiplication

Scalar Multiplication of Matrices

In matrix algebra, a real number is called a scalar.
The scalar product of a real number, r, and a matrix A is the matrix rA.  Each element of matrix rA is r times its corresponding element in A.
Given scalar r and matrix  .
Example 1:
Let A = , find 4A.

Properties of Scalar Multiplication:

Let and be m × n matrices.  Let Om × n be the m × n zero matrix and let p and q be scalars.
Properties of Scalar Multiplication
Associative Property p(qA) = (pq)A
Closure Property pA is an m × n matrix.
Commutative Property pA = Ap
Distributive Property  
 (p + q)A = pA + qA
 p(A + B) = pA + pB
Identity Property 1 · A = A
Multiplicative Property of –1 (–1)A = –A
Multiplicative Property of 0 0 · A = Om × n

http://hotmath.com/hotmath_help/topics/scalar-multiplication-of-matrices.html

Matrix Addition

 

Adding Matrices

Rules for matrix addition:
  1. Matrices that are to be added together must be the same size (same number of rows and same number of columns)
  2. The corresponding cells of each matrix are added together. So cell a1,1 is added to cell b1,1, cell a3,2 is added to b3,2, and so on.
Note that matrix addition is commutative, so A + B = B + A
Example:

Friday, July 25, 2014

Analysis of an Electrical Network

An electical network is another type of network where analysis is commonly applied. An analysis of such a system uses two properties of electrical networks known as Kirchhoff's Laws.

1. All the current flowing into a junction must flow out of it.
2. The sum of the products IR (I is current and R is resistance) around a closed path is equal to the total voltage     in a path. 

The accompanying figure shows known flow rates of hydrocarbons into and out of a network of pipes at an oil refinery. 

(a) Set up a linear system whose solution provides the unknown flow rates. 

From the system so that the first equation represents node A, the second equation node B, etc. Then take all the variable to one side such that all the constants are on one side and positive. From the equations form the required matrices and enter the appropriate values for A below. 



a) Set up a linear system. Enter the appropriate values for A below 

Flow In = Flow Out 

A: 25 + x1 = x2 
B: x2 + x4 = x6 + 175 
C: x5 + x6 = 200 
D: x3 + 150 = x4 + x5 
E: 200 = x1 + x3 

A: x1 - x2 = -25 
B: x2 + x4 - x6 = 175 
C: x5 + x6 = 200 
D: x3 - x4 - x5 = 150 
E: x1 + x3 = 200 

[ 1 -1 0 0 0 0 -25] 
[ 0 1 0 1 0 -1 175] 
[ 0 0 0 0 1 1 200] 
[ 0 0 1 -1 -1 0 150] 
[ 1 0 1 0 0 0 200] 

= rearrange rows 
[ 1 -1 0 0 0 0 -25] 
[ 1 0 1 0 0 0 200] 
[ 0 1 0 1 0 -1 175] 
[ 0 0 1 -1 -1 0 150] 
[ 0 0 0 0 1 1 200] 

= row2 - row1 → row2 
[ 1 -1 0 0 0 0 -25] 
[ 0 1 1 0 0 0 225] 
[ 0 1 0 1 0 -1 175] 
[ 0 0 1 -1 -1 0 150] 
[ 0 0 0 0 1 1 200] 

= row2 + row1 → row1 
[ 1 0 1 0 0 0 200] 
[ 0 1 1 0 0 0 225] 
[ 0 1 0 1 0 -1 175] 
[ 0 0 1 -1 -1 0 150] 
[ 0 0 0 0 1 1 200] 

= row3 - row2 → row3 
[ 1 0 1 0 0 0 200] 
[ 0 1 1 0 0 0 225] 
[ 0 0 -1 1 0 -1 -50] 
[ 0 0 1 -1 -1 0 150] 
[ 0 0 0 0 1 1 200] 

= row3 + row4 → row4 
[ 1 0 1 0 0 0 200] 
[ 0 1 1 0 0 0 225] 
[ 0 0 -1 1 0 -1 -50] 
[ 0 0 0 0 -1 0 100] 
[ 0 0 0 0 1 1 200] 

= row4 + row5 → row5 
[ 1 0 1 0 0 0 200] 
[ 0 1 1 0 0 0 225] 
[ 0 0 -1 1 0 -1 -50] 
[ 0 0 0 0 -1 0 100] 
[ 0 0 0 0 0 1 300] 

= row3*(-1) → row3 
[ 1 0 1 0 0 0 200] 
[ 0 1 1 0 0 0 225] 
[ 0 0 1 -1 0 1 50] 
[ 0 0 0 0 -1 0 100] 
[ 0 0 0 0 0 1 300] 

= row4*(-1) → row4 
[ 1 0 1 0 0 0 200] 
[ 0 1 1 0 0 0 225] 
[ 0 0 1 -1 0 1 50] 
[ 0 0 0 0 1 0 -100] 
[ 0 0 0 0 0 1 300] 

= row3 - row5 → row3 
[ 1 0 1 0 0 0 200] 
[ 0 1 1 0 0 0 225] 
[ 0 0 1 -1 0 0 -250] 
[ 0 0 0 0 1 0 -100] 
[ 0 0 0 0 0 1 300] 

= row1 - row3 → row1 
[ 1 0 0 1 0 0 450] 
[ 0 1 1 0 0 0 225] 
[ 0 0 1 -1 0 0 -250] 
[ 0 0 0 0 1 0 -100] 
[ 0 0 0 0 0 1 300] 

= row2 - row3 → row2 
[ 1 0 0 1 0 0 450] 
[ 0 1 0 1 0 0 475] 
[ 0 0 1 -1 0 0 -250] 
[ 0 0 0 0 1 0 -100] 
[ 0 0 0 0 0 1 300] 

We now have 

x1 + x4 = 450 
x2 + x4 = 475 
x3 - x4 = -250 
x5 = -100 
x6 = 300 

The equation for A is unsolvable.



Saturday, July 5, 2014

Polynomial Curve Fitting

Suppose a collection of data is represented by n points in the xy-plane,

          ( x1 , y1 ),   ( x2 , y2 ) ,..., ( x n , yn )

and you are asked to find a polynomial function of degree n-1

          p(x) = a0 + a1x + a2x2 + ... + an-1xn-1

whose graph passes through the specified points. This procedure is polynomial curve fitting. If all x-coordinates of the points are distinct, then there is precisely one polynomial function of degree n-1 that fits the n points.
     To solve for the n coefficients of p(x), substitute each of the n points into the polynomial function and obtain n linear equations in n variables.

EXAMPLE:

Friday, June 27, 2014

Gauss-Jordan Elimination

A method for finding a matrix inverse. To apply Gauss-Jordan elimination, operate on a matrix
 [A I]=[a_(11) ... a_(1n) 1 0 ... 0; a_(21) ... a_(2n) 0 1 ... 0; | ... | | | ... |; a_(n1) ... a_(nn) 0 0 ... 1],
(1)
where I is the identity matrix, and use Gaussian elimination to obtain a matrix of the form
 [1 0 ... 0 b_(11) ... b_(1n); 0 1 ... 0 b_(21) ... b_(2n); | | ... | | ... |; 0 0 ... 1 b_(n1) ... b_(nn)].
(2)
The matrix
 B=[b_(11) ... b_(1n); b_(21) ... b_(2n); | ... |; b_(n1) ... b_(nn)]
(3)
is then the matrix inverse of A. The procedure is numerically unstable unless pivoting (exchanging rows and columns as appropriate) is used. Picking the largest available element as the pivot is usually a good choice.

GAUSS-JORDAN ELIMINATION

With Gaussian elimination, you apply elementary row operations to a matrix to obtain a (row-equivalent) row-echelon form. A second method of elimination, called Gauss-Jordan elimination after Carl Gauss and Wilhelm Jordan (1842-1899), continues the reduction process until a reduced row-echelon form is obtained.

EXAMPLE:


Waittt

Everything abt Gauss-Jordan will be coming from wiki and from the book. (Wala kasi akong notes.) So yep. :)