Documente Academic
Documente Profesional
Documente Cultură
Two matrices A and B are equal if and only if aij = bij for all possible i
and j and they have the same dimensions.
5
The right side is referred to as an inner product of the i-th row of A and
6
the j-th column of B.
In MATLAB
(A + B)C = AC + BC
C(A + B) = CA + CB
Matrix multiplication is not commutative. In general, AB BA.
Ax = b
If b = 0, we have a homogeneous set of equations; otherwise, we have
11
a nonhomogeneous set.
aNyN-1 + bNyN = dN
The matrix representation:
12
The matrix is in upper triangular form because all of the elements below
the principal diagonal are zero.
yN can be computed by back substitution.
We calculate yN-1 in terms of yN.
The solution yN-2 can then be computed in terms of yN and yN-1.
14
15
(2) Determinants
Consider two simultaneous equations with two unknowns x1 and x2,
a11x1 + a12x2 = b1
a21x1 + a22x2 = b2
The solution to these equations for the value of x1 and x2 is
Note that the denominator of the two equations is the same, which is
formally given the name of determinant and written as
16
(2) Determinants
MATLAB provides a simple command det (A) which computes the
determinant of A.
17
(2) Determinants
det(A) = ai1Ai1 + ai2Ai2 + + ainAin
= a1jA1j + a2jA2j + + anjAnj,
where Aij, the cofactor of aij, equals (-1)i+j Mij. The minor Mij is the
determinant of the (n-1) x (n-1) sub-matrix obtained by deleting row i,
column j of A.
Examples of determinants:
18
(2) Determinants
Although Laplaces expansion does provide a method for calculating
det(A), the number of calculations equals (n!).
An obvious strategy is to select the column or row that has the greatest
number of zeros. An even better strategy would be to manipulate a
determinant with the goal of introducing zeros into a particular column
or row.
Rules for calculating determinants:
Rule 1: For every square matrix A, det(AT) = det(A).
Rule 2: If any two rows or columns of A are identical, det(A) = 0.
19
(2) Determinants
Rules for calculating determinants:
Rule 3: The determinant of a triangular matrix is equal to the product of
its diagonal elements.
= = a11a22ann.
Rule 4: If a square matrix A has either a row or a column of all zeros,
then det(A) = 0.
Rule 5: If each element in one row (column) of a determinant is
multiplied by a number c, the value of the determinant is multiplied by c.
20
(2) Determinants
Rules for calculating determinants:
Rule 6: If each element of a row (or a column) of a determinant can be
expressed as a binomial, the determinant can be written as the sum of
two determinants.
21
(2) Determinants
Rules for calculating determinants:
Rule 9: The value of det(A) is unchanged if any arbitrary multiple of any
line (row or column) is added to any other line.
22
(2) Determinants
Example of calculating determinant:
By adding or subtracting the first row to the other rows, we have that
23
24
25
26
2x1 + x2 + 2x3 = -1
x1 + x3 = -1
-x1 + 3x2 - 2x3 = 7
The matrix form of the equations
we have that
27
28
29
Let us now solve the following set of linear equations with elementary
row operations.
x1 - 3x2 + 7x3 = 2
2x1 + 4x2 - 3x3 = -1
-x1 + 13x2 -21x3 = 2
The coefficient matrix of the system:
31
At this point we choose the second row as our new pivotal row and
again apply the third row operation to eliminate the last element in the
second column. This yields
33
35
Clearly any finite numbers satisfy the equation 0x1 + 0x2 + 0x3 = 0 and
we have an infinite number of solutions.
The original system is an underdetermined system.
The final augmented matrix is of the form of a staircase or echelon form
rather than of triangular form.
Let us modify the original system to
x1 + 2x2 + x3 = -1
2x1 + 4x2 + 2x3 = 3
x1 + 4x2 + 2x3 = 2
The final augmented matrix is:
38
39
41
The right half of the augmented matrix yields the inverse and it equals
42
43
44
46
47
48
49
Pre-multiplying by A,
Pre-multiplying by A2,
51
Because
For 1 = -3,
x1 = 2x2.
Thus, any nonzero multiple of the vector
is an eigenvector
belonging to 1= -3.
Similarly, for 2 = -2, the eigenvector is any nonzero multiple of the
vector
54
This yields
eigenvector =
-0.8944 -0.7071
-0.4472 -0.7071
eigenvalue =
-3 0
0 -2
The above eigenvectors have been normalized. Their norm equals one.
55
56
vector
57
and
59