Can $\mathrm{PGL}_2$ be viewed as an affine algebraic group? I was just wondering whether or not it is possible to view $\mathrm{PGL}_2$ as an affine algebraic group. 

We may view $PGL_{2}$ over $\mathbb{Z}$ as an affine scheme given by an open subset of $\mathbb{P}^{4}_{\mathbb{Z}}$. More precisely, let $\{z_{11},z_{12},z_{21},z_{22}\}$ be coordinates on $\mathbb{P}^4$. Then $PGL_2$ is given by the distinguished open set $D(f)$ where $f=z_{11}z_{22}-z_{12}z_{21}$. The coordinate ring $\mathcal{O}(PGL_2)$ is the degree $0$ component of the graded ring $\mathbb{Z}[z_{11},z_{12},z_{21},z_{22}][f^{-1}]$.
$PGL_2$ is a group object in the category of schemes. Giving a group object is equivalent to giving a functorial group structure on $PGL_2(R)$ for each ring $R$. Observe that a map $s:Spec(R)\to PGL_2$ corresponds to the data (up to mutliplication by a unit in $R$):
 $(P,s_{11},s_{12},s_{21},s_{22})$ where $P$ is a projective $R$-module of rank $1$, $s_{ij}\in P$ such that $R\to P\otimes_R P$ given by $1\to (s_{11}s_{22}-s_{12}s_{21})$ is an isomorphism of $R$-modules. 
Given another map $t:Spec(R)\to PGL_2$ with data $(Q,t_{11},t_{12},t_{21},t_{22})$ we define the product morphism $s.t$ as the one associated to the data
$(P\otimes_R Q, w_{11},w_{12},w_{21},w_{22})$ where $w_{ij}$ are obtained from multiplying the matrix $[s_{ij}]$ with $[w_{ij}]$. 
When $(R,\mathfrak{m})$ is a local ring we have $P=R$ and map to $PGL_2$ is just a 4 tuple $(s_{11},s_{12},s_{21},s_{22})$ with discriminant a unit. By virtue of it being a map to $PGL_2$ and in particular $\mathbb{P}^4$ it is implicit that we identify any two such tuples which differ by multiplication by $R^*=R\setminus \mathfrak{m}$. This is the classical description.
