We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The determinant of the left hand side of the system reduces to
D = 2a² - 2a - 4. For the system to have no solution, D = 0, solving the quadratic equation yields:
if__name__=="__main__":# Compute the 3 x 3 determinant of the system# Determinant = 0, when system of equations has *NO SOLUTIONS*det=lambdaa:a*(2*a-1)-1*(a-2)+2*(1-4)# Hold all possible alpha valueslst=list()# Loop through several values that make det = 0foriinrange(-100,101):ifdet(i)==0:lst+=[i]# Return the minimum valueprint(min(lst))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Join us
Create a HackerRank account
Be part of a 26 million-strong community of developers
Please signup or login in order to view this challenge
Linear Algebra Foundations #8 - Systems of Equations
You are viewing a single comment's thread. Return to all comments →
The determinant of the left hand side of the system reduces to D = 2a² - 2a - 4. For the system to have no solution, D = 0, solving the quadratic equation yields:
a² - a - 2 = 0;
(a + 1)(a - 2) = 0;
a = -1, a = 2
The least possible value of a is -1.
Python3: