Square matrix how to solve. Mathematics for dummies. Matrices and basic operations on them


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

>> Matrices

4.1.Matrixes. Operations on matrices

A rectangular matrix of size mxn is a collection of mxn numbers arranged in the form of a rectangular table containing m rows and n columns. We will write it in the form

or abbreviated as A = (a i j) (i = ; j = ), numbers a i j are called its elements; The first index indicates the row number, the second - the column number. A = (a i j) and B = (b i j) of the same size are called equal if their elements standing in the same places are pairwise equal, that is, A = B if a i j = b i j.

A matrix consisting of one row or one column is called a row vector or a column vector, respectively. Column vectors and row vectors are simply called vectors.

A matrix consisting of one number is identified with this number. A of size mxn, all elements of which are equal to zero, are called zero and are denoted by 0. Elements with the same indices are called elements of the main diagonal. If the number of rows is equal to the number of columns, that is, m = n, then the matrix is ​​called a square matrix of order n. Square matrices in which only the elements of the main diagonal are nonzero are called diagonal and are written as follows:

.

If all elements a i i of the diagonal are equal to 1, then it is called unit and is denoted by the letter E:

.

A square matrix is ​​called triangular if all elements above (or below) the main diagonal are equal to zero. Transposition is a transformation in which rows and columns are swapped while maintaining their numbers. Transposition is indicated by a T at the top.

If we rearrange the rows and columns in (4.1), we get

,

which will be transposed with respect to A. In particular, when transposing a column vector, a row vector is obtained and vice versa.

The product of A and the number b is a matrix whose elements are obtained from the corresponding elements of A by multiplying by the number b: b A = (b a i j).

The sum A = (a i j) and B = (b i j) of the same size is called C = (c i j) of the same size, the elements of which are determined by the formula c i j = a i j + b i j.

The product AB is determined under the assumption that the number of columns of A is equal to the number of rows of B.

The product AB, where A = (a i j) and B = (b j k), where i = , j= , k= , given in a certain order AB, is called C = (c i k), the elements of which are determined by the following rule:

c i k = a i 1 b 1 k + a i 2 b 2 k +... + a i m b m k = a i s b s k . (4.2)

In other words, the element of the product AB is defined as follows: the element of the i-th row and the k-th column C is equal to the sum of the products of the elements of the i-th row A and the corresponding elements of the k-th column B.

Example 2.1. Find the product of AB and .

Solution. We have: A of size 2x3, B of size 3x3, then the product AB = C exists and the elements of C are equal

From 11 = 1×1 +2×2 + 1×3 = 8, from 21 = 3×1 + 1×2 + 0×3 = 5, from 12 = 1×2 + 2×0 + 1×5 = 7 ,

s 22 = 3×2 + 1 × 0 + 0 × 5 = 6, s 13 = 1 × 3 + 2 × 1 + 1 × 4 = 9, s 23 = 3 × 3 + 1 × 1 + 0 × 4 = 10 .

, and the product BA does not exist.

Example 2.2. The table shows the number of units of products shipped daily from dairies 1 and 2 to stores M 1, M 2 and M 3, and delivery of a unit of product from each dairy to store M 1 costs 50 den. units, to the M 2 store - 70, and to M 3 - 130 den. units Calculate the daily transportation costs of each plant.

Dairy plant

Solution. Let us denote by A the matrix given to us in the condition, and by
B - matrix characterizing the cost of delivering a unit of product to stores, i.e.,

,

Then the transportation cost matrix will look like:

.

So, the first plant spends 4,750 deniers on transportation daily. units, the second - 3680 monetary units.

Example 2.3. The sewing company produces winter coats, demi-season coats and raincoats. The planned output for a decade is characterized by the vector X = (10, 15, 23). Four types of fabrics are used: T 1, T 2, T 3, T 4. The table shows the fabric consumption rates (in meters) for each product. Vector C = (40, 35, 24, 16) specifies the cost of a meter of fabric of each type, and vector P = (5, 3, 2, 2) specifies the cost of transporting a meter of fabric of each type.

Fabric consumption

Winter coat

Demi-season coat

1. How many meters of each type of fabric will be needed to complete the plan?

