Matrices, operations on matrices. inverse matrix

1st year, higher mathematics, studying matrices and basic actions on them. Here we systematize the basic operations that can be performed with matrices. Where to start getting acquainted with matrices? Of course, from the simplest things - definitions, basic concepts and simple operations. We assure you that the matrices will be understood by everyone who devotes at least a little time to them!

Matrix Definition

Matrix is a rectangular table of elements. Well, in simple terms – a table of numbers.

Typically, matrices are denoted in capital Latin letters. For example, matrix A , matrix B and so on. Matrices can be of different sizes: rectangular, square, and there are also row and column matrices called vectors. The size of the matrix is ​​determined by the number of rows and columns. For example, let's write a rectangular matrix of size m on n , Where m – number of lines, and n – number of columns.

Items for which i=j (a11, a22, .. ) form the main diagonal of the matrix and are called diagonal.

What can you do with matrices? Add/Subtract, multiply by a number, multiply among themselves, transpose. Now about all these basic operations on matrices in order.

Matrix addition and subtraction operations

Let us immediately warn you that you can only add matrices of the same size. The result will be a matrix of the same size. Adding (or subtracting) matrices is simple - you just need to add up their corresponding elements . Let's give an example. Let's perform the addition of two matrices A and B of size two by two.

Subtraction is performed by analogy, only with the opposite sign.

Any matrix can be multiplied by an arbitrary number. To do this, you need to multiply each of its elements by this number. For example, let's multiply the matrix A from the first example by the number 5:

Matrix multiplication operation

Not all matrices can be multiplied together. For example, we have two matrices - A and B. They can be multiplied by each other only if the number of columns of matrix A is equal to the number of rows of matrix B. In this case each element of the resulting matrix, located in the i-th row and j-th column, will be equal to the sum of the products of the corresponding elements in the i-th row of the first factor and the j-th column of the second. To understand this algorithm, let's write down how two square matrices are multiplied:

And an example with real numbers. Let's multiply the matrices:

Matrix transpose operation

Matrix transposition is an operation where the corresponding rows and columns are swapped. For example, let's transpose the matrix A from the first example:

Matrix determinant

Determinant, or determinant, is one of the basic concepts of linear algebra. Once upon a time, people came up with linear equations, and after them they had to come up with a determinant. In the end, it’s up to you to deal with all this, so, the last push!

The determinant is a numerical characteristic of a square matrix, which is needed to solve many problems.
To calculate the determinant of the simplest square matrix, you need to calculate the difference between the products of the elements of the main and secondary diagonals.

The determinant of a matrix of first order, that is, consisting of one element, is equal to this element.

What if the matrix is ​​three by three? This is more difficult, but you can manage it.

For such a matrix, the value of the determinant is equal to the sum of the products of the elements of the main diagonal and the products of the elements lying on the triangles with a face parallel to the main diagonal, from which the product of the elements of the secondary diagonal and the product of the elements lying on the triangles with the face of the parallel secondary diagonal are subtracted.

Fortunately, in practice it is rarely necessary to calculate determinants of matrices of large sizes.

Here we looked at basic operations on matrices. Of course, in real life you may never encounter even a hint of a matrix system of equations, or, on the contrary, you may encounter much more complex cases when you really have to rack your brains. It is for such cases that professional student services exist. Ask for help, get a high-quality and detailed solution, enjoy academic success and free time.

Lecture 1. “Matrixes and basic operations on them. Determinants

Definition. Matrix size mn, Where m- number of lines, n- the number of columns, called a table of numbers arranged in a certain order. These numbers are called matrix elements. The location of each element is uniquely determined by the number of the row and column at the intersection of which it is located. The elements of the matrix are designateda ij, Where i- line number, and j- column number.

A =

Basic operations on matrices.

A matrix can consist of either one row or one column. Generally speaking, a matrix can even consist of one element.

Definition. If the number of matrix columns is equal to the number of rows (m=n), then the matrix is ​​called square.

Definition. Matrix view:

= E ,

called identity matrix.

Definition. If a mn = a nm , then the matrix is ​​called symmetrical.

Example.
- symmetric matrix

Definition. Square matrix of the form
called diagonal matrix.

