Description
Lab Assignment #2: Linear Algebra
Guideline: Submit to Camino a pdf report with answers to the following questions. Also submit all the source code needed to generate these answers as a separate zip file to Camino.
Note: matrix and vector operations can be found in lecture slides COEN140_02_LinearAlgebraReview.pdf.
1. Create a 2ร5 matrix ๐ with elements as random float numbers from 0 to 1. Print the rank of ๐.
Let ๐ = ๐๐๐, find the shape and rank of ๐
Let ๐ = ๐๐๐, find the shape and rank of ๐
2. Create a 3ร5 matrix ๐ with elements as random integers from 0 to 10, and find the dimension (shape) of ๐ = ๐๐๐ by coding;
Create a 3ร1 column vector ๐ฐ with elements as random integers from 0 to 10, and find the dimension of ๐๐ฐ by coding;
Find the dimension of ๐ฐ๐๐ by coding;
Find the dimension of ๐ฐ๐๐๐ฐ by coding.
Find a way (by coding) to verify that ๐๐๐ is symmetric.
Calculate ๐โ1. Print ๐โ1๐ and ๐๐โ1.
3. Create a 5ร1 column vector ๐ฑ with elements as random float numbers from 0 to 1. Calculate ๐ฑ๐ฑ๐ by coding. What do you think is the rank of ๐ฑ๐ฑ๐?
4. Create a 5ร5 identity matrix ๐ and print it.
Reviews
There are no reviews yet.