2. Find the cost of fabric spent on sewing each type of product.

3. Determine the cost of all the fabric needed to complete the plan.

Solution. Let us denote by A the matrix given to us in the condition, i.e.,

,

then to find the number of meters of fabric needed to complete the plan, you need to multiply vector X by matrix A:

We find the cost of fabric spent on sewing products of each type by multiplying matrix A and vector C T:

.

The cost of all the fabric needed to complete the plan will be determined by the formula:

Finally, taking into account transport costs, the entire amount will be equal to the cost of the fabric, i.e. 9472 den. units, plus value

X A P T =
.

So, X A C T + X A P T = 9472 + 1037 = 10509 (money units).

Solving matrices– a concept that generalizes operations on matrices. A mathematical matrix is ​​a table of elements. A similar table with m rows and n columns is said to be an m by n matrix.
General view of the matrix

Main elements of the matrix:
Main diagonal. It is made up of the elements a 11, a 22.....a mn
Side diagonal. It is composed of the elements a 1n, and 2n-1.....a m1.
Before moving on to solving matrices, let’s consider the main types of matrices:
Square– in which the number of rows is equal to the number of columns (m=n)
Zero – all elements of this matrix are equal to 0.
Transposed matrix- matrix B obtained from the original matrix A by replacing rows with columns.
Single– all elements of the main diagonal are equal to 1, all others are 0.
inverse matrix- a matrix, when multiplied by which the original matrix results in the identity matrix.
The matrix can be symmetrical with respect to the main and secondary diagonals. That is, if a 12 = a 21, a 13 = a 31,….a 23 = a 32…. a m-1n =a mn-1. then the matrix is ​​symmetrical about the main diagonal. Only square matrices are symmetrical.
Now let's move directly to the question of how to solve matrices.

Matrix addition.

Matrices can be added algebraically if they have the same dimension. To add matrix A with matrix B, you need to add the element of the first row of the first column of matrix A with the first element of the first row of matrix B, the element of the second column of the first row of matrix A with the element of the second column of the first row of matrix B, etc.
Properties of addition
A+B=B+A
(A+B)+C=A+(B+C)

Matrix multiplication.

Matrices can be multiplied if they are consistent. Matrices A and B are considered consistent if the number of columns of matrix A is equal to the number of rows of matrix B.
If A is of dimension m by n, B is of dimension n by k, then the matrix C=A*B will be of dimension m by k and will be composed of elements

Where C 11 is the sum of pairwise products of the elements of a row of matrix A and a column of matrix B, that is, the element is the sum of the product of an element of the first column of the first row of matrix A with an element of the first column of the first row of matrix B, an element of the second column of the first row of matrix A with an element of the first column of the second row matrices B, etc.
When multiplying, the order of multiplication is important. A*B is not equal to B*A.

Finding the determinant.

Any square matrix can generate a determinant or a determinant. Writes det. Or | matrix elements |
For matrices of dimension 2 by 2. Determine there is a difference between the product of the elements of the main and the elements of the secondary diagonal.

For matrices with dimensions of 3 by 3 or more. The operation of finding the determinant is more complicated.
Let's introduce the concepts:
Element minor– is the determinant of a matrix obtained from the original matrix by crossing out the row and column of the original matrix in which this element was located.
Algebraic complement element of a matrix is ​​the product of the minor of this element by -1 to the power of the sum of the row and column of the original matrix in which this element was located.
The determinant of any square matrix is ​​equal to the sum of the product of the elements of any row of the matrix by their corresponding algebraic complements.

Matrix inversion

Matrix inversion is the process of finding the inverse of a matrix, the definition of which we gave at the beginning. The inverse matrix is ​​denoted in the same way as the original one with the addition of degree -1.
Find the inverse matrix using the formula.
A -1 = A * T x (1/|A|)
Where A * T is the Transposed Matrix of Algebraic Complements.

We made examples of solving matrices in the form of a video tutorial

:

If you want to figure it out, be sure to watch it.

These are the basic operations for solving matrices. If you have additional questions about how to solve matrices, feel free to write in the comments.

If you still can’t figure it out, try contacting a specialist.

