Can you imagine a three-sided square? Try it.
In one sense of "imagine," you can, and in another, you can't. Let's start with the "can't."
Sometimes, when people use the term imagination, they are referring to mental imagery. Mental imagery is when you generate sensory like experiences from your own mind, rather than from the environment, through your sensory organs. This happens when you dream, and when you hear a song in your head. If you try to picture a three-sided square, you're not going to be able to do it. As soon as it has more or fewer than four sides, it ceases to be a square.
However, not all of imagination is mental imagery. When you are entertaining hypothetical situations, you can imagine statements. For example, if you imagine that you were jealous, it need not be even accompanied by any mental imagery. It's just a fact that you're entertaining. In this sense of the word, you can imagine a three-sided square. You just can't picture it.
Will this imagined fact lead to contradictions? Perhaps. This is what we mean when we say things like "I can't imagine he's like that for his birthday." What we mean is that, given the other things we know about the world, we think it's very unlikely. But if those inferences are not made, then the contradictions might not be detected. And in any case, the fact can be imagined. We can imagine contradictions too.
This is a problem for non-Euclidian geometry. A cube is a three-dimensional analog of a square. We can picture cubes. The lesser-known tesseract is a four-dimensional analog of a cube. Can you picture that? No, although the image above is an attempt. We can't picture more than three spatial dimensions without flattening it out to three.
But can we, in some sense, imagine four spatial dimensions? Of course. There are huge areas of mathematics that require this. When I did work at Los Alamos National Laboratories, we had to do vector calculations in 17,576 dimensions. Don't be too impressed; the math is actually rather simple. But you'll drive yourself crazy trying to picture it.
One idea that physicists have for the shape of the universe is a three-dimensional surface of a sphere. What does this mean?
Picture a balloon covered with dots made by a sharpie. The surface of the balloon is space, and the dots are galaxies. Because of the big bang, the surface of the balloon is gaining area. It's getting bigger. Got it?
The surface of a balloon is two-dimensional. It's a flat sheet that happens to be curved. The rubber of the balloon itself is, of course, there-dimensional, but we're not talking about that-- we're only taking about the surface.
Now here's the tricky part. In the case of the universe, the surface is three-dimensional. You might have heard that if you were to travel far enough in a single direction in the universe you'd end up back at the same place. This is true. It's like being an ant on the surface of a balloon. No matter where the ant walks, it can't leave the surface of the balloon, and eventually it will come around to where it was. Everywhere the ant looks, there are dots. Likewise, we see stars all around us.
The misconception people have with the big bang is that it's like an exploding firework-- a bunch of stars moving in some larger space. But it's not. The surface of the expanding balloon is all the space there is. The "inside" and "outside" of the balloon does not exist. All of space is in the surface of the balloon. And it's expanding, which, in three dimensions, means that the distance between all of the galaxies is getting greater. This is why all stars appear (in our telescopes) to be moving away from us. That's what happens to a dot on an expanding balloon, too. In fact, it's better to think not of the stars as moving, but as space expanding between them.
And "before" the big bang, there was no space at all. There was a time, long ago, when the entire universe was a single square foot (it didn't stay that way for long). There was nothing outside of that square foot. No space, no stars, nothing.
Can you picture that? No, you can't.
But you just might be able to imagine it.
Pictured: A tesseract. This work has been released into the public domain by its author, JasonHise at the English Wikipedia project. This applies worldwide.