I want to shrink the table below with \scalebox code, but I am getting an error. What could be the reason?
\documentclass{article}
\usepackage{makeidx}
\usepackage{amsmath, amssymb}
\usepackage{amsfonts}
\usepackage{stmaryrd}
\usepackage{tasks}
\usepackage[ddmmyyyy]{datetime}
\usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{tikz, pgfplots}
\usepackage{tkz-euclide}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{xypic}
\begin{document}
\scalebox{0.8}{
\begin{equation}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
$\cdot $ $(modI)$ & $0$ & $1$ & $x$ & $x+1$ & $x^{2}$ & $x^{2}+1$ & $x^{2}+x$
& $x^{2}+x+1$ \ \hline
$0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ \ \hline
$1$ & $0$ & $1$ & $x$ & $x+1$ & $x^{2}$ & $x^{2}+1$ & $x^{2}+x$ & $x^{2}+x+1$
\ \hline
$x$ & $0$ & $x$ & $x^{2}$ & $x^{2}+x$ & $x+1$ & $1$ & $x^{2}+x+1$ & $x^{2}+1$
\ \hline
$x+1$ & $0$ & $x+1$ & $x^{2}+x$ & $x^{2}+1$ & $x^{2}+x+1$ & $x^{2}$ & $1$ & $%
x$ \ \hline
$x^{2}$ & $0$ & $x^{2}$ & $x+1$ & $x^{2}+x+1$ & $x^{2}+x$ & $x$ & $x^{2}+1$
& $1$ \ \hline
$x^{2}+1$ & $0$ & $x^{2}+1$ & $1$ & $x^{2}$ & $x$ & $x^{2}+x+1$ & $x+1$ & $%
x^{2}+x$ \ \hline
$x^{2}+x$ & $0$ & $x^{2}+x$ & $x^{2}+x+1$ & $1$ & $x^{2}+1$ & $x+1$ & $x$ & $%
x^{2}$ \ \hline
$x^{2}+x+1$ & $0$ & $x^{2}+x+1$ & $x^{2}+1$ & $x$ & $1$ & $x^{2}+x$ & $x^{2}$
& $x+1$ \ \hline
\end{tabular}
\end{equation}}
\end{document}
equation*environment will do. – Teddy van Jerry Apr 25 '22 at 11:16tabularshouldn't be inequation, and neithertabularnorequationshould be in\scaleboxsee https://tex.stackexchange.com/questions/332902/my-table-doesnt-fit-what-are-my-options – David Carlisle Apr 25 '22 at 11:55