[Tex/LaTex] Leave empty cells in a table

tables

How can I leave some empty cells in a table?

\documentclass[a4paper,english,12pt,oneside]{book}

\usepackage[left=20mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{mathtools}

\usepackage{graphics}
\usepackage{tabularx}
\usepackage{geometry}
\usepackage{multirow}
\usepackage{slashbox}


\begin{document}

\begin{tabular}{|c|c|c|c|}
\hline
\backslashbox{x}{y}  & Scalar & Vector & Matrix\\
\hline
Scalar & $\frac{dy}{dx}$ & $\frac{dy}{dx} = \left[\frac{\partial y_i}{\partial x} \right]$ & $\frac{dY}{dx} = \frac{\partial y_{ij}}{\partial x}$ \\
\hline
Vector & $\frac{dy}{dx} = \left[\frac{\partial y}{\partial x_j} \right]$ & $\frac{dy}{dx} = \left[\frac{\partial y_i}{\partial x_j} \right]$\\
\hline
Matrix & $\frac{dy}{dX} = \left[\frac{\partial y}{\partial x_{ji}} \right]$\\
\hline
\end{tabular}

\end{document}

Best Answer

If you add column delimiters (&) with just a white space in-between, you get empty cells.

In your example, the last two rows could be modified like this:

\hline
Vector & $\frac{dy}{dx} = \left[\frac{\partial y}{\partial x_j} \right]$ & $\frac{dy}{dx} = \left[\frac{\partial y_i}{\partial x_j} \right]$ & \\
\hline
Matrix & $\frac{dy}{dX} = \left[\frac{\partial y}{\partial x_{ji}} \right]$ & &\\
\hline
Related Question