Mathematica (linear algebra) 4 tasks

ridasak
mathematicachallenge.pdf

5 Total tasks

1. Given the matrix A = (), vector B1 = () , and vector B2 = (). See pictures below.

a) How many solutions does this equation have, A · X = Bk för k = 1, 2? (Solve)

b) Also determine the rank of the coefficient matrix, and for the augmented matrices for k = 1, 2. (​MatrixRank​).

c) Calculate the determinant of the coefficient matrix (​Det​). Is it consistent with the results you have got in (b)?

2​. Create two square matrices X and Y of the same size, such that . Show that the matrix products really are different. 3​. Write in the command and evaluate: Each time you write in Mathematica in the future, the value will be a random integer fromir 0 to 9. Form a matrix by writing in and evaluating:

See the matrix as a total matrix for a system of equations in matrix form with three rows and five columns, the first four correspond to the variables and and the fifth column, y, zx u corresponds the right-side. Rowreduce the matrix. ​(RowReduce). How many solutions does the system of equations have?

4​. a) Please re-enter and re-evaluate: Generate two different bases for R2 by writing and evaluating the following commands:

You get a list of two vectors (the rows if you write the table on matrix form), which should be your base vectors. If you happened to get two linearly dependent vectors, for example {0, 1} and {0, 2}, re-evaluate the command until you no longer have it. Also create a second base, W​. Make sure the vectors are linearly independent of each other:

Also make sure that all four of these vectors are different. If some are equal, re-evaluate. Randomize a vector ​x​: Make sure it is not equal to any of the base vectors. When you have received "good values" on everything, you can write them down and define ​V​, ​W ​and ​x ​again with new commands. This is to make sure your values do not disappear if you happen to re-evaluate commands with ir b) Plot the two base vectors in the base V and the vector x in the same graph. You can use the following command: It will look like something like this:

Note that all objects to be drawn, except coordinate axis, are printed one after the other in a list, surrounded by gulls {}:

Arrows are written in the form: Arrow[{Startpoint, endpoint}].

c)​ Plot the base ​W​ and the vector ​x ​in it’s own graph d) ​Solve equation system in Mathematica to find ​V​-coordinates for ​x ​and ​W​-coordinates for x​. Plot the components for ​x ​in both coordinate systems. It may look something like this for one of the coordinate systems (​Dashed, Line)​:

e) ​Determine a transition matrix from base ​V ​to base ​W ​using ​RowReduce​ on a matrix you yourself set up. Verify your result by taking the product of the base transition matrix with the coordinate-vector for ​x​. f) ​ Also determine the base transition matrix from the base ​W ​to the base ​V​. Verify that it works as it should by seeing that the coordinates of the vector ​x ​are changed as they should. (Inverse) 5.​ Draw the vector (1, −1, 2) in 3D and a plane that goes through the points (1, 0, 0), (1, 1, 1) and (0, 0, 1) by entering and evaluating the following command in Mathematica:

The picture will look something like this. Note that you can rotate the objects in the image to understand the construction better:

Using Mathematica commands, draw up a new image, where you can also see it’s orthogonal projection of the vector on to the plane. It should look something like this:

Note that the distance you are going to draw must be exactly calculated. Report each step in the solution and explain what you are doing. You are welcome to illustrate the intermediate steps with pictures. ​Useful commands​: ​Cross​, ​Norm​. The scalar product is a common matrix multiplication, so use a common point. ​(.)