### Instruction: Let $n$ be a  positive integer and $a$ be an integer such that $a$ is its own inverse modulo $n$. What is the remainder when $a^2$ is divided by $n$?### Response: I know that $a$ is its own inverse modulo $n$ means that $a \cdot a \equiv 1 \pmod{n}$, or equivalently, $a^2 - 1$ is divisible by $n$.
So, I want to find the remainder of $a^2$ when divided by $n$, which is the same as the remainder of $a^2 - 1 + 1$ when divided by $n$.
Since $a^2 - 1$ is divisible by $n$, it has a remainder of $0$ when divided by $n$.
Therefore, the remainder of $a^2 - 1 + 1$ when divided by $n$ is just the remainder of $1$ when divided by $n$.
The remainder of $1$ when divided by any positive integer $n$ is always $1$, unless $n = 1$, in which case the remainder is $0$.