How to analyze the market before investing in a startup

Within the market structure, what are the variables to take into account when carrying out a market analysis?