Another way to use `let` bash builtin:
$ let a="3 * (2 + 1)"
$ printf '%s\
' "$a"
9
**Note**
As @Stéphane Chazelas pointed out, in `bash` you should use `((...))` to do arithmetic over `expr` or `let` for legibility.
For portability, use `$((...))` like @Bernhard answer.