Solve the following system of equations using matrices

x = -2y + 6
2x + 2y = 16

1 2 6

1 1 8

1st - 2nd

1 2 6
0 1 -2

1st - 2x2nd

1 0 10
0 1 -2

so x = 10
y = -2

(using matrices to solve this simple system is like using a sledge-hammer to crack a peanut.
Substitution would have been so easy)

To solve the given system of equations using matrices, we can represent the system in matrix form.

Let's rewrite the equations in standard form:

x + 2y = 6 [Equation 1]
2x + 2y = 16 [Equation 2]

Now, we can write the coefficients of the variables (x and y) in matrix form, and the constants on the other side of the equation in another matrix. We'll call these matrices A and B, respectively:

A = | 1 2 |
| 2 2 |

B = | 6 |
| 16 |

Now, we need to find the inverse of matrix A, denoted as A^(-1). We can do this by performing elementary row operations. First, we write the augmented matrix [A | I], where I is the identity matrix of the same size as A.

[A | I] = | 1 2 | | 1 0 |
| 2 2 | | 0 1 |

Now, perform elementary row operations to transform the left side of the augmented matrix into the identity matrix. Keep track of the operations done on the right side, which will give you the inverse of matrix A when you're finished.

Row 2 - 2 * Row 1: (This operation will make the element in the lower left corner 0.)
[A | I] = | 1 2 | | 1 0 |
| 2 -2 | |-2 1 |

Row 2 + Row 1: (This operation will make the element in the upper right corner 0.)
[A | I] = | 1 2 | | 1 0 |
| 0 0 | |-1 1 |

-1 * Row 2: (This operation will make the element in the lower left corner 1.)
[A | I] = | 1 2 | | 1 0 |
| 0 0 | | 1 -1 |

2 * Row 2 + Row 1: (This operation will make the element in the upper left corner 0.)
[A | I] = | 1 2 | | 1 -2 |
| 0 0 | | 1 -1 |

Row 1 - 2 * Row 2: (This operation will make the element in the upper right corner 1.)
[A | I] = | 1 2 | | 1 -2 |
| 0 0 | |-1 1 |

Now, we have the identity matrix on the right side of the augmented matrix. The left side represents the inverse of matrix A:

A^(-1) = | 1 -2 |
|-1 1 |

Now, we can solve for x and y by multiplying the inverse of matrix A by matrix B:

| x | | 1 -2 | | 6 |
| y | = |-1 1 | | 16 |

To do this multiplication, we perform the dot product of the row of the first matrix with the column of the second matrix, which gives us the corresponding element in the resulting matrix:

x = (1 * 6) + (-2 * 16) = -26
y = (-1 * 6) + (1 * 16) = 10

Therefore, the solution to the system of equations is x = -26 and y = 10.