Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A system with unknowns has one solution if the rank of is . It has none if the rank of is smaller than the rank of the augmented matrix (the matrix with the column added). It has many solutions if the two ranks are equal and smaller than . The function np.linalg.matrix_rank gives the rank. Classify these three systems.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Plan. Build and for each system, add as a last column with np.c_, and compare the ranks.
Check. System 1: the second equation is twice the first, so the lines are the same: the ranks are 1 and 1, which is less than 2, so there are many solutions. System 2: the left sides are parallel, but and not 7, so the ranks are 1 and 2, and there is no solution. System 3: the lines cross, at and .
Answer: 1 has many solutions, 2 has none, 3 has one: .
Log in to join the discussion.
Loading…