A ^ X and log (a, x) are inverse functions. Why? Who can answer

A ^ X and log (a, x) are inverse functions. Why? Who can answer

Let's not look at the specific operation of the function first, but the corresponding relationship according to some rules. There is a function y = 3 ^ x when x = 1, y = 3 when x = 2, y = 9. Then define log (3, y) when y = 3, x = 1 when y = 9, x = 2. Note that here, we only define it. It's a man-made rule