Erin takes a total of 5 hours in her boat to travel a distance upriver and return downriver the same distance. If the time traveling upriver is twice the time traveling downriver, how many hours does each trip take?

How do I put this into two equation and use the matrix to solve it?

u = 2d

or
u - 2d = 0
u + d = 5

so the matrix would be

1 -2 0
1 1 5

add -1 times the 1st row to the 2nd row. Then you get

1 -2 0
0 3 5

multiply the 2nd row by 1/3:

1 -2 0
0 1 5/3

The 2nd row tells us that d = 5/3, so u = 10/3

I don't know about the matrix, but it is not necessary to solve the problem.

x = time traveling down river
2x = time traveling up river.

x + 2x = 5

3x = 5

x = 5/3 hour = 1 hour, 40 minutes

2x = ?

I hope this helps.

To solve this problem using a matrix, we can first set up two equations based on the given information.

Let's assume that the time it takes to travel downriver is "x" hours. Therefore, the time it takes to travel upriver would be twice that, which is "2x" hours.

Now, we can set up the two equations as follows:

Equation 1: x + 2x = 5
This equation represents the total time it takes to travel upriver and downriver together, which is 5 hours.

Simplifying Equation 1:
3x = 5
Divide both sides of the equation by 3:
x = 5/3

Equation 2: x represents the time to travel downriver, which is 5/3 hours.

Now, let's set up a matrix to solve these equations:

[A] [X] = [B]

Where:
[A] is the coefficient matrix (containing the coefficients of the variables),
[X] is the variable matrix (containing the variables we want to solve for),
[B] is the constant matrix (containing the constants on the right side of the equations).

In this case, we have:
[A] = [1 2] (the coefficients of x and 2x)
[X] = [x; 2x] (the variables we want to solve for)
[B] = [5; 5/3] (the constants on the right side of the equations)

Now, we can solve this matrix equation to find the values of x and 2x.

To do this, we need to find the inverse of matrix [A] and multiply it by matrix [B].

[A]^-1 * [A] [X] = [A]^-1 * [B]

Simplifying:
[X] = [A]^-1 * [B]

Now, you can calculate the inverse of matrix [A], multiply it by matrix [B], and find the values of x and 2x.