Addition and subtraction matrices is reduced to the corresponding operations on their elements. The most important property of these operations is that they defined only for matrices of the same size. Thus, it is possible to define matrix addition and subtraction operations:

Definition. Sum (difference) matrices is a matrix whose elements are, respectively, the sum (difference) of the elements of the original matrices.


c ij = a ij b ij

C = A + B = B + A.

Operation multiplication (division) matrix of any size by an arbitrary number is reduced to multiplying (dividing) each element of the matrix by this number.

(A+B) =  A   B A( ) =  A   A

Example. Given matrices A =
; B=
, find 2A + B.

2A =
, 2A + B =
.

Matrix multiplication operation.

Definition: The work matrices is a matrix whose elements can be calculated using the following formulas:

AB = C;
.

From the above definition it is clear that the operation of matrix multiplication is defined only for matrices the number of columns of the first of which is equal to the number of rows of the second.

Properties of the matrix multiplication operation.

1) Matrix multiplicationnot commutative , i.e. AB  VA even if both products are defined. However, if for any matrices the relation AB = BA is satisfied, then such matrices are calledpermutable.

The most typical example is a matrix that commutes with any other matrix of the same size.

Only square matrices of the same order can be permutable.

A E = E A = A

Obviously, for any matrices the following property holds:

AO = O; OA = O,

where O – zero matrix.

2) Matrix multiplication operation associative, those. if the products AB and (AB)C are defined, then BC and A(BC) are defined, and the equality holds:

(AB)C=A(BC).

3) Matrix multiplication operation distributive in relation to addition, i.e. if the expressions A(B+C) and (A+B)C make sense, then accordingly:

A(B + C) = AB + AC

(A + B)C = AC + BC.

4) If the product AB is defined, then for any number the following ratio is correct:

(AB) = (A) B = A(B).

5) If the product AB is defined, then the product B T A T is defined and the equality holds:

(AB) T = B T A T, where

index T denotes transposed matrix.

6) Note also that for any square matrices det (AB) = detA detB.

What's happened det will be discussed below.

Definition . Matrix B is called transposed matrix A, and the transition from A to B transposition, if the elements of each row of matrix A are written in the same order in the columns of matrix B.

A =
; B = A T =
;

in other words, b ji = a ij .

As a consequence of the previous property (5), we can write that:

(ABC ) T = C T B T A T ,

provided that the product of matrices ABC is defined.

Example. Given matrices A =
, B = , C =
and number
 = 2. Find A T B+  C.

A T =
; A T B =
=
=
;

C =
; A T B+  C =
+
=
.

Example. Find the product of matrices A = and B =
.

AB = 
=
.

VA =
 = 2  1 + 4  4 + 1  3 = 2 + 16 + 3 = 21.

Example. Find the product of matrices A=
, B =

AB =

=
=
.

Determinants(determinants).

Definition. Determinant square matrix A=
is a number that can be calculated from the elements of a matrix using the formula:

det A =
, where (1)

M 1 to– determinant of the matrix obtained from the original one by deleting the first row and the kth column. It should be noted that determinants have only square matrices, i.e. matrices in which the number of rows is equal to the number of columns.

F formula (1) allows you to calculate the determinant of a matrix from the first row; the formula for calculating the determinant from the first column is also valid:

det A =
(2)

Generally speaking, the determinant can be calculated from any row or column of a matrix, i.e. the formula is correct:

detA =
, i = 1,2,…,n. (3)

Obviously, different matrices can have the same determinants.

The determinant of the identity matrix is ​​1.

For the specified matrix A, the number M 1k is called additional minor matrix element a 1 k . Thus, we can conclude that each element of the matrix has its own additional minor. Additional minors only exist in square matrices.

Definition. Additional minor of an arbitrary element of a square matrix a ij is equal to the determinant of the matrix obtained from the original one by deleting the i-th row and j-th column.

Property1. An important property of determinants is the following relationship:

det A = det A T ;

Property 2. det (AB) = det Adet B.

Property 3. det (AB) = detAdetB

Property 4. If you swap any two rows (or columns) in a square matrix, the determinant of the matrix will change sign without changing in absolute value.

Property 5. When you multiply a column (or row) of a matrix by a number, its determinant is multiplied by that number.

