  In this paper we prove a Schwarz lemma for the pentablock. The set \[
\mathcal{P}=\{(a_{21}, \text{tr} \ A, \det A) : A=[a_{ij}]_{i,j=1}^2 \in
\mathbb{B}^{2\times 2}\} \] where $\mathbb{B}^{2\times 2}$ denotes the open
unit ball in the space of $2\times 2$ complex matrices, is called the
pentablock. The pentablock is a bounded nonconvex domain in $\Bbb{C}^3$ which
arises naturally in connection with a certain problem of $\mu$-synthesis. We
develop a concrete structure theory for the rational maps from the unit disc
$\Bbb{D}$ to the closed pentablock $\overline{\mathcal{P}}$ that map the unit
circle ${\mathbb{T}}$ to the distinguished boundary $b\overline{\mathcal{P}}$
of $\overline{\mathcal{P}}$. Such maps are called rational
${\overline{\mathcal{P}}}$-inner functions. We give relations between
penta-inner functions and inner functions from $\Bbb{D}$ to the symmetrized
bidisc. We describe the construction of rational penta-inner functions $x = (a,
s, p) : \Bbb{D} \rightarrow \overline{\mathcal{P}}$ of prescribed degree from
the zeroes of $a, s$ and $s^2-4p$. The proof of this theorem is constructive:
it gives an algorithm for the construction of a family of such functions $x$
subject to the computation of Fej\'er-Riesz factorizations of certain
non-negative trigonometric functions on the circle. We use properties and the
construction of rational ${\overline{\mathcal{P}}}$-inner functions to prove a
Schwarz lemma for the pentablock.
