We study the discrete time algebraic Riccati equation. In particular we show that even in the most general cases there exists a one-one correspondence between solutions of the algebraic Riccati equation and deflating subspaces of a matrix pencil. We also study the relationship between algebraic Riccati equation and the discrete time linear matrix inequality. We show that in general only a subset of the set of rank-minimizing solutions of the linear matrix inequality correspond to the solutions of the associated algebraic Riccati equation, and study under what conditions these sets are equal. In this process we also derive very weak assumptions under which a Riccati equation has a solution.