Where was matter before the big bang?

It is said according to the big bang theory, that all the energy (matter) in the universe was located in a singularity. Where the matter came from, that is “inside” that singularity is unresolved.

The initial singularity is a singularity predicted by some models of the Big Bang theory to have existed before the Big Bang and thought to have contained all the energy and spacetime of the Universe. The instant immediately following the initial singularity is part of the Planck epoch, the earliest period of time in the history of the universe.

These, and similar theories, look at how the universe evolved using current models of cosmological expansion and extrapolating backwards in time. This leads to a this state, the singularity, where all space-time, matter and energy of the universe is said to have been contained in this point.

This is the best model we have, but is not necessarily the correct answer to “where was all the matter before the Big Bang”.

Before answering your question about from where all the energy came from, this can be either interpreted through some theological statements (Outside the scientific domain) where theists need to convince you that God in the Heaven created the Universe and also the pure energy for letting the 'Big Bang' occur or scientifically tried whereas most of the scientists don't believe in God and they try to answer this metaphysical question through scientific arguments.

Our physics can explain most of the evolution of the Universe after the Planck time (approximately $10^{-43}$ seconds after the Big Bang). Everything is unknown of this period because all the fundamental forces were united together and we don't have any Grand Unified Theory yet to explain the fact. So what Dr jh said that "it is not necessarily the correct answer to where was all the matter before the Big Bang”(modified) really matters.

Now, what's the actual case? I would rather answer scientifically through some probabilities. Scientists have suggested some most probable cosmological models for the origin of this universe. Mass and energy are its the main concernment here.

Sir Roger Penrose proposed that there could be an universe before the big bang. So, that means 'Singularity' is not the starting point here. He suggested a model named 'Conformal Cyclic Cosmology' and in CCC, the universe iterates through infinite cycles, with the future timelike infinity of each previous iteration being identified with the Big Bang singularity of the next.

enter image description here

So, he thinks that the universe is eternal. Again, another suggested model is Big Bounce Theory which was originally suggested as a phase of the cyclic model or oscillatory universe interpretation of the Big Bang, where the first cosmological event was the result of the collapse of a previous universe.

enter image description here

Self Creating Universe: Starting with the Big Bang and followed by creation of atoms, molecules, stars and galaxies, the Self-Creating Universe progresses to the formation of life and Earth's biosphere. And how it created itself? It needs energy but how did it get?

Many cosmologists think, its origin lies in so-called quantum uncertainty which is known to allow energy to emerge literally from nowhere. Quantum mechanics tells us that "nothing" is inherently unstable and for this instability 'Quantum Mechanical Fluctuation' may have created the whole cosmos. Vacuum isn't empty at all. There is free vacuum energy spreading throughout the entire space.

enter image description here

Another suggested theory is Eternal Chaotic Inflation took place before the singularity and the random noise leads to spacetime being filled with singularities. Singularities took place in everywhere through the space and after the big bang, early universe went through Cosmic Inflation and rapidly expanded. But if Inflation before the big bang is true, then Multiverse Theory will be true but so far that needs deeper investigation for justification.

What we still have with us is Big Bang Theory but that can't clearly predict any origination of mass or energy. We can't say that with guarantee. Until we get the 'Theory of Everything', we'll have to wait for knowing the ultimate truth.