Show that the following sets form subspaces

The set of all (x, y) in such that x = y
The set of all (x, y) in such that x – y = 0
The set of all (x, y, z) in such that x + y = 3z
The set of all (x, y, z) in such that x = y and z = 2y

To show that a set is a subspace, we need to verify two conditions:

1. The set is closed under addition.
2. The set is closed under scalar multiplication.

Let's go through each set one by one:

1. The set of all (x, y) such that x = y:
- Addition: Suppose (x1, y1) and (x2, y2) are in the set. Then x1 = y1 and x2 = y2.
Taking the sum, we have x1 + x2 = y1 + y2. Thus, (x1 + x2, y1 + y2) is also in the set.
- Scalar multiplication: Suppose (x, y) is in the set, and c is a scalar. Then x = y.
Multiplying both sides by c, we have cx = cy. Thus, (cx, cy) is also in the set.
Therefore, the set of all (x, y) such that x = y forms a subspace.

2. The set of all (x, y) such that x – y = 0:
- Addition: Suppose (x1, y1) and (x2, y2) are in the set. Then x1 - y1 = 0 and x2 - y2 = 0.
Adding the equations, we have (x1 + x2) - (y1 + y2) = 0, which means (x1 + x2, y1 + y2) is also in the set.
- Scalar multiplication: Suppose (x, y) is in the set, and c is a scalar. Then x - y = 0.
Multiplying both sides by c, we have cx - cy = 0. Thus, (cx, cy) is also in the set.
Therefore, the set of all (x, y) such that x – y = 0 forms a subspace.

3. The set of all (x, y, z) such that x + y = 3z:
- Addition: Suppose (x1, y1, z1) and (x2, y2, z2) are in the set. Then x1 + y1 = 3z1 and x2 + y2 = 3z2.
Adding the equations, we have (x1 + x2) + (y1 + y2) = 3(z1 + z2), which means (x1 + x2, y1 + y2, z1 + z2) is also in the set.
- Scalar multiplication: Suppose (x, y, z) is in the set, and c is a scalar. Then x + y = 3z.
Multiplying both sides by c, we have cx + cy = 3cz. Thus, (cx, cy, cz) is also in the set.
Therefore, the set of all (x, y, z) such that x + y = 3z forms a subspace.

4. The set of all (x, y, z) such that x = y and z = 2y:
- Addition: Suppose (x1, y1, z1) and (x2, y2, z2) are in the set. Then x1 = y1 and z1 = 2y1, and x2 = y2 and z2 = 2y2.
Adding the equations, we have (x1 + x2) = (y1 + y2), and (z1 + z2) = 2(y1 + y2).
Thus, (x1 + x2, y1 + y2, z1 + z2) is also in the set.
- Scalar multiplication: Suppose (x, y, z) is in the set, and c is a scalar. Then x = y and z = 2y.
Multiplying both sides of each equation by c, we have cx = cy and cz = 2cy.
Thus, (cx, cy, cz) is also in the set.
Therefore, the set of all (x, y, z) such that x = y and z = 2y forms a subspace.

To show that the given sets form subspaces, we need to verify two conditions: closure under addition and closure under scalar multiplication.

1. The set of all (x, y) in R^2 such that x = y:

Let (a, a) and (b, b) be two vectors in the set. Their sum is (a + b, a + b). Since both x and y are equal in these vectors, the sum also satisfies the condition x = y. Thus, closure under addition is guaranteed.
Now, let k be a scalar and consider the vector (ka, ka). The component x and y are still equal, so closure under scalar multiplication is satisfied.
Hence, the set of all (x, y) in R^2 such that x = y forms a subspace of R^2.

2. The set of all (x, y) in R^2 such that x – y = 0:

Let (a, a) and (b, b) be two vectors in the set. Their sum is (a + b, a + b), and the difference between the components is (a + b) - (a + b) = 0. So, closure under addition is satisfied.
Now, let k be a scalar and consider the vector (ka, ka). (ka) - (ka) = 0, so closure under scalar multiplication is guaranteed.
Thus, the set of all (x, y) in R^2 such that x – y = 0 forms a subspace of R^2.

3. The set of all (x, y, z) in R^3 such that x + y = 3z:

Let (a, b, c) and (d, e, f) be two vectors in the set. Their sum is (a + d, b + e, c + f), and the condition (a + d) + (b + e) = 3(c + f) holds. Therefore, closure under addition is satisfied.
Now, let k be a scalar and consider the vector (ka, kb, kc). (ka) + (kb) = 3(kc), which simplifies to k(a + b) = 3k(c). Since k is a scalar, we can divide both sides of the equation by k. This yields (a + b) = 3c, showing closure under scalar multiplication.
Hence, the set of all (x, y, z) in R^3 such that x + y = 3z forms a subspace of R^3.

4. The set of all (x, y, z) in R^3 such that x = y and z = 2y:

Let (a, a, 2a) and (b, b, 2b) be two vectors in the set. Their sum is (a + b, a + b, 2a + 2b), and we can see that (a + b) = (a + b) and (2a + 2b) = 2(a + b). Thus, closure under addition is satisfied.
Now, let k be a scalar and consider the vector (ka, ka, 2ka). We have (ka) = (ka) and (2ka) = 2(ka), fulfilling the condition x = y and z = 2y after scalar multiplication. Therefore, closure under scalar multiplication is guaranteed.
Therefore, the set of all (x, y, z) in R^3 such that x = y and z = 2y forms a subspace of R^3.