From looking at my statistics, I have noticed that quite a lot of people have been searching for the history of the Madrid. Rather than writing an extremely long article I thought I would identify soem good sources where you can get more information.
City Council’s History of Madrid – You will find some excellent information here, neatly placed into folders, which describe Madrid from the first settlers to the 13th century. From that period to now the site only offers a chronology.
Spain.info The Spanish Tourist Office website offers a good, brief description on the history of Madrid, along with other useful links.
Descubre Madrid also offers a brief history of Madrid, broken down into different periods of history.
For an exhaustive on-line history of Madrid (in Spanish) look no further than Historia de Madrid, the website of Luis Enrique Otero Carvajal, lecturer of History at Madrid’s Complutense University.
The Madrid Histórico website gives people another view of Madrid through the ages, using maps. Its excellent interactive maps show how the city has changed over the years. There is also an interactive map of Madrid today which allows you to locate important monuments. Unfortunately, it is only in Spanish.
Madrid History, Background and Overview (from Wikipedia)