You are on page 1of 5

1

NAME: DATE:
SECTION: SCORE:

WORKSHEET I ntroduction to Linear Algebra
Instructions: This shall serve as your proof of attendance for this meeting. Write what is asked of you on
the space provided beside each item.

1. The following examples illustrate a vector:
| |
(
(
(
= =
(
(

5
6
1 2 3 4
7
8
A B

Give a possible definition of a vector:



2. The following illustrate a matrix:
(
(
(
= =
(
(

(

1 2 3 4
a d g
a b c d
C D b e h
c f i


Give a possible definition of a matrix:



3. Consider the two vectors X and Y. Vector addition is done below.

( ( ( ( (
( ( ( ( (
= = + = = =
( ( ( ( (
( ( ( ( (


1 5 6 4 4
2 6 8 4 4
3 7 10 4 4
X Y X Y X Y Y X

Generalize the addition and subtraction process for vectors:



Is it possible to add or subtract a row vector to a column vector, and vice versa? Why or why not?


4. There are two types of multiplication operations for vectors/matrices: scalar and matrix
multiplication. For scalar multiplication: For the given matrix A, scalar multiplication results when
the scalar k is multiplied to every element of A.

(
(

(
=
(

(

1 2 9 10
3 4 11 12
5 6 13 14
7 8 15 16
A

Give the result when 3 is multiplied to matrix A:





2

5. For matrix multiplication: If X is an m n and Y is an n p matrix, then the product of X and Y, XY = Z
is an n p matrix. The elements of the ith row and the jth column of Z will be:

=
=

1
n
ij ik kj
k
z a b

( (
= =
( (


1 2 2 4

3 4 3 1
X Y


What will be the size of the product matrix when a 3-element row vector is multiplied by a 3-element
column vector?

What will be the size of the product matrix when a 3 4 matrix is multiplied by a 5 2 matrix?

6. On matrix transposition: For a given matrix A with an element in the ith row and jth column, the
transpose of A will have the same element in the jth row and the ith column.

| |
(
(
= =
(
(

1 5
2 6 5 6 7 8
3
e
A m B
a d


What will be the transpose of the given matrix A and vector B?






7. On matrix exponentiation: Matrix exponentiation is matrix multiplication carried out using the same
matrix n number of times, where n is exponent of the matrix.

Using matrix A given in question 9, what will be the result of A
2
?





Using vector B in question 9, is it possible to determine B
2
? Why or why not? Show the product matrix,
if possible.






8. If X is a matrix to be multiplied to vector B in question 9,

What must this matrix be in order to obtain a row vector containing the square of the elements of
vector B, i.e. : | |
= 25 36 49 64 BX ?





Give the result of XY :





3

MODULE 1 I ntroduction to Linear Algebra
OBJECTIVE

At the end of this module, the student should be able to:
1. Define vectors and matrices.
2. Perform different elementary operations on vector and matrices.

MATRICES AND VECTORS

We start our discussion on the use of MATLAB with an introduction on the concept of vectors and
matrices. A matrix is a rectangular array of numbers or functions. In general, we call the contents of a
matrix its elements. An example of a matrix is shown below:

(
(
(
=
(
(

11 12 1
21 22 2
1 2
...
...
...
n
n
m m mn
a a a
a a a
A
a a a


An m n matrix simply means that it has m number of rows and n number of columns. The size of a
matrix is often referred to using this notation, e.g., a 34 (read as 3 by 4) matrix has a size of 3 rows and
4 columns. To identify elements in a matrix, we use the indices i (to refer to its row assignment) and j (to
refer to its column assignment). For example, element a
12
is the element of matrix A found in the first
row (i =1) and second column (j=2). Thus, a
mn
simply refers to the element found in the mth row and nth
column.

In this course, you will encounter several types of matrices when programming. The following list
summarizes the characteristics of each special type:

1. Row Matrix or Row Vector a matrix consisting of only one row.

| |
=
1 2
...
n
A a a a

2. Column Matrix or Column Vector a matrix consisting only of one column.

(
(
(
=
(
(

1
2
...
m
b
b
B
b


3. Square Matrix matrix in which the number of rows equals the number of columns. The
principal/main diagonal contains the elements where the subscripts are equal (i=j). The trace of
a square matrix is the sum of the elements of its principal diagonal.



4

4. Upper Triangular Matrix a square matrix in which all elements below the principal diagonal are
zero. Matrix U is an example.

(
(
=
(
(

11 12 13
22 23
33
0
0 0
u u u
U u u
u


5. Lower Triangular Matrix a square matrix in which all elements above the principal diagonal are
zero. Matrix L is an example.

(
(
=
(
(

11
21 22
31 32 33
0 0
0
l
L l l
l l l


6. Diagonal Matrix a square matrix in which the only non-zero elements are the elements on the
principal diagonal. Matrix D is an example.

(
(
=
(
(

11
22
33
0 0
0 0
0 0
d
D d
d


7. Scalar Matrix a diagonal matrix whose diagonal elements are all equal. In the example below,
matrix S is a diagonal matrix whose element is s.

(
(
=
(
(

0 0
0 0
0 0
s
S s
s


8. Identity Matrix a diagonal matrix whose diagonal elements are equal to 1. Matrix I
S
is an
example.

(
(
=
(
(

1 0 0
0 1 0
0 0 1
S
I

9. Null Matrix represented by O; a matrix in which all elements are zero.

ELEMENTARY OPERATIONS ON MATRICES

Arithmetic operations on matrices and vectors can also be done. In matrix addition (and subtraction),
the corresponding elements of two matrices (which must be of equal sizes) are just algebraically added
(or subtracted). For example, for matrices A and B:

( (
= =
( (


1 2 4 3 2 2
3 2 1 4 1 1
A B

5

The resulting matrix when B is added to A is:

+ + ( (
+ = = =
( (
+ +

1 3 2 2 4 2 4 0 2
3 4 2 1 1 1 1 1 2
A B C

For scalar multiplication, each element in the matrix is multiplied with a scalar quantity (a matrix with
only one element). Note that multiplication with a vector quantity will result in a different product
matrix, as vectors can have more than one element. For example, when matrix A in the previous example
is multiplied with -3, the resulting matrix will be:

( (
= =
( (


1 2 4 3 6 12
3 3
3 2 1 9 6 3
A

If A is a 23 matrix and C (shown below) is a 3x2 matrix:

(
(
(
= =
(
(

(

u v
a b c
A C w x
d e f
y z


Then the result of the matrix multiplication of A with C is given as:

+ + + + (
=
(
+ + + +

au bw cy av bx cz
A C
du ew fy dv ex fz


The elements of this product matrix can be obtained using a summation rule. As an exercise, you can
verify the elements of the product matrix AC by making use of the following equation:

=
=

1
n
ij ik kj
k
x a c

Any element of product matrix AC (x
ij
) can be obtained by summing up from k=1 until n (where n is the
number of columns, and k is another index) the product of a
ik
and c
kj
(elements of matrices A and C).

IMPORTANT: Matrix multiplication will only work when an mn matrix is multiplied by an np matrix.
The resulting product matrix will have a size of m rows and p columns.

Matrix transposition occurs when the subscript for a row (i) is written as a subscript for a column, and the
subscript for a column (j) is written for a row. The transpose of matrix A is denoted as A
T
:
(
(
(
= =
(
(

(

(
(
(
= =
(
(

(

T T
u v
a b c
A B w x
d e f
y z
a d
u w y
A b e B
v x z
c f

You might also like