# Can the covariance of X and Y be larger than the variance of X?

I am trying to visualize a 2D Gaussian for personal purposes. i.e this formula for the 2D case:

$$f(\mathbf x\mid \Theta_i)=|2\pi \Sigma_i|^{-\frac12}e^{-\frac12(\mathbf x-\mu_i)^T\Sigma_i^{-1}(\mathbf x-\mu_i)}$$

I coded it in python and if I input the covariance matrix:

$$\begin{bmatrix} 1 & 0.9\\ 0.9 & 1 \end{bmatrix}$$

I get the following:

Which makes perfect sense, as I expected to see some form of ellipse like shapes.

However if I input the matrix:

$$\begin{bmatrix} 1 & 1.1\\ 1.1 & 1 \end{bmatrix}$$

I get this:

Which looks a bit like a saddle point.

In general, when I set the covariance matrix to be such that $$\operatorname{cov}(x,y) > \operatorname{cov}(x,x) = \operatorname{cov}(y,y)$$ I get the second case, which in my head isn't a valid Gaussian. Thus I suspect I have broken some property, but I can't understand why it isn't possible for the covariance of $$(x,y)$$ to be larger than than the covariance of $$(x,x)$$.

This is a consequence of the famous Cauchy-Scwhartz Inequality, which is used to prove that correlations are bounded by 1. This implies that $$Cov(X,Y) \leq \sqrt{Var(X)Var(Y)}$$
For two r.v. $$X$$ and $$Y$$, a theorem in probability says $$|\text{cov}(X,Y)|\le \sigma_X\sigma_Y$$or equivalently $$|E\{\bar X\bar Y\}|^2\le E\{\bar X^2\}E\{\bar Y^2\}$$with $$\bar X=X-E\{X\}$$ and $$\bar Y=Y-E\{Y\}$$. This is an interpretation of Cauchy-Schwarz inequality in probability. Based on this, a correlation coefficient $$\rho$$ is defined as $$\rho={\text{cov}(X,Y)\over \sigma_X\sigma_Y}$$with $$|\rho|\le 1$$so, we can say that you have broken the Cauchy-Schwarz inequality, or equivalently, the positive definiteness of the covariance matrix.