Jump to content

Matrix Algebra for Electrical Engineers

From Wikiversity

Introduction - Linear Equations

[edit | edit source]

Let us illustrate through examples what linear equations are. We will also be introducing new notation wherever appropriate.

For example:


You could solve for or in one equation and substitute it into the other. But what if you had three variables, and three equations, such as:


Substitution is still viable, but it would take a while, and you have many opportunities to make a mistake. In this page, we will talk about turning linear equations into a matrix, and then using properties of matrices to solve them. Note that we're skipping most of the theory involved, and are solely focusing on their practical usage.

Now let's examine those first two problems. The first thing we need to do is turn the systems of equations into matrices. To do that, we make each row correspond to an equation, and each column (vertical) correspond to a single variable. So for the first equation:

So we have:



Where the first row is the first equation, and the second row is the second. The first column corresponds to , the second to , and the third to .


Let's try doing that to the second one now too:



Matrices

[edit | edit source]

Suppose that you have a linear system of equations

Matrices provide a simple way of expressing these equations. Thus, we can instead write


Here is a matrix while and are matrices. In general, an matrix is a set of numbers arranged in rows and columns.

Determinant of a matrix

[edit | edit source]

The next thing we will discuss is the meaning of the determinant of a matrix. Note that a determinant is only defined for square matrices.

For a matrix , we have

For a matrix, the determinant is calculated by expanding into minors as

In short, the determinant of a matrix has the value

where is the determinant of the submatrix of formed by eliminating row and column from .

Mathematics
Cramer's Rule
Subject classification: this is a mathematics resource.
Educational level: this is a secondary education resource.
Educational level: this is a tertiary (university) resource.

Cramers Rule

[edit | edit source]

Now we're going to unify our (basic) knowledge of turning a set of linear equations into a matrix, and calculating their determinant, as a method for solving linear equations.

Cramer's rule is an elegant formula for the solutions of a system of linear equations. A typical linear system (also known as a set of "simultaneous linear equations") is a set of N linear equations in N variables (or "unknowns".)

For N=3, it might look like this:

The numbers A...I (the "coefficient matrix") are given, as are the numbers P, Q, R (the "right-hand-sides".) The values of x, y, z (the "unknowns") are to be found. A system of N linear equations in N unknowns has a uniquely determined solution except in unusual circumstances (the coefficient matrix having determinant zero, as will be shown below.)

If the number of equations were greater than the number of unknowns, there would be no solutions except in unusual circumstances. If the number of equations were less than the number of unknowns, there would be infinitely many solutions. Neither of those cases is covered by Cramer's rule.

Cramer's rule gives the solution in terms of the determinants of the coefficient matrix and the coefficient matrix with individual columns replaced. It says that the value of the nth unknown is the quotient of the determinant of the coefficient matrix with its nth column replaced by the right-hand-side numbers, divided by the determinant of the unmodified coefficient matrix.

For the 3-equation example given above:

This works for any number of equations.

Basic examples

[edit | edit source]

Now, let's try that with our previous two examples:

Let's do the simpler one first:
The Coefficient matrix is given as:

As per Cramer's Rule, the variable of the nth column can be solved by taking the determinant of the matrix with the nth column replaced with the solution, and dividing it by the coefficient matrix. Let's do that. Lets first write out the matrix for calculating the first columns variable, . Substituting the solutions (14 and 11) into the first column gives us the matrix:


Now, we need to divide the matrix with the substitution by the original matrix:

From this we can see that the value of the variable in the first column, is equal to 5.


Now let's do the same for the second column. Replacing the -1 and 1 with the 14 and 11, and dividing the determinants:

From this we can see that the value of the variable in the second column, is equal to 1.