



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Mathematics 123 Mathematics 123
Typology: Exercises
1 / 7
This page cannot be seen from the preview
Don't miss anything!
In this class you will learn about a new vector space, F n 2. As part of this lab you will need to do modulo 2 arithmetic. The vector space F n 2 is used in applications such as coding data to detect and correct errors in transmission.
You will need to use the m-files that you downloaded into MATLAB during Computer Lab 3. If you do not have the m-files, then follow the instructions on the Computer Lab Class Files page of the MAST10007 website to load the Linear Algebra m-files into MATLAB.
Let F 2 = { 0 , 1 }.
This set containing just two elements, equipped with the operations of addition and multiplication given below, is called the integers modulo 2. Addition and multiplication are defined as follows:
Addition 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 0
Multiplication 0 × 0 = 0 1 × 0 = 0 0 × 1 = 0 1 × 1 = 1
The main difference between F 2 and Z is that 1 + 1 = 0. We call the arithmetic in F 2 , modular or mod 2 arithmetic.
Try entering mod(1+1,2) into MATLAB. What is the result?
With the above definition of addition and multiplication, F 2 is a field , that is, a system of numbers that shares many of the properties as R (the real numbers) and C (the complex numbers).
Exercise 1: Exploring F 2
(a) (1 + 0) × 1 = (b) 1 + 0 × 1 = (c) 1 + 1 + 1 =
(b) If a × b = b × a = 1 then b is called the multiplicative inverse of a. What is the multiplicative inverse of the element 1 in F 2?
Does 0 ∈ F 2 have a multiplicative inverse?
Exercise 2: Row Reducing and Multiplying Matrices using Modulo 2 Arithmetic
In the same way that we have matrices with real entries, we can have matrices with entries in F 2. The usual operations apply, except that addition and multiplication is done using mod 2 arithmetic.
In MATLAB enter the matrices
and x =
(a) Using hand calculations, find A x using mod 2 arithmetic.
A x =
^ =
(b) In the box below, use hand calculations to find the reduced row echelon form for the matrix A using mod 2 arithmetic. Remember to use 1 + 1 = 0 to obtain zeros where needed.
∼
(c) Use the commands mod(A∗x,2) and rrefmod2(A) to check your answers.
mod(A∗x,2)= rrefmod2(A)=
Compare the results with the answers in (a) and (b).
The second command finds the row reduced form of the matrix A using modulo 2 arithmetic. It is a special function created for these classes. The usual command rref will not give the right answer.
Put the vectors u 1 , u 2 , u 3 , u 5 , u 6 in the columns of a matrix called C and u 1 , u 2 , u 4 , u 5 , u 6 in the columns of a matrix called D.
(d) Decide if either of the following sets of vectors spans F^52. Give a brief explanation. You may assume that dim(F^52 ) = 5. Do keep using rrefmod2.
(i) { u 1 , u 2 , u 3 , u 5 , u 6 }
(ii) { u 1 , u 2 , u 4 , u 5 , u 6 }
(e) How can you test for linear dependence and independence of the vectors v 1 ,... , v k ∈ F n 2?
(f) Are the following sets of vectors linearly dependent or linearly independent? Why?
(i) { u 1 , u 2 , u 3 , u 5 , u 6 }
(ii) { u 1 , u 2 , u 4 , u 5 , u 6 }
(g) Are either of the following sets of vectors a basis for F^52? Give a brief explanation.
(i) { u 1 , u 2 , u 3 , u 5 , u 6 }
(ii) { u 1 , u 2 , u 4 , u 5 , u 6 }
(h) Why does dim(F^52 ) = 5?
Exercise 4: Solution Space
This exercise will refer to the matrix M and the vectors v1, v2, v3 and v4 that were loaded when you ran zed2input.
(a) Let M be a m × n matrix and x be a n × 1 coordinate vector. How can you check whether or not x is in the solution space of M?
(b) Let
Using MATLAB decide whether or not the following are in the solution space of M.
(i) v 1 =
(ii) v 2 =
(iii) v 3 =
Remark: In coding theory, this idea is used to detect errors in transmitted messages. The messages sent are coded using vectors in the solution space of a “check matrix” M with entries in F 2. If we receive a vector v with M v 6 = 0 , then we know that a transmission error has occurred. By choosing the matrix M cleverly (e.g. using a Hamming matrix) it is also possible to correct errors and recover the original message.
The following exercise gives an idea of how this works.
Exercise 5: Column Space
This exercise will refer to the matrix M and the vectors w1 and w2 that were loaded when you ran zed2input.
(a) Let M be a m × n matrix and w be a m × 1 coordinate vector. How can you check whether or not w is in the column space of M?
(b) Let M be as in Exercise 4.
Using MATLAB decide whether or not the following are in the column space of M.
(i) w 1 =
(ii) w 2 =