How do I solve for matrix A in the equation y=mx+c?

  • Thread starter Thread starter uperkurk
  • Start date Start date
  • Tags Tags
    Matrix Vector
Click For Summary
SUMMARY

The discussion revolves around solving for matrix A in the equation y=mx+c using two linear equations: y = -x + 1 and y = 2x + 1. The user is confused about how to express these equations in matrix form and how to find the point of intersection using the inverse of matrix A. The correct matrix representation is established as A = \begin{bmatrix} 1 & 1 \\ -2 & 1 \end{bmatrix} and B = \begin{bmatrix} 1 \\ 1 \end{bmatrix}. The solution involves calculating A^{-1}B to find the intersection point.

PREREQUISITES
  • Understanding of linear equations and their graphical representation.
  • Knowledge of matrix operations, specifically matrix multiplication and finding inverses.
  • Familiarity with the concept of vector representation in linear algebra.
  • Ability to interpret and manipulate mathematical notation, including LaTeX formatting.
NEXT STEPS
  • Learn how to find the inverse of a 2x2 matrix using the formula A^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}.
  • Study how to perform matrix multiplication with vectors to solve linear equations.
  • Explore graphical methods for finding intersections of linear equations.
  • Investigate the application of matrices in solving systems of equations beyond two variables.
USEFUL FOR

Students preparing for exams in algebra and linear algebra, educators teaching matrix operations, and anyone interested in applying matrices to solve linear equations.

uperkurk
Messages
167
Reaction score
0
So I have these two straight line equations:

y = -x + 1, y = 2x + 1 So now I have a single point of intersection of (1y,0x)

But the next part of the question is what confuses me but I've included a picture as it's just easier... would someone please be able to take the time to explain each step in the question?

I can do parts B and C but A is confusing me...
 

Attachments

  • Untitled.png
    Untitled.png
    11.8 KB · Views: 1,010
Physics news on Phys.org
This would probably get a better response in the homework question forums.
 
Diffy said:
This would probably get a better response in the homework question forums.

Thread moved.
 
uperkurk said:
So I have these two straight line equations:

y = -x + 1, y = 2x + 1 So now I have a single point of intersection of (1y,0x)

But the next part of the question is what confuses me but I've included a picture as it's just easier... would someone please be able to take the time to explain each step in the question?

I can do parts B and C but A is confusing me...

Write your two equations like this:
##x+y=1##
##-2x+y=1##
Then put it in the form:$$
\left[ \begin{array}{cc}
? & ?\\ ? & ?
\end{array}\right]
\left[ \begin{array}{c}
x\\y
\end{array}\right] = \left[ \begin{array}{c}
?\\?
\end{array}\right]$$
 
Last edited:
LCKurtz said:
Write your two equations like this:
##x+y=1##
##-2x+y=1##
Then put it in the form:$$
\left[ \begin{array}{cc}
? & ?\\ ? & ?
\end{array}\right]
\left[ \begin{array}{c}
x\\y
\end{array}\right] = \left[ \begin{array}{c}
?\\?
\end{array}\right]$$


\left[ \begin{array}{cc}<br /> 1 &amp; 1\\ -2 &amp; 1<br /> \end{array}\right]<br /> \left[ \begin{array}{c}<br /> x\\y<br /> \end{array}\right] = \left[ \begin{array}{c}<br /> 1\\1<br /> \end{array}\right]

That doesn't even look remotely correct :/
 
Why do you say that? We had kind of assumed that, since you talked about matrices and vectors, you knew what they are and knew how to multiply a matrix and a vector. is that not true?

Can you see that the matrix multiplication gives
\begin{bmatrix}1 &amp; 1 \\-2 &amp; 1\end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}= \begin{bmatrix}x+ y\\ -2x+ y\end{bmatrix}= \begin{bmatrix}1 \\ 1\end{bmatrix}
and that two vectors are equal if and only if their corresponding components are equal.

That is, that matrix-vector equation is exactly the same as saying that x+ y= 1 and -2x+ y= 1.
 
HallsofIvy said:
Why do you say that? We had kind of assumed that, since you talked about matrices and vectors, you knew what they are and knew how to multiply a matrix and a vector. is that not true?

Can you see that the matrix multiplication gives
\begin{bmatrix}1 &amp; 1 \\-2 &amp; 1\end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}= \begin{bmatrix}x+ y\\ -2x+ y\end{bmatrix}= \begin{bmatrix}1 \\ 1\end{bmatrix}
and that two vectors are equal if and only if their corresponding components are equal.