Property 6. If in matrix A the rows or columns are linearly dependent, then its determinant is equal to zero.

Definition: The columns (rows) of a matrix are called linearly dependent, if there is a linear combination of them equal to zero that has non-trivial (non-zero) solutions.

Property 7. If a matrix contains a zero column or a zero row, then its determinant is zero. (This statement is obvious, since the determinant can be calculated precisely by the zero row or column.)

Property 8. The determinant of a matrix will not change if elements of another row (column) are added (subtracted) to the elements of one of its rows (columns), multiplied by any number that is not equal to zero.

Property 9. If the following relation is true for the elements of any row or column of the matrix:d = d 1 d 2 , e = e 1 e 2 , f = det(AB).

1st method: det A = 4 – 6 = -2; det B = 15 – 2 = 13; det (AB) = det A det B = -26.

2nd method: AB =
, det (AB) = 7 18 - 8 19 = 126 –

152 = -26.


This manual will help you learn how to perform operations with matrices: addition (subtraction) of matrices, transposition of a matrix, multiplication of matrices, finding the inverse matrix. All material is presented in a simple and accessible form, relevant examples are given, so even an unprepared person can learn how to perform actions with matrices. For self-monitoring and self-testing, you can download a matrix calculator for free >>>.

I will try to minimize theoretical calculations; in some places explanations “on the fingers” and the use of non-scientific terms are possible. Lovers of solid theory, please do not engage in criticism, our task is learn to perform operations with matrices.

For SUPER FAST preparation on the topic (who is “on fire”) there is an intensive pdf course Matrix, determinant and test!

A matrix is ​​a rectangular table of some elements. As elements we will consider numbers, that is, numerical matrices. ELEMENT is a term. It is advisable to remember the term, it will appear often, it is no coincidence that I used bold font to highlight it.

Designation: matrices are usually denoted in capital Latin letters

Example: Consider a two-by-three matrix:

This matrix consists of six elements:

All numbers (elements) inside the matrix exist on their own, that is, there is no question of any subtraction:

It's just a table (set) of numbers!

We'll also agree do not rearrange numbers, unless otherwise stated in the explanations. Each number has its own location and cannot be shuffled!

The matrix in question has two rows:

and three columns:

STANDARD: when talking about matrix sizes, then at first indicate the number of rows, and only then the number of columns. We have just broken down the two-by-three matrix.

If the number of rows and columns of a matrix is ​​the same, then the matrix is ​​called square, For example: – a three-by-three matrix.

If a matrix has one column or one row, then such matrices are also called vectors.

In fact, we have known the concept of a matrix since school; consider, for example, a point with coordinates “x” and “y”: . Essentially, the coordinates of a point are written into a one-by-two matrix. By the way, here is an example of why the order of numbers matters: and are two completely different points on the plane.

Now let's move on to studying operations with matrices:

1) Act one. Removing a minus from the matrix (introducing a minus into the matrix).

Let's return to our matrix . As you probably noticed, there are too many negative numbers in this matrix. This is very inconvenient from the point of view of performing various actions with the matrix, it is inconvenient to write so many minuses, and it simply looks ugly in design.

Let's move the minus outside the matrix by changing the sign of EACH element of the matrix:

At zero, as you understand, the sign does not change; zero is also zero in Africa.

Reverse example: . It looks ugly.

Let's introduce a minus into the matrix by changing the sign of EACH element of the matrix:

Well, it turned out much nicer. And, most importantly, it will be EASIER to perform any actions with the matrix. Because there is such a mathematical folk sign: the more minuses, the more confusion and errors.

2) Act two. Multiplying a matrix by a number.

Example:

It's simple, in order to multiply a matrix by a number, you need every matrix element multiplied by a given number. In this case - a three.

Another useful example:

– multiplying a matrix by a fraction

First let's look at what to do NO NEED:

There is NO NEED to enter a fraction into the matrix; firstly, it only complicates further actions with the matrix, and secondly, it makes it difficult for the teacher to check the solution (especially if – final answer of the task).

And especially, NO NEED divide each element of the matrix by minus seven:

From the article Mathematics for dummies or where to start, we remember that in higher mathematics they try to avoid decimal fractions with commas in every possible way.

