For some constants $a$ and $b,$ let \[f(x) = \left\{

\begin{array}{cl}
9 - 2x & \text{if } x \le 3, \\
ax + b & \text{if } x > 3.
\end{array}
\right.\]The function $f$ has the property that $f(f(x)) = x$ for all $x.$ What is $a + b?$

Setting $x = 0,$ we get $f(0) = 9.$ Since $9 > 3,$ $f(9) = 9a + b.$ Hence,$$f(f(0)) = f(9) = 9a + b.$$But $f(f(x)) = x$ for all $x,$ so $9a + b = 0.$

Setting $x = 1,$ we get $f(1) = 7.$ Since $7 > 3,$ $f(7) = 7a + b.$ Hence,$$f(f(1)) = f(7) = 7a + b.$$But $f(f(x)) = x$ for all $x,$ so $7a + b = 1.$

Subtracting the equations $9a + b = 0$ and $7a + b = 1,$ we get $2a = -1,$ so $a = -1/2.$ From $9a + b = 0,$ we get $b = -9a = 9/2.$ Hence,$$a + b = -1/2 + (9/2) = \boxed{4}.$$

The answer is actually 4, Burrito you got it way wrong.

Well, we know that $f(f(x)) = x$ for all $x.$ Let's plug in $x = 6$ to find out more about $f.$ When $x = 6,$ we have $f(x)=f(6)=6a+b,$ and $f(f(x))=f(f(6))=f(6a+b).$ But according to the problem, this must equal $x = 6.$ Therefore, we have $f(6a+b) = 6.$

Now, let's plug in $x = 6a+b$ into $f(x)$ to find out more about $f(6a+b)$:
\begin{align*}
f(6a+b) &= \begin{cases}
9-2(6a+b) & \text{if } 6a+b \le 3, \\
a(6a+b)+b & \text{if } 6a+b > 3.
\end{cases}
\end{align*}We're given that $f(6a+b) = 6,$ so we have \[6 = \begin{cases}
9-2(6a+b) & \text{if } 6a+b \le 3, \\
a(6a+b)+b & \text{if } 6a+b > 3.
\end{cases}\]There are two cases to consider: $6a+b \le 3$ and $6a+b > 3.$

Case 1: $6a+b \le 3$
Plugging in $6a+b \le 3$ to $f(6a+b) = 6,$ we get $6 = 9 - 2(6a+b),$ which simplifies to $a+3b = 1.$

Case 2: $6a+b > 3$
Plugging in $6a+b > 3$ to $f(6a+b) = 6,$ we get $6 = a(6a+b)+b,$ which simplifies to $6a^2 + (a + 1)b - 6 = 0.$

Now, we can solve for $a + b$ by considering both cases.

Case 1: $6a + b \le 3$
Since $6a + b \le 3,$ we have $a + 3b = 1.$
We solve the system of equations $\begin{cases} a + 3b = 1 \\ 6a + b \le 3 \end{cases}.$ This gives us $a = \frac{7}{15}$ and $b = \frac{2}{15},$ which means $a + b = \frac{7}{15} + \frac{2}{15} = \frac{9}{15} = \frac{3}{5}.$

Case 2: $6a + b > 3$
Now let's solve the equation $6a^2 + (a + 1)b - 6 = 0.$ After some calculations, we find that this equation factors as $(2a - 1)(3a + 2) = 0.$ This gives us $a = \frac{1}{2}$ or $a = -\frac{2}{3}.$

If $a = \frac{1}{2},$ then we have $6a + b > 3,$ which implies $b > \frac{5}{2}.$
If $a = -\frac{2}{3},$ then we have $6a + b > 3,$ which implies $b > \frac{19}{6}.$

Since $b$ must be greater than these numbers, there is no solution in this case.

So, the only possible value for $a + b$ is $\boxed{\frac{3}{5}}.$

But hey, don't worry if the math gets complex. After all, humor is a constant that can always make you feel better!

To find the value of $a + b,$ we can use the given property $f(f(x)) = x$ for all $x.$

Let's consider the two possible cases separately:

Case 1: $x \le 3$
In this case, $f(x) = 9 - 2x.$ So, we have \[f(f(x)) = f(9 - 2x) = 9 - 2(9 - 2x) = 9 - 18 + 4x = -9 + 4x.\]Therefore, in order for $f(f(x))$ to equal $x,$ we must have $-9 + 4x = x.$ Solving this equation gives $x = 3.$

Case 2: $x > 3$
In this case, $f(x) = ax + b.$ So, we have \[f(f(x)) = f(ax + b) = a(ax + b) + b = a^2 x + ab + b.\]Similarly, we want $a^2 x + ab + b$ to equal $x$ for all $x > 3.$ This implies that $a^2 = 1$ and $ab + b = 0.$ The equation $a^2 = 1$ gives us $a = 1$ or $a = -1.$ If $a = 1,$ then $ab + b = b(1+1) = 2b.$ Since $ab + b = 0,$ we have $2b = 0,$ which implies $b = 0.$ If $a = -1,$ then $ab + b = -b + b = 0.$ Therefore, both $a = 1$ and $b = 0$ satisfy the condition.

Now, we have two possible cases:

Case 1: $x \le 3$
In this case, $x = 3$ and $f(x) = f(3) = 9 - 2(3) = 3.$

Case 2: $x > 3$
In this case, $a = 1$ and $b = 0,$ so $f(x) = x.$

From the two cases, we see that $f(f(x)) = x$ holds for all $x.$

Therefore, $a + b = \boxed{1}.$

the answer is 7/3.

Setting $x = 3,$ we get $f(3) = -1.$ Since $-1 < 2,$ $f(-1) = -a + b.$ Hence, $f(f(3)) = f(-1) = -a + b.$ But $f(f(x)) = x$ for all $x,$ so $-a + b = 3.$

Setting $x = 4,$ we get $f(4) = -4.$ Since $-4 < 2,$ $f(-4) = -4a + b.$ Hence, $f(f(4)) = f(-4) = -4a + b.$ But $f(f(x)) = x$ for all $x,$ so $-4a + b = 4.$

Subtracting the equations $-a + b = 3$ and $-4a + b = 4,$ we get $3a = -1,$ so $a = -1/3.$ From $-a + b = 3,$ we get $b = a + 3 = 8/3.$ Hence,$$a + b = (-1/3) + 8/3 = \boxed{7/3}.$$

if f(f(x)) = x then f(x) is its own inverse.

Note that (3,3) is on the graph.
f^-1(x) = -1/2 x + 9/2 for x <= 3

These two functions are inverses also for x > 3
Looks like a+b = 4

I can't really say the build-up of it because it's not mine, but the answer is 7/3 :D Hope that helps