That is, that matrix-vector equation is exactly the same as saying that x+ y= 1 and -2x+ y= 1.


I've multiplied matrices together and I know how to do them but usually I get given them in the form

\begin{bmatrix}1 &amp; 1 \\-2 &amp; 1\end{bmatrix}\begin{bmatrix}2 &amp; 4 \\ 3 &amp; 1\end{bmatrix} For example and then you just multiply the 2 matrices together. But I understand how you explained it thanks.
 
OK I've got to the last stage, I've worked out the matrix inverse which is \begin{bmatrix}0.333 &amp; -0.333 \\0.666 &amp; 0.333\end{bmatrix} and I've verified it using the Identity matrix \begin{bmatrix}1 &amp; 0 \\0 &amp; 1\end{bmatrix} so now I just have to plot the 2 straight lines but I'm kinda lost in my own work now...

Am I plotting the original 2 straight lines using the equations or am I plotting them via the matrix and if so how do I do that?

EDIT: It says using the matrix inverse but I'm not sure how to do it
 
You changed your equations into a matrix form of Ax=B

so if you pre-multiply everything by A-1 you will have

A-1Ax = A-1B

And you worked out what A-1A was. So just work out the right side of the equation.
 
  • #10
uperkurk said:
OK I've got to the last stage, I've worked out the matrix inverse which is \begin{bmatrix}0.333 &amp; -0.333 \\0.666 &amp; 0.333\end{bmatrix} and I've verified it using the Identity matrix \begin{bmatrix}1 &amp; 0 \\0 &amp; 1\end{bmatrix}

Get rid of the decimals. That is just an approximation to the inverse and it won't give you the identity when multiplying. There is absolutely no reason to use decimal approximations instead of exact fractional values in this problem.
 
  • #11
I'm still stuck on this question, I kinda just forgot about it but I really need all the marks I can get, can someone please tell me how to plot the point of intersection of the 2 lines using the inverse matrix?

It is worth 5% so I need to know how to do it.
 
  • #12
uperkurk said:
I'm still stuck on this question, I kinda just forgot about it but I really need all the marks I can get, can someone please tell me how to plot the point of intersection of the 2 lines using the inverse matrix?

It is worth 5% so I need to know how to do it.

Did you read RockFreak's post #9?
 
  • #13
Yes but I don't understand what he means... I have worked out what A^{-}1 is but I don't know how to plot the matrix elements as points on the graph
 
  • #14
uperkurk said:
Yes but I don't understand what he means... I have worked out what A^{-}1 is but I don't know how to plot the matrix elements as points on the graph

There is no need to plot a graph, you just need to calculate A-1B.
 
  • #15
uperkurk said:
Yes but I don't understand what he means... I have worked out what A^{-}1 is but I don't know how to plot the matrix elements as points on the graph

Why don't you just plot the two straight lines the old fashioned way and look at how the intersection point compares with what you get when you solve the matrix equation by multiplying both sides by A-1?
 
  • #16
What is B though?
 
  • #17
Look at the matrices in your post #5. Use them.
 
  • #18
2, -1?
 
  • #19
uperkurk said:
2, -1?

Do you really have to ask? Does that point work in both lines? If it does you are done, otherwise check your arithmetic.
 
  • #20
I'm am losing my temper with this crap now, I don't know what is right, if you don't know what you're doing then you don't know if the answer is right or not... this is not homework, I am revising for a test so please can you just tell me?
 
  • #21
I'm sorry you are angry. You have been told more than enough to help you solve this problem. Perhaps if you can't solve it anyway you don't deserve the 5 marks you would get. I'm going to a movie now. Goodbye.
 
  • #22
I am clearly confused, I did most of the entire question by myself and now you won't help me on the last bit? Maybe if you told me the method I could work out the answer... but you have said multiply the inverse of matrix A with B which I thought was

1
1

you're not giving me direction.
 
Last edited:
  • #23
uperkurk said:
I am clearly confused, I did most of the entire question by myself and now you won't help me on the last bit? Maybe if you told me the method I could work out the answer... but you have said multiply the inverse of matrix A with B which I thought was

1
1

you're not giving me direction.

\left[ \begin{array}{cc}<br /> 1 &amp; 1\\ -2 &amp; 1<br /> \end{array}\right]<br /> \left[ \begin{array}{c}<br /> x\\y<br /> \end{array}\right] = \left[ \begin{array}{c}<br /> 1\\1<br /> \end{array}\right]


That is the matrix equation which you formed in a previous post. This in the form Ax=B

(start from the left and match each letter to a matrix).

