1


vectors and matrices: a vector is a sequence enclosed in square brackets, which we can create with the keys [, ], with the icon , separating its elements with commas, or using the icon . If the square brackets are created with the icons, the size of the square brackets will adjust to the size of the contents. The same result can be obtained with keystroke combinations [, ] Ctrl + [ and Ctrl + ]

A matrix is a vector formed from vectors of the same size. Each of these vectors corresponds to a row of the matrix.

The icons and explained in detail in the chapter Menus, icons,..., enable easy creation of vectors and matrices.

To learn more about how the program works with vectors and matrices, see chapter Linear algebra.



  Manipulating lists, vectors and matrices

Subscripts are created using the icon and they are the principal tool for manipulating vectors and matrices; in particular, to extract and change their elements.

Given a list or a vector v and a whole number i, vi is the ith component of v, as long as 1ilengthv.

vi 1<=i<=length(v)

As every matrix is a vector of vectors, if A is a matrix, then Ai is its ith row and Ai,j(, Aij) thejth element in the ith row (assuming that it exists).

Ai Ai,j(Ai,j or Aij)Aij

An alternative but equivalent notation is to use the period, such that the expression An is the same as A.n, and Ai,j is the same as A.i.. Along the same lines, if v is a vector, v.i is the ith component of v.

An A.n Ai,j A.i.j v.i

To change the value of a component in a list, vector or matrix, the syntax explained in the previous subsection can be used, and it can be assigned a new value with the operator = .





mathsformore.com powered by WIRIS

©2003 maths for more sl. All rights reserved. Legal notice