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. :)

Friday, June 20, 2014

"Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi
Definition of Row-Echelon of a Matrix

A matrix in row-echelon form has the following properties.

1. All rows consisting entirely of zeros occur at the bottom of the matrix.
2. For each row that does not consist entirely of zeros, the first nonzero entry is 1.
3. For two successive (nonzero) rows, the leading 1 in the higher row is farther to the left than the leading 1 in the lower row.

a.   1   2   -1   4                                    b.    1   -5   2   -1   3
      0   1   0    3                                            0   0   1    3   -2
      0   0   1   -2                                            0   0   0    1    4
                                                                     0   0   0    0    1


Reduced Row-Echelon

a.     0   1   0   5                                    b.    1   0   0   -1
        0   0   1   3                                           0   1   0   2
        0   0   0   0                                           0   0    1   3
                                                                    0   0   0    0
Elementary Row Operations

1. Interchange two equations.
2. Multiply an equation by a nonzero constant.
3. Add a multiple of an equation to another constant.

Two matrices are said to be row-equivalent if one can be obtained from the other by a finite sequence of elementary row operations.

Example:

a. Interchange the first and second rows.

          Original Matrix                                New Row-Equivalent Matrix
                      0   1   3   4                                            -1   2   0   3
                      -1   2   0   3                                           0   1   3   4
                      2   -3   4   1                                           2   -3   4   1
 
b. Multiply the first and second row by 1/2 to produce a new first row.

                    Original Matrix                                      New Row-Equivalent Matrix
                   
                     2   -4   6   -2                                                 1   -2   3   -1
                     1   3   -3   0                                                   1   3   -3   0
                     5   -2   1    2                                                  5   -2   1   2

c. Add -2 times the first row to the third row to produce a new third row.

                    Original Matrix                                       New Row-Equivalent Matrix

                      1   2   -4    3                                               1   2   -4   3
                      0   3   -2   -1                                               0   3   -2   -1
                      2   1    5    -2                                              0   -3   13   -8

MATRICES

Nakakalito at times.




The image above is an exmaple of MATRIX. Wait, ano nga ba ang matrix?

- A matrix is a rectangular array in which each entry, of the matrix is a number. 


Other terms:

  • Real Matrix - If each entry of a matrix is a real number, then the matrix is called a real matrix
  • Row Subscript - it identifies the row in which the entry lies. ( index i )
  • Column Subscript - it identifies the column in which the entry lies. ( index j )
A matrix with m rows and n columns ( an m x n ) is said to be of size m x n. If m = n, the matrix is called square of order n. For a square matrix, the entries a11, a22, a33, ... are called the main diagonal.


Augmented Matrix
           - the matrix derived from the coefficients and constant terms of a system of linear equations.
Coeffiecient Matrix
           - the matrix containing only the coefficients of the system.

Let's have an example:
                                                        Augmented Matrix                             Coefficient Matrix

2x - 4y + 2z = 6              2   -4   2   6                            2   -4   2
-5x + 2y - z = -3             -5   2   -1   -3                          -5   2   -1 
x             - 7z = 2            1   0   -7   2                                           1   0   -7


Wednesday, June 11, 2014

Random thought.

Tbh, I am not a fan of blogging o ano. I'm doing this for my grades. Charr. So yea! Haha.

I'm Leia. 15. Zambales! (O dba, beauty pageant ang datingan.) I like something orange. It brings uhm happiness, energy, brightness? and other ka-ekek-an I know whenever I see things having that color. I love salad, tociyes (napakakorni), white, mint and dark chocolates. It's not obvious but just so you know, I AM A BIG FAN OF ROCK, POP, and RAP genre of music. <3 Music has been there for me. It lives byyyy.

So yea. This must be description. Pero wala eh! 
*the beat goes on and on and on and*