The only thing is preferably What to do in this example is to add a minus to the matrix:

But if only ALL matrix elements were divided by 7 without a trace, then it would be possible (and necessary!) to divide.

Example:

In this case, you can NEED TO multiply all matrix elements by , since all matrix numbers are divisible by 2 without a trace.

Note: in the theory of higher school mathematics there is no concept of “division”. Instead of saying “this divided by that,” you can always say “this multiplied by a fraction.” That is, division is a special case of multiplication.

3) Act three. Matrix Transpose.

In order to transpose a matrix, you need to write its rows into the columns of the transposed matrix.

Example:

Transpose matrix

There is only one line here and, according to the rule, it needs to be written in a column:

– transposed matrix.

A transposed matrix is ​​usually indicated by a superscript or a prime at the top right.

Step by step example:

Transpose matrix

First we rewrite the first row into the first column:

Then we rewrite the second line into the second column:

And finally, we rewrite the third row into the third column:

Ready. Roughly speaking, transposing means turning the matrix on its side.

4) Act four. Sum (difference) of matrices.

The sum of matrices is a simple operation.
NOT ALL MATRICES CAN BE FOLDED. To perform addition (subtraction) of matrices, it is necessary that they be the SAME SIZE.

For example, if a two-by-two matrix is ​​given, then it can only be added with a two-by-two matrix and no other!

Example:

Add matrices And

In order to add matrices, you need to add their corresponding elements:

For the difference of matrices the rule is similar, it is necessary to find the difference of the corresponding elements.

Example:

Find matrix difference ,

How can you solve this example more easily, so as not to get confused? It is advisable to get rid of unnecessary minuses; to do this, add a minus to the matrix:

Note: in the theory of higher school mathematics there is no concept of “subtraction”. Instead of saying “subtract this from this,” you can always say “add a negative number to this.” That is, subtraction is a special case of addition.

5) Act five. Matrix multiplication.

What matrices can be multiplied?

In order for a matrix to be multiplied by a matrix, it is necessary so that the number of matrix columns is equal to the number of matrix rows.

Example:
Is it possible to multiply a matrix by a matrix?

This means that matrix data can be multiplied.

But if the matrices are rearranged, then, in this case, multiplication is no longer possible!

Therefore, multiplication is not possible:

It is not so rare to encounter tasks with a trick, when the student is asked to multiply matrices, the multiplication of which is obviously impossible.

It should be noted that in some cases it is possible to multiply matrices in both ways.
For example, for matrices, and both multiplication and multiplication are possible

DEFINITION OF MATRIX. TYPES OF MATRICES

Matrix of size m× n called a set m·n numbers arranged in a rectangular table of m lines and n columns. This table is usually enclosed in parentheses. For example, the matrix might look like:

For brevity, a matrix can be denoted by a single capital letter, for example, A or IN.

In general, a matrix of size m× n write it like this

.

The numbers that make up the matrix are called matrix elements. It is convenient to provide matrix elements with two indices a ij: The first indicates the row number and the second indicates the column number. For example, a 23– the element is in the 2nd row, 3rd column.

If a matrix has the same number of rows as the number of columns, then the matrix is ​​called square, and the number of its rows or columns is called in order matrices. In the above examples, the second matrix is ​​square - its order is 3, and the fourth matrix is ​​its order 1.

A matrix in which the number of rows is not equal to the number of columns is called rectangular. In the examples this is the first matrix and the third.

There are also matrices that have only one row or one column.

A matrix with only one row is called matrix - row(or string), and a matrix with only one column matrix - column.

A matrix whose elements are all zero is called null and is denoted by (0), or simply 0. For example,

.

Main diagonal of a square matrix we call the diagonal going from the upper left to the lower right corner.

A square matrix in which all elements below the main diagonal are equal to zero is called triangular matrix.

.

A square matrix in which all elements, except perhaps those on the main diagonal, are equal to zero, is called diagonal matrix. For example, or.

A diagonal matrix in which all diagonal elements are equal to one is called single matrix and is denoted by the letter E. For example, the 3rd order identity matrix has the form .

ACTIONS ON MATRICES