Purpose of the service. Matrix calculator designed for solving matrix expressions, such as 3A-CB 2 or A -1 +B T .

Instructions. For an online solution, you need to specify a matrix expression. At the second stage, it will be necessary to clarify the dimension of the matrices.

Actions on matrices

Valid operations: multiplication (*), addition (+), subtraction (-), inverse matrix A^(-1), exponentiation (A^2, B^3), matrix transposition (A^T).

Valid operations: multiplication (*), addition (+), subtraction (-), inverse matrix A^(-1), exponentiation (A^2, B^3), matrix transposition (A^T).
To perform a list of operations, use a semicolon (;) separator. For example, to perform three operations:
a) 3A+4B
b) AB-VA
c) (A-B) -1
you will need to write it like this: 3*A+4*B;A*B-B*A;(A-B)^(-1)

A matrix is ​​a rectangular numerical table with m rows and n columns, so the matrix can be schematically represented as a rectangle.
Zero matrix (null matrix) is a matrix whose elements are all equal to zero and are denoted by 0.
Identity matrix is called a square matrix of the form


Two matrices A and B are equal, if they are the same size and their corresponding elements are equal.
Singular matrix is a matrix whose determinant is equal to zero (Δ = 0).

Let's define basic operations on matrices.

Matrix addition

Definition . The sum of two matrices of the same size is a matrix of the same dimensions, the elements of which are found according to the formula . Denoted by C = A+B.

Example 6. .
The operation of matrix addition extends to the case of any number of terms. Obviously A+0=A .
Let us emphasize once again that only matrices of the same size can be added; For matrices of different sizes, the addition operation is not defined.

Subtraction of matrices

Definition . The difference B-A of matrices B and A of the same size is a matrix C such that A+ C = B.

Matrix multiplication

Definition . The product of a matrix by a number α is a matrix obtained from A by multiplying all its elements by α, .
Definition . Let two matrices be given and , and the number of columns of A is equal to the number of rows of B. The product of A by B is a matrix whose elements are found according to the formula .
Denoted by C = A·B.
Schematically, the operation of matrix multiplication can be depicted as follows:

and the rule for calculating an element in a product:

Let us emphasize once again that the product A·B makes sense if and only if the number of columns of the first factor is equal to the number of rows of the second, and the product produces a matrix whose number of rows is equal to the number of rows of the first factor, and the number of columns is equal to the number of columns of the second. You can check the result of multiplication using a special online calculator.

Example 7. Given matrices And . Find matrices C = A·B and D = B·A.
Solution. First of all, note that the product A·B exists because the number of columns of A is equal to the number of rows of B.


Note that in the general case A·B≠B·A, i.e. the product of matrices is anticommutative.
Let's find B·A (multiplication is possible).

Example 8. Given a matrix . Find 3A 2 – 2A.
Solution.

.
; .
.
Let us note the following interesting fact.
As you know, the product of two non-zero numbers is not equal to zero. For matrices, a similar circumstance may not occur, that is, the product of non-zero matrices may turn out to be equal to the null matrix.

Linear algebra 1

Matrices 1

Operations on matrices 2

Matrix determinants 6

Inverse matrix 13

Matrix rank 16

Linear independence 21

Systems of linear equations 24

Methods for solving systems of linear equations 27

Inverse matrix method 27

Method for solving systems of linear equations with a square matrix using Cramer's formulas 29

Gaussian method (method of sequential elimination of variables) 31

Linear Algebra Matrices

Matrix size mxn is a rectangular table of numbers containing m rows and n columns. The numbers that make up a matrix are called matrix elements.

Matrices are usually denoted by capital Latin letters, and elements by the same, but lowercase letters with double indexing.

For example, consider a 2 x 3 matrix A:

This matrix has two rows (m= 2) and three columns (n= 3), i.e. it consists of six elements a ij, where i is the row number, j is the column number. In this case, it takes values ​​from 1 to 2, and from one to three (written
). Namely, a 11 = 3; a 12 = 0; a 13 = -1; a 21 = 0; a 22 = 1.5; a 23 = 5.

Matrices A and B of the same size (mxn) are called equal, if they coincide element by element, i.e. a ij =b ij for
, i.e. for any i and j (can be written i, j).

