Theme 8. Vector operations in Maple

Site: Навчально-інформаційний портал НУБіП України
Course: Computers and Computer Technology (БЦІ). P2 ☑️
Book: Theme 8. Vector operations in Maple
Printed by: Гість-користувач
Date: Tuesday, 13 May 2025, 3:08 AM

1. Linear algebra

Linear algebra is a part of the algebra that studies the theory of linear equations, the theory of determinants, the theory of matrices, the theory of vector spaces and linear transformations, the theory of forms (quadratic), and the tensor calculus (partially).

Historically, the first question of linear algebra was to find a solution of linear equations. Linear equations as the equation of lines and planes became the subject of study after the invention of the method of Cochran Descartes and Fermat (about 1636). Hamilton in 1833 represented complex numbers in the form of a two-dimensional real vector space; he belongs to the authorship of the term "vector". The theory of matrices was developed in the works of Kelly (1850). Systems of linear equations first appeared in the works of Lagerra (1867). Grassman studied the theory of systems of algebra in 1844 and 1862.

Vector (or linear space) is called the set of vectors, which include vectors with any possible component value. In order for a plurality of vectors to be vector space on it must act a number of axioms: commutativity, associativity, distributivity, addition and multiplication on the scalar, the existence of the zero and the opposite element.

The number n, which determines the number of vector elements is called the dimension of the vector space. Linear algebra explores vector spaces of finite dimension. You can specify a map between two vector spaces . Linear algebra explores mappings, which are called linear . Linear mapping links between two vector spaces, constructed over one and the same field. The main objects of the linear algebra are the following abstract concepts, such as arrays, vectors, and matrices.

2. Vector operations

In the understanding of the linear vector algebra is an indexed set of numbers or other mathematical objects.   Often the vector is written in the form of a column

Vector AB (or a ) has a beginning - the point A and end - point in . The vector is a directed straight line. The straight line on which the vector is based is called the action line of the vector. Two vectors are collinear if they lie on one straight line or in parallel lines. If the vectors are collinear, then their corresponding coordinates are proportional. Level vectors have the same coordinates. Zero has zero coordinates - its beginning coincides with the end.

Elements of vectors are indexed by variables - the location of each element of a vector is determined by its index. Calling the i-th element of vector a by writing a [i], assigning a new value x i to the element of vector a has the form a [i] = x.

Transactions over vectors

The length of the vector or the module of the vector is determined by the formula:

The sum of two vectors is a vector constructed on a diagonal of a parallelogram passing through a common beginning having the same beginning and length. For the two vectors a ( a1, a 2) and b ( b 1, b 2) in the plane we have: ( a1 + b1, a2 + b2) . Similarly, the difference between vectors a ( a1, a 2) and b ( b 1, b 2) is a vector with coordinates ( a1-b1, a2-b2) .

The product of the vector a ( a1, a 2) by the number k is the vector c ( k a1, k a 2) .

The orth of the vector a is the vector of the unit length, which has the same direction as the vector a . Ort is determined by dividing the components of the vector into its length: e = a / | a | .

A vector product of two vectors a × b is a vector that:

  • perpendicular to the plane of the vectors a and b ;
  • its module is equal to the module of vectors a and b on the sinus of the angle between them;
  • the vector product of two collinear vectors is zero.

The vector product is a determinant of the third order, in the first line of which the basic vectors of the Cartesian coordinate system are inserted, in the second the coordinates of the first vector are the conjugate, in the third, the coordinates of the second vector, the conjugate.

Example 1: A Dana 1 (7,0,3), and 2 (3,0,1), and 3 (3,0,5). Find the area of ​​the triangle A 1 A 2 A 3 .

Decision. We find the coordinates of the vectors A 1 A 2 (-4,0, -2) and A 1 A 3 (-4,0,2).

The area of ​​the triangle is equal to half the square of the parallelogram:

or through a scalar product: or the same

The products of three vectors

The simplest product of the three vectors is the multiplication of the scalar product of the two vectors ab on the third vector c : ( ab ) c .

The vector-vector product of three vectors is the vector: r = ( a × b ) × c . The vector r is perpendicular to the vector a × b and to the vector c .

A vector-scalar or mixed product of three vectors is called the value obtained from the scalar multiplication of the vector product (a × b) of the two vectors on the third vector c : (a × b) • c .

The mixed product is a scalar. Marking = S a × b , we obtain ( a × b ) • c = S • c = S c cos (S, c ).

We construct a , b , c parallelespectors, which are based on parallelograms with sides a , b . The area of ​​this basis is as follows: S = | a × b |. Denote by H the height lowered on this basis. Then the volume V of the parallelepiped will be determined by the known formula V = S • H

The vector - scalar product of the three vectors is zero, when the vectors are compliant - the volume of the parallelepiped constructed on the coplanar vectors is zero. Also, the vector - scalar product is zero if it has two identical factors: ( a , a , b ) = 0.

3. Package of linear algebra linalg

In Maple, you can perform linear algebra transformations using two packages:

  • linalg - for performing abstract calculations over matrices and vectors;
  • LinearAlgebra - work with numerical matrices.

The linalg package uses vectors and matrices based on an array array . The number of functions in the linalg package contains more than one hundred names.

In MAPLE, the vector product of two vectors and the construction of a whole vectors packet is carried out using the following programs:

> with (linalg);

                   Examples

a: = vector ([6,2,1]); b: = vector ([0, -1,2]);

[6, 2, 1]

[0, -1, 2]

c: = matadd (a, b, 2, -1);

[6, 1, 3]

norm (c, 2);

13

Construct vector image vector images

restart: with (linalg): with (plot):

a: = vector ([-5, -7, -4]): b: = vector ([-9, -10, -2]): c: crossprod (a, b): arrow ([a, b , c]):

The mixed product of three vectors in MAPLE can be executed:

> with (linalg):

a: = vector ([- 5, -7, -4]): b: = vector ([-9, -10, -2]): c: = vector ([-2, -11.3]):

dotprod (crossprod (a, b), c);

4. Self-checking

  1. What is a linear algebra ?
  2. Name the main operations with vectors.
  3. Which libraries of linear algebra has a Maple system?
Accessibility

Font Face Font Face

Font Size Font Size

1

Text Colour Text Colour

Background Colour Background Colour

Font Kerning Font Kerning

Image Visibility Image Visibility

Letter Spacing Letter Spacing

0

Line Height Line Height

1.2

Link Highlight Link Highlight