# Why are samples from Gaussian Process prior so "smooth"?

I don't quite get why samples from prior in Gaussian Processes look like they do. I build covariance matrix, for example using radial basis kernel or a polynomial one, then I draw samples from multivariate normal Gaussian with mean $$0$$ and covariance that I calculate and the result is smooth, look like a continuous function. I don't get why. My intuition, that is obviously wrong, would tell me that there will be some discontinuities. Similarly with periodic kernel, I can visualize the covariance function using some heatmap, I can see the periodic pattern, but I don't understand why when I plug that into a multivariate Gaussian it yields periodic functions in return. I would be grateful for any help.

• Why shouldn't it be smooth? It might be easier to answer if you explain us why is it counterintuitive for you?
– Tim
Oct 25, 2021 at 8:29
• What's counterintuitive to me: I want to draw a sample from the prior, sample consisting of N points. So I construct N-dimensional Gaussian and then I draw one sample from it. So every point of my function that I sample corresponds to one dimension in the multivariate Gaussian, do I get it right? And I don't quite get why, when my first point has value let's say 1, my second point has value somewhere around 1 as well, why doesn't the third point have value -50 or something?
– gabe
Oct 27, 2021 at 8:20
• I'm afraid I don't follow. Why -50? What do you mean?
– Tim
Oct 27, 2021 at 8:23
• Let's day I have normal Gaussian. one dimensional. I draw one sample, let's say it's positive, then the second sample doesn't have to be positive as well, it can be negative. It doesn't have to be anywhere near the dirst sample. So why in GPs value of the first point is kind of close to the second point, which in turn is close to third point, etc. making the function continuous. This is what I don't get.
– gabe
Oct 27, 2021 at 9:27
• Hi @gabe, I am struggling to grasp this intuitively as well. I do not understand what makes the samples (which is just a random sample from multivariate normal) lie in such a smooth fashion when I plot them. Could you kindly share if you now have a better intuition? May 15, 2022 at 1:22