# Setting up a matrix from a linear equation

Llewelyn

## Homework Statement

I need some help with a question on my assignment. It asks to set up a matrix from the linear equations, y=25x+70 and y=35x+40.

## Homework Equations

How do I set this matrix up?

## The Attempt at a Solution

I think that I have to rewrite it as 25x-y=-70 and 35x-y=-40. But then I am stuck. How do you set up the matrix?

Homework Helper
Do you know how to do matrix multiplication? Write out:

##\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e \\ f \end{bmatrix}##

and fill in ##a, b, c, d, e, f##.

Llewelyn
Thank you

jishnu
Thank you
No metion please, you can extend the same method for solving simultaneous equations with more number of variables provided that the number of equations available is same as the number of unknown variables. [emoji4]

jishnu
Do you know how to do matrix multiplication? Write out:

##\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} e \\ f \end{bmatrix}##

and fill in ##a, b, c, d, e, f##.
Make sure that the number of rows of first matrix is equal to the number of columns of the second matrix that are multiplied
Then multiply the corresponding elements of row of matrix_1 with that of elements of columns of matrix_2 and add them together.
Do the same with the available columns of matrix_2
Do the same for all the rows and columns and you will get the matrix with its order as( no. of columns of matrix_1 * no. of rows of matrix_2)
Hope that helps

Mentor
Make sure that the number of rows of first matrix is equal to the number of columns of the second matrix
No, this is incorrect. For matrix multiplication to be defined, the number of columns of the first matrix has to equal the number of rows in the second matrix. For example, if A is 3x2 (i.e., 3 rows and 2 columns) and B is 2x4, the resulting product matrix will be 3x4.

If A were 2x3 (2 rows and 3 columns), and B were 4x2 we have the number of rows of the first matrix (A) being equal to the number of columns of the second matrix (B as you said, but the multiplication is not conformable (not defined).

jishnu
No, this is incorrect. For matrix multiplication to be defined, the number of columns of the first matrix has to equal the number of rows in the second matrix. For example, if A is 3x2 (i.e., 3 rows and 2 columns) and B is 2x4, the resulting product matrix will be 3x4.

If A were 2x3 (2 rows and 3 columns), and B were 4x2 we have the number of rows of the first matrix (A) being equal to the number of columns of the second matrix (B as you said, but the multiplication is not conformable (not defined).
Yeah, this is the correct way which I actually tried to express but got messed up with the row and column and unknowingly was interchanged, I apologize for the same