Matrix equality. Two matrices A And B are said to be equal if they have the same number of rows and columns and their corresponding elements are equal a ij = b ij. So if And , That A=B, If a 11 = b 11, a 12 = b 12, a 21 = b 21 And a 22 = b 22.

Transpose. Consider an arbitrary matrix A from m lines and n columns. It can be associated with the following matrix B from n lines and m columns, in which each row is a matrix column A with the same number (hence each column is a row of the matrix A with the same number). So if , That .

This matrix B called transposed matrix A, and the transition from A To B transposition.

Thus, transposition is a reversal of the roles of the rows and columns of a matrix. Matrix transposed to matrix A, usually denoted A T.

Communication between matrix A and its transpose can be written in the form .

For example. Find the matrix transposed of the given one.

Matrix addition. Let the matrices A And B consist of the same number of rows and the same number of columns, i.e. have same sizes. Then in order to add matrices A And B needed for matrix elements A add matrix elements B standing in the same places. Thus, the sum of two matrices A And B called a matrix C, which is determined by the rule, for example,

Examples. Find the sum of matrices:

It is easy to verify that matrix addition obeys the following laws: commutative A+B=B+A and associative ( A+B)+C=A+(B+C).

Multiplying a matrix by a number. To multiply a matrix A per number k every element of the matrix is ​​needed A multiply by this number. Thus, the matrix product A per number k there is a new matrix, which is determined by the rule or .

For any numbers a And b and matrices A And B the following equalities hold:

Examples.

Matrix multiplication. This operation is carried out according to a peculiar law. First of all, we note that the sizes of the factor matrices must be consistent. You can multiply only those matrices in which the number of columns of the first matrix coincides with the number of rows of the second matrix (i.e., the length of the first row is equal to the height of the second column). The work matrices A not a matrix B called the new matrix C=AB, the elements of which are composed as follows:

Thus, for example, to obtain the product (i.e. in the matrix C) element located in the 1st row and 3rd column from 13, you need to take the 1st row in the 1st matrix, the 3rd column in the 2nd, and then multiply the row elements by the corresponding column elements and add the resulting products. And other elements of the product matrix are obtained using a similar product of the rows of the first matrix and the columns of the second matrix.

In general, if we multiply a matrix A = (a ij) size m× n to the matrix B = (b ij) size n× p, then we get the matrix C size m× p, whose elements are calculated as follows: element c ij is obtained as a result of the product of elements i th row of the matrix A to the corresponding elements j th matrix column B and their additions.

From this rule it follows that you can always multiply two square matrices of the same order, and as a result we obtain a square matrix of the same order. In particular, a square matrix can always be multiplied by itself, i.e. square it.

Another important case is the multiplication of a row matrix by a column matrix, and the width of the first must be equal to the height of the second, resulting in a first-order matrix (i.e. one element). Really,

.

Examples.

Thus, these simple examples show that matrices, generally speaking, do not commute with each other, i.e. A∙BB∙A . Therefore, when multiplying matrices, you need to carefully monitor the order of the factors.

It can be verified that matrix multiplication obeys associative and distributive laws, i.e. (AB)C=A(BC) And (A+B)C=AC+BC.

It is also easy to check that when multiplying a square matrix A to the identity matrix E of the same order we again obtain a matrix A, and AE=EA=A.

The following interesting fact can be noted. As you know, the product of 2 non-zero numbers is not equal to 0. For matrices this may not be the case, i.e. the product of 2 non-zero matrices may turn out to be equal to the zero matrix.

For example, If , That

.

THE CONCEPT OF DETERMINANTS

Let a second-order matrix be given - a square matrix consisting of two rows and two columns .

Second order determinant corresponding to a given matrix is ​​the number obtained as follows: a 11 a 22 – a 12 a 21.

The determinant is indicated by the symbol .

So, in order to find the second-order determinant, you need to subtract the product of the elements along the second diagonal from the product of the elements of the main diagonal.

Examples. Calculate second order determinants.

Similarly, we can consider a third-order matrix and its corresponding determinant.

Third order determinant, corresponding to a given square matrix of third order, is the number denoted and obtained as follows:

.

Thus, this formula gives the expansion of the third-order determinant in terms of the elements of the first row a 11, a 12, a 13 and reduces the calculation of the third-order determinant to the calculation of the second-order determinants.

