The earliest Scottish railway to be incorporated by private Act of Parliament was the Kilmarnock and Troon (1808). Between 1808 and 1905 a total of 197 companies were incorporated, the majority by similar means, though in the late 19th and early 20th century a few obtained their powers by either a Light Railway Order, or a Board of Trade certificate. The exception was the Whiteinch Railway, incorporated in 1872 under the Companies Act (NRS reference BT2/433). Of these 197 companies, only 167 came to fruition. Of the remaining 30, powers were not exercised or were abandoned and in one case the relevant act was suspended.
In 1923 the remaining companies were merged either into the London and North Eastern Railway (NRS reference LNER) or the London, Midland and Scottish Railway (NRS reference LMS), the one exception being the Campbeltown and Machrihanish which steamed on independently until it was wound up in 1935.
In fact prior to 1923, Scotland's railway operations were dominated by five companies, ie. the North British (NRS reference BR/NBR), the Caledonian (NRS reference BR/CAL), the Glasgow and South Western (NRS reference BR/GSW), the Great North of Scotland (NRS reference BR/GNS) and the Highland (NRS reference BR/HR). These had taken over the majority of earlier companies, for example the Ardrossan incorporated in 1827 was taken over by the Glasgow and South Western in 1854. The Forth Bridge Railway Company (though it was part of the LNER network) legally survived in name until it was taken over by the British Transport Commission in 1948. Useful information on railway company histories can be found on the Railscot website.