The matrix B is on the right side of the equation, from the equation you formed, what matrix is on the right side? Hence what is the matrix B (you already posted what it was).

You calculated A-1.

I just told you how to get the matrix B, can you now calculate what A-1B would be?
 
  • #24
Yes... A-1b would be a-1 multiplied by B which gives 2, -1?

If I am calculating it wrong and 2, -1 is not the correct answer then would it be 0, 36?

I am literally multiplying the left hand side by

1
1

which is the right hand side (b)?
 
  • #25
uperkurk, maybe it's time to take a step back and think about what's going on conceptually. You have a matrix equation Ax = b. What you want to find is the vector x, which describes the coordinates of the point where the two lines intersect.

The way you do this is by trying to "get rid of" that A on the left hand side. You do this by multiplying by A^{-1} on the left of both sides of the equation.

\begin{align*}<br /> Ax &amp;= b \\<br /> A^{-1} A x &amp;= A^{-1} b \\<br /> x &amp;= A^{-1} b \end{align*}

When you have calculated A^{-1} b, you have the point of intersection. You can plot both lines and check visually that this point is in the right neighborhood, and you should take both lines, plug in the coordinates, and check that the answers are the same.

Do you understand the basic process that's going on here?
 
  • #26
This is ****ing ridiculous, look back at my first post, I posted the screenshot of the questions, it did not take me very long at all to figure out what needed to be done, but now I am going to be honest.

I have no idea of what you are talking about... whenever I have done y=mx+c equations I have always had 2 sets of coordinates. When you plot those coordinates the lines cross, the exact point at which they cross is the intersection.

The way you are explaining it is that

x = the intersection
A-1 = the inverse of matrix A
b = the matrix \begin{bmatrix}1 \\ 1\end{bmatrix}

So I am reading that as "the point of intersection of x is found by multiplying the inverse of A with B.

Clearly this is incorrect because I even used a matrix calculator and the answer is most definitely \begin{bmatrix}2 \\ -1\end{bmatrix} or \begin{bmatrix}0 \\ 36\end{bmatrix}

So if you would be so kind as to tell me the answer, explain why the answer is what it is, then I can apply what you have showed me to solve some other problems, you can help some other people and I won't have a headache anymore... I am going to be honest I don't think any amount of typing is going to make me realize what I need to do so...
 
  • #27
You don't seem to be multiplying out A^{-1} b correctly. Show the steps you're using to do this. Matrix multiplication of a matrix and a vector should give you

\begin{bmatrix}<br /> c &amp; d \\<br /> e &amp; f<br /> \end{bmatrix}<br /> \begin{bmatrix}<br /> g \\<br /> h<br /> \end{bmatrix}<br /> =<br /> \begin{bmatrix}<br /> cg + dh \\<br /> eg + fh<br /> \end{bmatrix}<br />
 
  • #28
Muphrid said:
You don't seem to be multiplying out A^{-1} b correctly. Show the steps you're using to do this. Matrix multiplication of a matrix and a vector should give you

\begin{bmatrix}<br /> c &amp; d \\<br /> e &amp; f<br /> \end{bmatrix}<br /> \begin{bmatrix}<br /> g \\<br /> h<br /> \end{bmatrix}<br /> =<br /> \begin{bmatrix}<br /> cg + dh \\<br /> eg + fh<br /> \end{bmatrix}<br />

\begin{bmatrix}<br /> 1 &amp; 1 \\<br /> -2 &amp; 1<br /> \end{bmatrix}<br /> \begin{bmatrix}<br /> 1 \\<br /> 1<br /> \end{bmatrix}<br /> =<br /> \begin{bmatrix}<br /> 1*1 + 1*1 \\<br /> -2*1 + 1*1<br /> \end{bmatrix}<br />

2, -1 I assure you that is the correct answer and I can bet my life that 3 different websites + the windows calculator are not wrong.
 
  • #29
You multiplied Ab, not A^{-1} b. You found A^{-1} already, remember? It was

A^{-1} = \frac{1}{3} \begin{bmatrix} 1 &amp; -1 \\ 2 &amp; 1 \end{bmatrix}
 
  • #30
\begin{bmatrix} \frac{1}{3} & \frac{1}{3} \\ \frac {-2}{3} & \frac{1}{3} \end{bmatrix} multiplied by matrix B \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 26 \\ -10 \end{bmatrix} you can check that on the calculator and online matrix calculation websites too...

Someone fix my tex tags please it's screwed up
 
Last edited:

Similar threads

Replies
19
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 69 ·
3
Replies
69
Views
9K
Replies
4
Views
2K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
15
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K