Examples. Calculate the third order determinant.


Similarly, one can introduce the concepts of determinants of the fourth, fifth, etc. orders, lowering their order by expanding into the elements of the 1st row, with the “+” and “–” signs of the terms alternating.

So, unlike a matrix, which is a table of numbers, a determinant is a number that is assigned to the matrix in a certain way.

Matrix dimension is a rectangular table consisting of elements located in m lines and n columns.

Matrix elements (first index i− line number, second index j− column number) can be numbers, functions, etc. Matrices are denoted by capital letters of the Latin alphabet.

The matrix is ​​called square, if it has the same number of rows as the number of columns ( m = n). In this case the number n is called the order of the matrix, and the matrix itself is called a matrix n-th order.

Elements with the same indexes form main diagonal square matrix, and the elements (i.e. having a sum of indices equal to n+1) − side diagonal.

Single matrix is a square matrix, all elements of the main diagonal of which are equal to 1, and the remaining elements are equal to 0. It is denoted by the letter E.

Zero matrix− is a matrix, all elements of which are equal to 0. A zero matrix can be of any size.

To the number linear operations on matrices relate:

1) matrix addition;

2) multiplying matrices by number.

The matrix addition operation is defined only for matrices of the same dimension.

The sum of two matrices A And IN called a matrix WITH, all elements of which are equal to the sums of the corresponding matrix elements A And IN:

.

Matrix product A per number k called a matrix IN, all elements of which are equal to the corresponding elements of this matrix A, multiplied by the number k:

Operation matrix multiplication is introduced for matrices that satisfy the condition: the number of columns of the first matrix is ​​equal to the number of rows of the second.

Matrix product A dimensions to the matrix IN dimension is called a matrix WITH dimensions, element i-th line and j the th column of which is equal to the sum of the products of the elements i th row of the matrix A to the corresponding elements j th matrix column IN:

The product of matrices (unlike the product of real numbers) does not obey the commutative law, i.e. in general A IN IN A.

1.2. Determinants. Properties of determinants

The concept of a determinant is introduced only for square matrices.

The determinant of a 2nd order matrix is ​​a number calculated according to the following rule

.

Determinant of a 3rd order matrix is a number calculated according to the following rule:

The first of the terms with the “+” sign is the product of the elements located on the main diagonal of the matrix (). The remaining two contain elements located at the vertices of triangles with the base parallel to the main diagonal (i). The “-” sign includes the products of elements of the secondary diagonal () and elements forming triangles with bases parallel to this diagonal (and).

This rule for calculating the 3rd order determinant is called the triangle rule (or Sarrus' rule).

Properties of determinants Let's look at the example of 3rd order determinants.

1. When replacing all rows of the determinant with columns with the same numbers as the rows, the determinant does not change its value, i.e. rows and columns of the determinant are equal

.

2. When two rows (columns) are rearranged, the determinant changes its sign.

3. If all elements of a certain row (column) are zeros, then the determinant is 0.

4. The common factor of all elements of a row (column) can be taken beyond the sign of the determinant.

5. The determinant containing two identical rows (columns) is equal to 0.

6. A determinant containing two proportional rows (columns) is equal to zero.

7. If each element of a certain column (row) of a determinant represents the sum of two terms, then the determinant is equal to the sum of two determinants, one of which contains the first terms in the same column (row), and the other contains the second. The remaining elements of both determinants are the same. So,

.

8. The determinant will not change if the corresponding elements of another column (row) are added to the elements of any of its columns (rows), multiplied by the same number.

The next property of the determinant is related to the concepts of minor and algebraic complement.

Minor element of a determinant is a determinant obtained from a given one by crossing out the row and column at the intersection of which this element is located.

For example, the minor element of the determinant is called a determinant.

Algebraic complement a determinant element is called its minor multiplied by, where i− line number, j− number of the column at the intersection of which the element is located. Algebraic complement is usually denoted. For a 3rd order determinant element, the algebraic complement

9. The determinant is equal to the sum of the products of the elements of any row (column) by their corresponding algebraic complements.

For example, the determinant can be expanded into the elements of the first row

,

or second column

The properties of determinants are used to calculate them.