Ansel Adams, whose majestic black- and-white landscapes of the American West and whose devotion to clarity and precision made him probably the best- known photographer in the United States, died of heart disease Sunday night at Community Hospital of the Monterey Peninsula, near his home in Carmel, Calif. He was 82 years old. In a career that spanned more than 50 years, Mr. Adams combined a passion for natural landscape, meticulous craftsmanship as a printmaker and a missionary's zeal for his medium to become the most widely exhibited and recognized photographer of his generation. His photographs have been published in more than 35 books and portfolios, and they have been seen in hundreds of exhibitions, including a one-man show, ''Ansel Adams and the West,'' at the Museum of Modern Art in New York in 1979. That same year he was the subject of a cover story in Time magazine, and in 1980 he received the Medal of Freedom, the nation's highest civilian honor. In addition to being acclaimed for his dramatic landscapes of the American West, he was held in esteem for his contributions to photographic technology and to the recognition of photography as an art form. Trained as a Pianist Though trained as a concert pianist, Mr. Adams decided in 1930 that his true vocation was photography. Two years later, he was accomplished enough to be given a one-man show at the M. H. de Young Museum in San Francisco, and the same year he joined Edward Weston and Imogen Cunningham in forming the short-lived ''Group f/64.'' In the words of Mr. Adams's friend Wallace Stegner, the founding of this group was a benchmark in the establishment of photography as a distinct and legitimate art form that would be ''not a substitute brush, but a way of seeing.'' From that point onward, Mr. Adams rapidly became famous not only as a photographer but also as critic, teacher, publisher of portfolios, co-founder of the department of photography at the Museum of Modern Art, longtime consultant to the Polaroid Corporation and spokesman for a heroic and yet plainspoken approach to photography. Book Consecrated Reputation The publication by the New York Graphic Society in the 1970's of his book ''Ansel Adams: Images 1923-1974'' consecrated his reputation as a photographer whose work appealed to the widest possible public for its evocation of an American scene that was still without blemish. Ansel Adams was born in San Francisco on Feb. 20, 1902, of New England descent. The next year, his parents moved to a house overlooking the Golden Gate, where he formed his lifelong taste for a spectacular natural scene. In 1916, while on a visit to the Yosemite Valley, he made his first photographs with a box Brownie. Yosemite had so fired his imagination that for four summers running he took a job as caretaker for a lodge owned by the Sierra Club, of which he was later to be a director for 37 years. Acquired a Patron In 1927, while earning his living as a professional musician, Mr. Adams acquired a patron in San Francisco by the name of Albert Bender. Mr. Bender took him to Taos, N.M., where, during visits over the next few years, he made friends with Robinson Jeffers, John Marin and Georgia O'Keeffe. As his biographer, Nancy Newhall, said later, ''Taos was his Paris and his Rome.'' His first book, ''Taos Pueblo,'' with a text by Mary Austin, came out in 1930. Precision and sharp focus were fundamental to good photography, as Mr. Adams saw it, and as a born teacher he neglected no opportunity to make his views felt. He wrote for the Sierra Club Bulletin, he published a series of books on the basics of photography, he ran workshops and seminars in the Yosemite Valley, he taught and lectured at the Museum of Modern Art and colleges all along the Pacific Coast, and he published his work in portfolio form. As his reputation grew, he was encouraged to travel throughout the United States in order to bring his characteristic clarity and his sense of unforced grandeur to studies of national parks and remote places of every kind. In the 1930's he made extended trips with his fellow photographer Mr. Weston to the High Sierra, and with O'Keeffe and David McAlpin to the Southwest. In 1933, he met Alfred Stieglitz, and in 1936 Stieglitz gave Mr. Adams a one-man show at his New York City gallery, ''An American Place.'' This was the first one-man show of photography that Stieglitz had put on since Paul Strand was similarly honored two decades earlier. Directed a Pageant In 1940, Mr. Adams directed ''A Pageant of Photography'' as part of the Golden Gate Exposition in San Francisco, and took part with Mr. Weston and Dorothea Lange in a photographic forum organized by U. S. Camera in the Yosemite Valley. Also in 1940, he helped Beaumont Newhall and Mr. McAlpin to found the department of photography at the Museum of Modern Art. At the outbreak of World War II, he became a consultant to the Armed Services. But, ever-sensitive to the plight of minority groups, he published in 1944 ''Born Free and Equal,'' a photographic survey of a California camp in which Japanese-Americans were interned at the outbreak of war with Japan. After the war, Mr. Adams three times received Guggenheim Fellowships, which enabled him to record national parks and monuments in Alaska, Hawaii and elsewhere. In many writings in the postwar period, he stressed the importance of vision, as distinct from gadgetry. ''A picture,'' he liked to say, ''is only a collection of brightnesses,'' and, he would add, ''There is nothing worse than a brilliant image of a fuzzy concept.'' Fellow of American Academy Films about Mr. Adams and his work were directed by David Myers in 1957 and by Robert Katz in 1959. In 1963, Mrs. Newhall published a study of him called ''The Eloquent Light,'' after the show of that name that Mr. Adams had just had at the de Young Museum in San Francisco. In 1967 he and Mrs. Newhall published a book called ''Fiat Lux,'' to mark the centenary of the University of California, and in 1974 he was honored by a retrospective exhibition at the Metropolitan Museum in New York. In 1966, Mr. Adams was made a Fellow of the American Academy of Arts and Sciences, and in 1970 he was made a Chubb Fellow at Yale University. He received honorary doctorates from Occidental College, the University of Massachusetts and Yale University. In 1928, Mr. Adams married Virginia Best. After many years in Yosemite, the Adamses moved in 1962 to Carmel. He is survived by his wife; two children, Dr. Michael Adams of Fresno, Calif., and Anne Adams Helms of Redwood City, Calif., and five grandchildren. Funeral services will be private.