Matrix-row is a matrix consisting of one row, and matrix-column is a matrix consisting of one column.

For example,
is a row matrix, and
.

Square matrix nth order is a matrix, the number of rows is equal to the number of columns and equal to n.

For example,
- square matrix of the second order.

Diagonal matrix elements are elements whose row number is equal to the column number (a ij ,i=j). These elements form main diagonal matrices. In the previous example, the main diagonal is formed by the elements a 11 = 3 and a 22 = 5.

Diagonal matrix is a square matrix in which all non-diagonal elements are zero. For example,
- diagonal matrix of third order. If all diagonal elements are equal to one, then the matrix is ​​called single(usually denoted by the letter E). For example,
is a third-order identity matrix.

The matrix is ​​called null, if all its elements are equal to zero.

The square matrix is ​​called triangular, if all its elements below (or above) the main diagonal are equal to zero. For example,
- triangular matrix of third order.

Operations on matrices

The following operations can be performed on matrices:

1. Multiplying a matrix by a number. The product of matrix A and number is matrix B =A, the elements of which are b ij =a ij for any i and j.

For example, if
, That
.

2. Matrix addition. The sum of two matrices A and B of the same size m x n is the matrix C = A + B, the elements of which are with ij =a ij +b ij fori,j.

For example, if
That

.

Note that through the previous operations one can determine matrix subtraction of the same size: difference A-B = A + (-1)*B.

3. Matrix multiplication. The product of a matrix A of size mxn by a matrix B of size nxp is a matrix C, each element of which with ij is equal to the sum of the products of the elements of the i-th row of matrix A by the corresponding elements of the j-th column of matrix B, i.e.
.

For example, if

, then the size of the product matrix will be 2 x 3, and it will look like:

In this case, matrix A is said to be consistent with matrix B.

Based on the multiplication operation for square matrices, the operation is defined exponentiation. The positive integer power A m (m > 1) of a square matrix A is the product of m matrices equal to A, i.e.

We emphasize that addition (subtraction) and multiplication of matrices are not defined for any two matrices, but only for those that satisfy certain requirements for their dimension. To find the sum or difference of matrices, their size must be the same. To find the product of matrices, the number of columns of the first of them must coincide with the number of rows of the second (such matrices are called agreed upon).

Let's consider some properties of the considered operations, similar to the properties of operations on numbers.

1) Commutative (commutative) law of addition:

A + B = B + A

2) Associative (combinative) law of addition:

(A + B) + C = A + (B + C)

3) Distributive (distributive) law of multiplication relative to addition:

(A + B) = A +B

A (B + C) = AB + AC

(A + B) C = AC + BC

5) Associative (combinative) law of multiplication:

(AB) = (A)B = A(B)

A(BC) = (AB)C

We emphasize that the commutative law of multiplication for matrices is NOT satisfied in the general case, i.e. AB BA. Moreover, the existence of AB does not necessarily imply the existence of BA (the matrices may not be consistent, and then their product is not defined at all, as in the above example of matrix multiplication). But even if both works exist, they are usually different.

In a particular case, the product of any square matrix A and an identity matrix of the same order has a commutative law, and this product is equal to A (multiplication by the identity matrix here is similar to multiplication by one when multiplying numbers):

AE = EA = A

Indeed,

Let us emphasize one more difference between matrix multiplication and number multiplication. A product of numbers can equal zero if and only if at least one of them equals zero. This cannot be said about matrices, i.e. the product of non-zero matrices can equal a zero matrix. For example,

Let us continue our consideration of operations on matrices.

4. Matrix Transpose represents the operation of transition from a matrix A of size mxn to a matrix A T of size nxm, in which the rows and columns are swapped:

%.

Properties of the transpose operation:

1) From the definition it follows that if the matrix is ​​transposed twice, we return to the original matrix: (A T) T = A.

2) The constant factor can be taken out of the transposition sign: (A) ​​T =A T .

3) Transposition is distributive with respect to matrix multiplication and addition: (AB) T =B T A T and (A+B) T =B T +A T .

Share with friends or save for yourself:

Loading...