The roots of algebra can be traced back to ancient Mesopotamia, where Babylonian mathematicians developed early forms of solving linear and quadratic equations. They used geometric shapes to represent unknowns and solved problems related to commerce and land measurement.