xxxxxxxxxx
def determinant_3x3(matrix):
a, b, c = matrix[0]
d, e, f = matrix[1]
g, h, i = matrix[2]
determinant = a * (e*i - f*h) - b * (d*i - f*g) + c * (d*h - e*g)
return determinant
# Example matrix
matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
determinant = determinant_3x3(matrix)
print("Determinant of the matrix is:", determinant)