library(pracma)
The following augmented matrices are in row echelon form. Decide whether the set of solutions is a point, line, plane, or the empty set in 3 dimensional space. Briefly justify your answer.
No solution: empty set.
The solution is a plane. The 2 rows of 0000 indicate 2 degrees of freedom beyond a point solution. 2 free variables equal 2 dimensions equal a plane.
No solution: empty set.
The set of solutions for the following matrix is a line. The 0000 row indicates that there is one free variable. This free variable results in a 1D solution of a line.
In each case below, an elementary row operation turns the matrix \(A\) into the matrix \(B\). For each of them,
Give your answers in the form: “scale \(R_2\) by 3” or “swap \(R_1\) and \(R_4\)” or “replace \(R_3\) with \(R_3 + \frac{1}{5} R_1\).”
“replace \(R_4\) with \(-3R_2+R_4\)”
“swap \(R_1\) and \(R_2\)”
“scale \(R_3\) by \(1/2\)”
Below you find a section of one-way streets in downtown St Paul, where the arrows indicate traffic direction. The traffic control center has installed electronic sensors that count the numbers of vehicles passing through the 6 streets that lead into and out of this area. Assume that the total flow that enters each intersection equals the the total flow that leaves each intersection (we will ignore parking and staying).
At intersection A: Traffic in \(= x_4 + 610\) and traffic out \(= 450 + x_1\). Thus, \(x_4 + 610 = x_1 + 450\) => \(x_1 - x_4 = 160\)
At intersection B: Traffic in \(= x_1 + 400\) and traffic out = \(x_2 + 640\). Thus \(x_1 - x_2 = 240\)
At intersection C: Traffic in \(= x_3\) and traffic out \(= 520 + x_4\). Thus, \(x_3 - x_4 = 520\)
At intersection D: Traffic in \(= x_2 + 600\) and traffic out \(= x_3\). Thus, \(x_3 - x_2 = 600\)
System of equations: 1.) \(x_1 - x_4 = 160\) 2.) \(x_1 - x_2 = 240\) 3.) \(x_3 - x_4 = 520\) 4.) \(x_3 - x_2 = 600\)
M=rbind(c(1,0,0,-1,160),c(1,-1,0,0,240),c(0,0,1,-1,520),c(0,-1,1,0,600))
rref(M)
## [,1] [,2] [,3] [,4] [,5]
## [1,] 1 0 0 -1 160
## [2,] 0 1 0 -1 -80
## [3,] 0 0 1 -1 520
## [4,] 0 0 0 0 0
Smooth traffic flow can result from more than one route taken by a car. If there was only one set of solutions for traffic flow, traffic could easily jam. If we consider a car in the position of x_3, it can either continue straight or turn right. If turning right, the car could again go straight or take another right. In this way, there are infinite solutions. Finally, the driver of a car has an option to drive in a circle as many times as they would like. In this way, there are infinite solutions as well.
As many people have experienced, there are certain times of day where traffic is much lighter (say, 3 in the morning), and there are times when traffic is much heavier (like rush hour when people get out of office jobs). To overcome this issue, traffic flow could be measured and determined for various parts of the day and split up into relevant windows.
Additionally, one of the solutions to this matrix is -80. You cannot have negative cars. Furthermore, with the free variable, someone could plug in a negative or fraction of a number to elicit a solution. However, negative and fraction cars do not exist. To fix this problem, input and output values would have to be positive integers in order to be defined as “real” solutions.
This question will explore interpolating polynomials. An interpolating polynomial of degree \(n\), denoted \[ p(t)=a_0+a_1t+a_2t^2+a_3t^3+\ldots +a_n t^n\] is constructed to intersect several given points. We do this all the time when we find a line that intersects two points, now we just want to intersect more than two.
a.) Suppose we consider two points, \((1,1)\) and \((2,4)\). Find \(a_0\) and \(a_1\) by constructing and solving a \(2\times 3\) augmented matrix. How many lines intersect both points, and how do you know?
\(p(1) = 1\) and \(p(2) = 4\) \(a_0+a_1=1\) \(a_0+2a_1=4\)
M=rbind(c(1,1,1),c(1,2,4))
rref(M)
## [,1] [,2] [,3]
## [1,] 1 0 -2
## [2,] 0 1 3
1 line intersects each of the points as there is a unique solution.
b.) We could also fit these two points to a parabola (includes the \(t^2\) term). Write an augmented matrix that represents this and solve it. How many parabolas intersect both points, and how do you know?
M=rbind(c(1,1,1,1),c(1,2,4,4))
rref(M)
## [,1] [,2] [,3] [,4]
## [1,] 1 0 -2 -2
## [2,] 0 1 3 3
c.) Suppose we have any 25 points we would like to fit. What is the smallest degree polynomial would we need? Explain your reasoning by discussing an augmented matrix.
In the ‘least ideal’ case of 25 points, no three points in a row would fit so that a linear line could be fitted to them. As a result, a t^2 term would be required to fit three points, a t^3 for four points, or a t^24 for 25 points. The interpolating polynomial would have to have a highest degree of n=24. In the augmented matrix, there would be 25 rows, 1 for each point. Additionally, there would have to be 26 columns: 1 column for each of the \(a_0\) through \(a_{24}\) terms as well as 1 column for the augment.
Suppose \(A\) is a \(4\times 4\) matrix and \(\mathbf{b}\) is a vector in \(\mathbb{R}^4\) with the property that \(A\mathbf{x}=\mathbf{b}\) has a unique solution. Explain why the columns of \(A\) must span \(\mathbb{R}^4\).
For a 4x4 matrix, the following must be all true or all false. 1. for each b in R^4, the equation Ax=b must have a solution. 2. Each b in R^4 is a linear combination of columns A. 3. Columns of A span R^4. 4. A has a pivot position in every row.
If Ax=b has a unique solution, (4.) will be true. This is because in RREF, if there is a unique solution, each row has a pivot. Additionally, (1.) and (2.) are proved to be true by the statement given in this question. Thus, since these statements must be all true or all false, (3.) must be true.
We can also use our logic. Using the definition of span: the collection of all possible linear combinations of a given set of vectors, we can say that if a vector (b) is included in the span of the given vectors (A), then it is a solution. Thus, if we are told that Ax=b has a unique solution, we know that solution (b) is in the span of A.