Wikipedia
testwiki
https://test.wikipedia.org/wiki/Main_Page
MediaWiki 1.47.0-wmf.10
first-letter
Media
Special
Talk
User
User talk
Wikipedia
Wikipedia talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Thread
Thread talk
Summary
Summary talk
Test namespace 1
Test namespace 1 talk
Test namespace 2
Test namespace 2 talk
Draft
Draft talk
Campaign
Campaign talk
TimedText
TimedText talk
Module
Module talk
SecurePoll
SecurePoll talk
CNBanner
CNBanner talk
Translations
Translations talk
Event
Event talk
Topic
Newsletter
Newsletter talk
Wikipedia:Requests/Permissions
4
32559
750437
746469
2026-07-07T19:32:34Z
Barkeep49
12837
/* Requests for user rights */ new request
750437
wikitext
text/x-wiki
<noinclude>{{Shortcut|WP:R/P|WP:RfP|WP:RfA|WP:PERM|WP:RFR|WP:RFPERM}}</noinclude>
{{Wikipedia:Requests/Top}}
== Requests for user rights ==
* Subpages: [[Wikipedia:Requests/Permissions/All|All (current and archived)]]
* Request:
<inputbox>
type=create
prefix=Wikipedia:Requests/Permissions/
preload=Template:PA2
buttonlabel=Requests for user rights
placeholder=Enter your username
</inputbox>
After creating the subpage, come back here and transclude the page below (<code><nowiki>{{Wikipedia:Requests/Permissions/Example}}</nowiki></code>).
<!-- Please transclude your requests below this line, LATEST AT THE TOP, in the form {{Wikipedia:Requests/Permissions/USERNAME}} -->
{{Wikipedia:Requests/Permissions/Barkeep49 3}}
<!-- NEW ENTRIES AT THE TOP, NOT HERE -->
mjtcsmpuzgbo1vwnlu8799oyfkq5tni
750446
750437
2026-07-07T19:43:07Z
Barras
6527
/* Requests for user rights */ none atm
750446
wikitext
text/x-wiki
<noinclude>{{Shortcut|WP:R/P|WP:RfP|WP:RfA|WP:PERM|WP:RFR|WP:RFPERM}}</noinclude>
{{Wikipedia:Requests/Top}}
== Requests for user rights ==
* Subpages: [[Wikipedia:Requests/Permissions/All|All (current and archived)]]
* Request:
<inputbox>
type=create
prefix=Wikipedia:Requests/Permissions/
preload=Template:PA2
buttonlabel=Requests for user rights
placeholder=Enter your username
</inputbox>
After creating the subpage, come back here and transclude the page below (<code><nowiki>{{Wikipedia:Requests/Permissions/Example}}</nowiki></code>).
<!-- Please transclude your requests below this line, LATEST AT THE TOP, in the form {{Wikipedia:Requests/Permissions/USERNAME}} -->
<!-- NEW ENTRIES AT THE TOP, NOT HERE -->
4to3ioxi4gykpf1uc4989asi41mhvsu
Test5555 Name
0
54295
750406
556942
2026-07-07T15:47:35Z
Enbi
72574
Blanked the page
750406
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
750407
750406
2026-07-07T15:49:05Z
Enbi
72574
750407
wikitext
text/x-wiki
Rollback this edit.
ilwrnbqhry6chx07f8zgcucu3zhyc94
750408
750407
2026-07-07T15:51:04Z
Enbi
72574
750408
wikitext
text/x-wiki
Rollback this edit..
eknbbi5ylqlh1pno1k3fmcimrf8qahr
750409
750408
2026-07-07T15:52:01Z
Enbi
72574
750409
wikitext
text/x-wiki
Rollback this edit...
m0k85k0xdheu4908ijnac3b9nqlw6m6
750410
750409
2026-07-07T15:57:53Z
Enbi
72574
750410
wikitext
text/x-wiki
Rollback this edit....
kyf0h3kbsx51at5vzgedmcrf04ctvvi
750411
750410
2026-07-07T16:00:23Z
Enbi
72574
750411
wikitext
text/x-wiki
Rollback this edit.....
t86eetahz5hy995ld0boi2jeetmvgrk
750412
750411
2026-07-07T16:01:36Z
Enbi
72574
750412
wikitext
text/x-wiki
Rollback this edit......
93xsciwfhe07uu327g5r150rkoxufym
750413
750412
2026-07-07T16:03:09Z
Enbi
72574
750413
wikitext
text/x-wiki
Rollback this edit.......
3942qbo9tif6b9yjlfhngvlqm0ojufw
750414
750413
2026-07-07T16:08:13Z
Enbi
72574
750414
wikitext
text/x-wiki
Rollback this edit........
fwb6rmjay414c3f0mwdf391lw4u7dyf
750417
750414
2026-07-07T16:24:39Z
Enbi
72574
750417
wikitext
text/x-wiki
Rollback this edit........
.
ig40mckup3ps1mj9zk6z2vsi0qedh7k
750418
750417
2026-07-07T16:24:44Z
Enbi
72574
test rollback
556942
wikitext
text/x-wiki
sfsfsfsfs
Hi, this should trigger a firstchange event in edit attempt step.
Data QA testing for https://phabricator.wikimedia.org/T322277
===
Oh well, I forgot to turn off ad blocker, so now i have to do this all over again!
Oh boy Im not a fan of wikitext.
Re-Test Metrics platform mediawiki_edit_Attempt : wikitext editor
- with ad blocker off
- on visual editor -savesuccess events
cbc2wv7557dnf47q684i8kb8zdwkeny
750419
750418
2026-07-07T16:25:24Z
Enbi
72574
750419
wikitext
text/x-wiki
sfsfsfsfs
Hi, this should trigger a firstchange event in edit attempt step.
Data QA testing for https://phabricator.wikimedia.org/T322277
===
Oh well, I forgot to turn off ad blocker, so now i have to do this all over again!
Oh boy Im not a fan of wikitext.
Re-Test Metrics platform mediawiki_edit_Attempt : wikitext editor
- with ad blocker off
- on visual editor -savesuccess events
.
h0pkxhi9zw8xy8vbz4g71s0nei19fj5
750420
750419
2026-07-07T16:25:29Z
Enbi
72574
test rollback
556942
wikitext
text/x-wiki
sfsfsfsfs
Hi, this should trigger a firstchange event in edit attempt step.
Data QA testing for https://phabricator.wikimedia.org/T322277
===
Oh well, I forgot to turn off ad blocker, so now i have to do this all over again!
Oh boy Im not a fan of wikitext.
Re-Test Metrics platform mediawiki_edit_Attempt : wikitext editor
- with ad blocker off
- on visual editor -savesuccess events
cbc2wv7557dnf47q684i8kb8zdwkeny
Test777
0
103093
750415
750277
2026-07-07T16:09:11Z
Enbi
72574
750415
wikitext
text/x-wiki
test test test 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 3
v
== Okay ==
{{slink|User:Newslinger/sandbox|Test 2}} [[User:Newslinger|Newslinger]] ([[User talk:Newslinger|talk]]) 16:30, 10 April 2019 (UTC)
Great
.
kl7nbureukwfp8uyo8eg5tlri9awwfm
750416
750415
2026-07-07T16:12:38Z
Enbi
72574
750416
wikitext
text/x-wiki
test test test 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 3
v
== Okay ==
{{slink|User:Newslinger/sandbox|Test 2}} [[User:Newslinger|Newslinger]] ([[User talk:Newslinger|talk]]) 16:30, 10 April 2019 (UTC)
Great
.
gk
fnf1xc43xxg4o9bq8ynexvmambo72tl
Ariana Grande
0
106204
750421
744530
2026-07-07T17:32:30Z
Enbi
72574
test ([[m:Special:MyLanguage/User:Jon Harald Søby/diffedit|diffedit]])
750421
wikitext
text/x-wiki
{{Short description|American singer and actress (born 1993)}}
{{Use American English|date=January 2024}}
{{Use mdy dates|date=February 2026}}
{{Infobox person
| name = Ariana Grande
| image = Ariana Grande promoting Wicked (2024).jpg
| alt = Ariana Grande in 2024, wearing pink suit while promoting the film Wicked
| caption = Grande in 2024
| birth_name = <!-- Do not delete "Butera". This is for her birth name, not her stage name. --> Ariana Grande-Butera
| birth_date = {{Birth date and age|1993|6|26}}
| birth_place = [[Boca Raton, Florida]], U.S.
| occupation = {{flatlist|
* Singer
* songwriter
* actress
}}
| organization = [[R.E.M. Beauty]]
| years_active = 2008–present
| spouse = {{marriage|Dalton Gomez|2021|2024|end=divorced}}
| works = {{hlist|[[Ariana Grande discography|Discography]]|[[List of songs recorded by Ariana Grande|songs recorded]]|[[Ariana Grande videography|videography]]|[[List of Ariana Grande live performances|performances]]}}
| relatives = [[Frankie Grande]] (half-brother)
| awards = [[List of awards and nominations received by Ariana Grande|Full list]]
| signature = Ariana Grande autograph.svg
| module = {{Infobox musical artist|embed=yes
| instruments = Vocals
| genre = {{hlist|[[Pop music|Pop]]|[[Contemporary R&B|R&B]]}}<!--Reliable sources must classify artist/their overall music as listed genre(s)-->
| label = {{hlist|[[Republic Records|Republic]]}}
}}
| website = {{URL|https://arianagrande.com/}}
}
'''Ariana Grande-Butera'''<!-- Do NOT delete "Butera" here. This is for her full name, not her stage name. Please provide a reliable, independent source when changing her name. --> ({{IPAc-en|ˌ|ɑr|i|ˈ|ɑː|n|ə|_|ˈ|ɡ|r|ɑː|n|d|ei|_|b|j|ʊ|ˈ|t|ɛ|ə|r|ə|audio=LL-Q1860 (eng)-Flame, not lame-Ariana Grande.wav}} {{Respell|AR|ee|AH|nə|_|GRAHN|day|_|byuu|TAIR|ə}};{{notetag|Grande pronounces her surname with the final syllable being similar to the pronunciation for "day". She explained in an interview for [[Beats 1]] that the pronunciation with the final syllable like "dee" was used by her grandfather.<ref>{{cite web |url=https://music.apple.com/us/station/the-ariana-grande-interview/ra.1430351850 |title=The Ariana Grande Interview |work=Beats 1 |via=Apple Music |last=Darden |first=Ebro |access-date=June 1, 2022 |archive-date=June 1, 2022 |archive-url=https://web.archive.org/web/20220601220004/https://music.apple.com/us/station/the-ariana-grande-interview/ra.1430351850 |url-status=live}}</ref>}} born June 26, 1993) is an American singer, songwriter, and actress.<!--NOTE: Only include occupation(s) that reliable sources consider notable/integral to artist's career --> Known for her four-octave [[vocal range]], which extends into the [[whistle register]], she is regarded as an influential figure in [[popular music]]. Publications such as ''[[Rolling Stone]]'' and [[Billboard (magazine)|''Billboard'']] have deemed Grande one of the greatest artists in history, while ''[[Time (magazine)|Time]]'' included her on its list of the world's [[Time 100|100 most influential people]] in 2016 and 2019.
Grande's career began as a teenager in the [[Broadway theatre|Broadway]] musical ''[[13 (musical)|13]]'' (2008) before she gained prominence as [[Cat Valentine (Victorious)|Cat Valentine]] in the [[Nickelodeon]] television series ''[[Victorious]]'' (2010–2013) and its spin-off ''[[Sam & Cat]]'' (2013–2014). After signing with [[Republic Records]], she released her debut studio album, ''[[Yours Truly (Ariana Grande album)|Yours Truly]]'' (2013), a [[retro]]-inspired [[pop music|pop]] and [[Contemporary R&B|R&B]] record that debuted atop the [[Billboard 200|''Billboard'' 200]]. She incorporated elements of [[electronic music|electronic]] on her next two albums, ''[[My Everything (Ariana Grande album)|My Everything]]'' (2014) and ''[[Dangerous Woman]]'' (2016), which both achieved international success, spawning the singles "[[Problem (Ariana Grande song)|Problem]]", "[[Break Free (song)|Break Free]]", "[[Bang Bang (Jessie J, Ariana Grande and Nicki Minaj song)|Bang Bang]]", "[[One Last Time (Ariana Grande song)|One Last Time]]", "[[Into You (Ariana Grande song)|Into You]]", and "[[Side to Side]]".
Personal struggles influenced Grande's albums ''[[Sweetener (album)|Sweetener]]'' (2018) and ''[[Thank U, Next]]'' (2019), both of which delved into [[trap music|trap]]. The latter garnered the US [[Billboard Hot 100|''Billboard'' Hot 100]] number-one singles "[[Thank U, Next (song)|Thank U, Next]]" and "[[7 Rings]]". With the [[Positions (song)|title track]] of her R&B-infused album ''[[Positions (album)|Positions]]'' (2020), as well as the collaborations "[[Stuck with U]]" and "[[Rain on Me (Lady Gaga and Ariana Grande song)|Rain on Me]]", she achieved the [[List of Billboard Hot 100 chart achievements and milestones#Most number-one debuts|most number-one debuts]] in the US. After a musical hiatus, she explored [[dance music|dance]] on ''[[Eternal Sunshine (album)|Eternal Sunshine]]'' (2024), which yielded the US number-one songs "[[Yes, And?]]" and "[[We Can't Be Friends (Wait for Your Love)]]". She returned to acting with the political satire ''[[Don't Look Up]]'' (2021) and portrayed [[Glinda]] in the fantasy musical film ''[[Wicked (2024 film)|Wicked]]'' (2024), which earned her an [[Academy Award]] nomination, as well as its sequel ''[[Wicked: For Good]]'' (2025).
Grande is one of the [[List of best-selling music artists#80 million to 99 million records|best-selling music artists of all time]], with estimated sales of over 90 million records. The [[Forbes list of the world's highest-paid musicians#Female|highest-paid female musician]] in 2020, [[List of awards and nominations received by Ariana Grande|her accolades]] include three [[Grammy Awards]], a [[Brit Award]], two [[Billboard Music Awards|''Billboard'' Music Awards]], three [[American Music Awards]], forty ''[[Guinness World Records]]'', and thirteen [[MTV Video Music Awards]]. Six of Grande's albums have reached number one on the ''Billboard'' 200, while nine of her songs have topped the ''Billboard'' Hot 100. Outside of music and acting, she has worked with many charitable organizations and advocates for [[animal rights]], [[mental health]], and [[Gender equality|gender]], [[Racial equality|racial]], and [[LGBT rights in the United States|LGBT equality]]. Her business ventures include the cosmetics brand [[R.E.M. Beauty]] and a fragrance line that has earned over $1 billion in global retail sales. She has a large social media following, being the [[List of most-followed Instagram accounts|sixth-most-followed individual]] on [[Instagram]].
{{TOC limit|4}}
== Early life ==
Ariana Grande-Butera was born on June 26, 1993, in [[Boca Raton, Florida]].<ref name="AllMusicBio">{{cite web |url=https://www.allmusic.com/artist/ariana-grande-mn0002264745/biography |title=Ariana Grande Biography |author-link=Stephen Thomas Erlewine |first=Stephen Thomas |last=Erlewine |publisher=[[AllMusic]] |access-date=August 28, 2014 |archive-date=May 2, 2019 |archive-url=https://web.archive.org/web/20190502120402/https://www.allmusic.com/artist/ariana-grande-mn0002264745/biography |url-status=live}}{{bsn|date=March 2026}}</ref> She is the daughter of Joan Grande, the [[Brooklyn]]-born CEO of Hose-McCann Communications, a manufacturer of marine communications equipment owned by the Grande family since 1964,<ref name=CoolDiva>{{cite news |last=McLean |first=Craig |date=October 17, 2014 |title=Ariana Grande: 'If you want to call me a diva I'll say: cool' |url=https://www.telegraph.co.uk/culture/music/11159510/Ariana-Grande-interview-Big-Sean-diva.html |url-status=live |archive-url=https://web.archive.org/web/20141208054853/https://www.telegraph.co.uk/culture/music/11159510/Ariana-Grande-interview-Big-Sean-diva.html |archive-date=December 8, 2014 |access-date=October 20, 2015 |newspaper=[[The Daily Telegraph]]}}</ref> and Edward Butera, a graphic design firm owner in Boca Raton.<ref name="DailyNews1">{{cite news |last=Farber |first=Jim |title=Ariana Grande owes her stardom to singing, not sex appeal |url=http://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-not-sex-appeal-article-1.1902829 |newspaper=[[New York Daily News]] |date=August 14, 2014 |access-date=February 7, 2015 |archive-url=https://web.archive.org/web/20160130010137/http://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-not-sex-appeal-article-1.1902829 |archive-date=January 30, 2016 |url-status=live}}</ref><ref name="BillboardFreaky">{{cite magazine |last=Goodman |first=Lizzy |title=''Billboard'' Cover: Ariana Grande on Fame, Freddy Krueger and Her Freaky Past |url=https://www.billboard.com/articles/news/6221482/billboard-cover-ariana-grande-on-fame-freddy-krueger-and-her-freaky-past |magazine=[[Billboard (magazine)|Billboard]] |date=August 15, 2014 |access-date=September 1, 2014 |archive-url=https://web.archive.org/web/20141206040004/https://www.billboard.com/articles/news/6221482/billboard-cover-ariana-grande-on-fame-freddy-krueger-and-her-freaky-past |archive-date=December 6, 2014 |url-status=live}}</ref> Grande is of Italian<ref name="Savage">{{cite news |last=Savage |first=Mark |url=https://www.bbc.com/news/entertainment-arts-40005064 |title=Ariana Grande: The diva with a heart |publisher=[[BBC]] |date=May 23, 2017 |access-date=October 25, 2017 |archive-url=https://web.archive.org/web/20170524080653/https://www.bbc.com/news/entertainment-arts-40005064 |archive-date=May 24, 2017 |url-status=live}}</ref> descent and has described herself as an Italian American with [[Sicilians|Sicilian]] and [[Abruzzo|Abruzzese]] roots.<ref>{{cite tweet |url=https://mobile.twitter.com/arianagrande/status/40266680152240128 |user=ArianaGrande |number=40266680152240128 |date=February 22, 2011 |last=Grande |first=Ariana |title=I am Italian American, half Sicilian and half Abruzzese xx RT @_mylifestory @ArianaGrande What is your nationality? :) |access-date=November 29, 2018 |archive-url=https://web.archive.org/web/20150724112011/https://twitter.com/ArianaGrande/status/40266680152240128 |archive-date=July 24, 2015 }}</ref> She has an older half-brother, [[Frankie Grande]], who is an entertainer and producer.<ref>{{cite news |last=Gonzales |first=Erica |url=http://www.harpersbazaar.com/celebrity/latest/news/a19403/ariana-grande-reaction-frankie-grade-gay |title=Ariana Grande Had the Perfect Response When Her Brother Came Out |work=[[Harpers Bazaar]] |date=December 14, 2016 |archive-url=https://web.archive.org/web/20161215123806/http://www.harpersbazaar.com/celebrity/latest/news/a19403/ariana-grande-reaction-frankie-grade-gay/ |archive-date=December 15, 2016 |access-date=December 14, 2016 |url-status=live}}</ref> Her family moved from New York to Florida before her birth, and her parents separated when she was eight or nine years old.<ref name="BillboardFreaky"/> Grande had a close relationship with her maternal grandmother, Marjorie Grande.<ref>{{Cite news |title=Ariana Grande had the cutest date at the AMAs: Her Grandma! |url=http://www.people.com/article/ariana-grande-grandmother-nonna-steals-show-at-the-american-music-awards |archive-url=https://web.archive.org/web/20151126043141/http://www.people.com/article/ariana-grande-grandmother-nonna-steals-show-at-the-american-music-awards |archive-date=November 26, 2015 |access-date=November 25, 2015 |work=[[People (magazine)|People]]}}</ref> At age eight, she sang "[[The Star-Spangled Banner]]" at the [[Florida Panthers]]'s home game against the [[Chicago Blackhawks]] on January 16, 2002.<ref>{{cite AV media |url=https://www.youtube.com/watch?v=QEwwhklDbVo |title=Ariana Grande at 8 years old singing National Anthem (via Ariana Grande Official Artist Channel) |via=[[YouTube]] |access-date=October 28, 2021 |date=June 8, 2011 |archive-url=https://web.archive.org/web/20221220120825/https://www.youtube.com/watch?v=QEwwhklDbVo |archive-date=December 20, 2022 |url-status=live}}</ref>
As a young child, Grande performed with the [[Fort Lauderdale]] Children's Theater,<ref>{{cite news |last=Geggis |first=Anne |date=August 31, 2012 |title=America's Tweetheart: Boca-born singer/actress big on Twitter |url=http://articles.sun-sentinel.com/2012-08-31/news/fl-boca-ariana-grande-20120830_1_twitter-nickelodeon-social-media |archive-url=https://web.archive.org/web/20180806182101/http://articles.sun-sentinel.com/2012-08-31/news/fl-boca-ariana-grande-20120830_1_twitter-nickelodeon-social-media |archive-date=August 6, 2018 |access-date=September 13, 2014 |work=[[South Florida Sun-Sentinel]] |location=Florida }} {{Webarchive|url=https://web.archive.org/web/20180806182101/http://articles.sun-sentinel.com/2012-08-31/news/fl-boca-ariana-grande-20120830_1_twitter-nickelodeon-social-media |date=August 6, 2018 }}</ref> playing her first role as the title character in the musical ''[[Annie (musical)|Annie]]''. She also performed in their productions of ''[[Adaptations of The Wizard of Oz|The Wizard of Oz]]'' and ''[[Beauty and the Beast (musical)|Beauty and the Beast]]''.<ref name="Savage"/><ref name="Complex">{{cite magazine |last=Nostro |first=Lauren |title=Who Is Ariana Grande? – Growing Up and Starting to Sing |url=http://www.complex.com/music/2013/08/who-is-ariana-grande/growing-up-and-starting-to-sing |magazine=Complex |access-date=June 11, 2014 |archive-date=July 19, 2019 |archive-url=https://web.archive.org/web/20190719140117/https://www.complex.com/music/2013/08/who-is-ariana-grande/growing-up-and-starting-to-sing |url-status=live}}</ref> At age eight, she performed at a karaoke lounge on a cruise ship and with orchestras such as South Florida's Philharmonic, Florida Sunshine Pops and Symphonic Orchestras.<ref name="AboutGrande">{{cite web |title=About Ariana Grande |url=http://www.mtv.com/artists/ariana-grande/biography/ |archive-url=https://web.archive.org/web/20170216080254/http://www.mtv.com/artists/ariana-grande/biography/ |archive-date=February 16, 2017 |access-date=August 28, 2014 |publisher=MTV}}</ref> During this time, she attended the [[Pine Crest School]] and later [[North Broward Preparatory]].<ref>{{cite magazine |last=Wilson |first=Olivia |url=http://www.teen.com/2014/12/09/celebrities/celebrities-who-went-to-boarding-prep-school/#1 |title=16 Celebrities You Didn't Know Went to Boarding or Prep School |magazine=[[Teen (magazine)|Teen]] |date=December 9, 2014 |access-date=May 31, 2016 |archive-url=https://web.archive.org/web/20170815024411/http://www.teen.com/2014/12/09/celebrities/celebrities-who-went-to-boarding-prep-school/#1 |archive-date=August 15, 2017 }}</ref>
== Career ==
=== 2008–2013: Career beginnings and Nickelodeon ===
{{Main|Victorious|l1=''Victorious''|Sam & Cat|l2=''Sam & Cat''}}
When she first arrived in [[Los Angeles]], California, to meet with her managers, she expressed a desire to record an [[contemporary R&B|R&B]] album: "I was like, 'I want to make an R&B album,' They were like 'Um, that's a helluva goal! Who is going to buy a 14-year-old's R&B album?!'"<ref name="BillboardFreaky"/> In 2008, Grande was cast as cheerleader Charlotte in the Broadway musical ''[[13 (musical)|13]]''.<ref>{{cite news |url=https://www.nytimes.com/2008/10/06/theater/reviews/06bran.html |title=Stranger in Strange Land: The Acne Years |newspaper=[[The New York Times]] |last=Brantley |first=Ben |date=October 6, 2008 |access-date=September 11, 2014 |archive-date=February 9, 2018 |archive-url=https://web.archive.org/web/20180209162616/http://www.nytimes.com/2008/10/06/theater/reviews/06bran.html |url-status=live}}</ref><ref>{{cite magazine |url=http://www.timeforkids.com/news/ariana-grande/133541 |title=Ariana Grande |magazine=[[Time for Kids]] |date=December 5, 2013 |access-date=September 7, 2014 |archive-url=https://web.archive.org/web/20131218235254/https://www.timeforkids.com/news/ariana-grande/133541/ |archive-date=December 18, 2013}}</ref>
[[File:Ariana Grande by David Shankbone (cropped).jpg|thumb|upright|Grande at the 2010 [[Tribeca Film Festival]]]]
Grande was cast in the [[Nickelodeon]] television show ''[[Victorious]]'' along with ''13'' co-star [[Elizabeth Gillies]] in 2009.<ref name="Liz2009">{{cite magazine |url=http://www.seventeen.com/cosmogirl/five-questions-elizabeth-gillies |title=Elizabeth Gillies from Victorious Interview |last=Brown |first=Lauren |magazine=[[Seventeen (American magazine)|Seventeen]] |date=April 21, 2010 |access-date=August 30, 2014 |archive-date=September 3, 2014 |archive-url=https://web.archive.org/web/20140903232248/http://www.seventeen.com/cosmogirl/five-questions-elizabeth-gillies |url-status=live}}</ref> In the sitcom, set at a [[performing arts]] high school, she played the "adorably dimwitted" [[List of Victorious characters#Cat Valentine|Cat Valentine]].<ref name="Savage"/><ref name="Liz2009"/> She had to dye her hair red every other week for the role, which damaged it.<ref>{{cite magazine |url=https://www.allure.com/story/ariana-grande-hair-down-no-ponytail-photos |title=Ariana Grande Wore Her Hair Down Again, and Fans Still Can't Handle It |magazine=[[Allure (magazine)|Allure]] |last=Mueller |first=Marissa G. |date=June 7, 2019 |quote=Since people give me such a hard time about my hair I thought I'd take the time to explain the whole situation to everybody," she wrote on Facebook. "I had to bleach my hair and dye it red every other week for the first 4 years of playing Cat... as one would assume, that completely destroyed my hair. |access-date=December 23, 2019 |archive-date=December 23, 2019 |archive-url=https://web.archive.org/web/20191223183214/https://www.allure.com/story/ariana-grande-hair-down-no-ponytail-photos |url-status=live}}</ref> The show premiered in March 2010 to the second-largest audience for a live-action series in Nickelodeon, with 5.7 million viewers.<ref>{{cite news |url=https://www.nytimes.com/2010/03/26/arts/television/26victor.html |title=First the Tween Heart, Now the Soul |last=Wyatt |first=Edward |newspaper=The New York Times |date=March 25, 2010 |access-date=August 30, 2014 |archive-date=June 17, 2012 |archive-url=https://web.archive.org/web/20120617164647/http://www.nytimes.com/2010/03/26/arts/television/26victor.html |url-status=live}}</ref><ref name="rat2">{{cite web |last=Seidman |first=Robert |date=March 29, 2010 |title=Nickelodeon Scores 2nd Biggest "Kids' Choice Awards"; "Victorious" Bows to 5.7 Million |url=http://tvbythenumbers.zap2it.com/2010/03/29/nickelodeon-scores-2nd-biggest-kids-choice-awards-victorious-bows-to-5-7-million/46493/ |archive-url=https://web.archive.org/web/20150711234226/http://tvbythenumbers.zap2it.com/2010/03/29/nickelodeon-scores-2nd-biggest-kids-choice-awards-victorious-bows-to-5-7-million/46493/ |archive-date=July 11, 2015 |access-date=September 3, 2014 |publisher=TV by the Numbers}}</ref> The role helped propel Grande to [[teen idol]] status, but she was more interested in a music career, saying that acting is "fun, but music has always been first and foremost with me."<ref>{{cite magazine |last=Greene |first=Andy |title=How Ariana Grande and Max Martin Made 'Problem' the Song of the Summer |url=https://www.rollingstone.com/music/news/how-ariana-grande-and-max-martin-made-problem-the-song-of-the-summer-20140522 |magazine=[[Rolling Stone]] |date=May 22, 2014 |access-date=September 2, 2014 |archive-date=April 7, 2018 |archive-url=https://web.archive.org/web/20180407224107/https://www.rollingstone.com/music/news/how-ariana-grande-and-max-martin-made-problem-the-song-of-the-summer-20140522 }}</ref>
After the first season of ''Victorious'' wrapped, Grande wanted to focus on her music career and began working on her debut album in August 2010.<ref>{{cite web |last=Hyman |first=Dan |title=Life Is Grande: Ariana Grande On Her Debut Album and the Thrill of Hearing Herself on the Radio |url=http://www.elle.com/news/culture/ariana-grande-interview |website=[[Elle (magazine)|Elle]] |date=August 22, 2013 |access-date=August 30, 2014 |archive-date=November 8, 2014 |archive-url=https://web.archive.org/web/20141108153902/http://www.elle.com/news/culture/ariana-grande-interview |url-status=live}}</ref> The second season premiered in April 2011 to 6.2 million viewers, becoming the show's highest-rated episode.<ref>{{cite web |last=Seidman |first=Robert |title=Cable Top 25: 'Kids' Choice Awards,' 'Pawn Stars,' 'WWE RAW' and 'Victorious' Top Weekly Cable Viewing |url=http://tvbythenumbers.zap2it.com/2011/04/05/cable-top-25-kids-choice-awards-pawn-stars-wwe-raw-and-victorious-top-weekly-cable-viewing/88284/ |archive-url=https://web.archive.org/web/20110408070942/http://tvbythenumbers.zap2it.com/2011/04/05/cable-top-25-kids-choice-awards-pawn-stars-wwe-raw-and-victorious-top-weekly-cable-viewing/88284 |archive-date=April 8, 2011 |publisher=[[TV by the Numbers]] |date=April 5, 2011 |access-date=September 3, 2014}}</ref> In May 2011, Grande appeared in [[Greyson Chance]]'s video for the song "Unfriend You" from his album ''[[Hold On 'til the Night]]'' (2011), portraying his ex-girlfriend. She made her first musical appearance on the track "Give It Up" from the [[Victorious: Music from the Hit TV Show|''Victorious'' soundtrack]] in August 2011. While filming ''Victorious'', Grande made several recordings of herself singing covers of songs by [[Adele]], [[Whitney Houston]] and [[Mariah Carey]], and uploaded them to [[YouTube]].<ref name="GrandeDeal">{{cite news |url=https://www.reuters.com/article/2011/08/11/idUS232814+11-Aug-2011+BW20110811$495411498 |title=Universal Republic Records Announces the Signing of Ariana Grande |work=Reuters |date=August 11, 2011 |access-date=August 29, 2014 |archive-url=https://web.archive.org/web/20141026170358/http://www.reuters.com/article/2011/08/11/idUS232814+11-Aug-2011+BW20110811$495411498 |archive-date=October 26, 2014}}</ref> A friend of [[Monte Lipman]], chief executive officer (CEO) of [[Republic Records]], came across one of the videos. Impressed by her vocals, he sent the links to Lipman, who signed her to a recording contract.<ref name="BillboardFreaky"/> Grande voiced the title role in the English dub of the [[Spanish-language]] animated film ''[[Snowflake, the White Gorilla]]'' in November 2011.<ref>{{cite web |last=Dinh |first=James |title=Greyson Chance Gets Revenge In 'Unfriend You' Video |url=http://www.mtv.com/news/1666573/greyson-chance-unfriend-you-video/ |publisher=[[MTV]] |date=June 28, 2011 |access-date=July 10, 2015 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213315/http://www.mtv.com/news/1666573/greyson-chance-unfriend-you-video/ }}</ref><ref name="Spanos7">{{cite magazine |last=Spanos |first=Brittany |url=https://www.rollingstone.com/music/lists/ariana-grande-7-forgotten-screen-cameos-20160520/snowflake-the-white-gorilla-2011-20160520 |title=Ariana Grande: 7 Forgotten Screen Cameos |magazine=[[Rolling Stone]] |date=May 20, 2016 |access-date=August 24, 2017 |archive-date=August 31, 2017 |archive-url=https://web.archive.org/web/20170831132453/https://www.rollingstone.com/music/lists/ariana-grande-7-forgotten-screen-cameos-20160520/snowflake-the-white-gorilla-2011-20160520 |url-status=live}}</ref> From 2011 to 2013, she was cast in the role of fairy Princess Diaspro in the [[List of Winx Club episodes#Revived series 2|Nickelodeon revival]] of ''[[Winx Club]]''.<ref>{{cite press release |url=http://www.thefutoncritic.com/news/2011/06/09/global-hit-animated-series-winx-club-comes-to-nickelodeon-starting-monday-june-27-at-8-pm-219312/20110609nickelodeon01/ |title=Global hit animated series 'Winx Club' comes to Nickelodeon, starting Monday, June 27, at 8pm |via=[[The Futon Critic]] |date=June 9, 2011 |author=Nickelodeon |access-date=August 13, 2016 |archive-date=September 11, 2020 |archive-url=https://web.archive.org/web/20200911034336/http://www.thefutoncritic.com/news/2011/06/09/global-hit-animated-series-winx-club-comes-to-nickelodeon-starting-monday-june-27-at-8-pm-219312/20110609nickelodeon01/ |url-status=live}}</ref>
In December 2011, Grande released her first single, "[[Put Your Hearts Up]]", which was recorded for a potential teen-oriented pop album that was never issued. She later disowned the track for its [[bubblegum pop]] sound, saying she had no interest in recording music of that genre.<ref name="AllMusicBio"/> The song was later certified Gold by the [[Recording Industry Association of America]] (RIAA).<ref>{{cite web |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=ARIANA+GRANDE&ti=PUT+YOUR+HEARTS+UP |title=Put Your Hearts Up – RIAA's Gold & Platinum Program searchable database |publisher=Recording Industry Association of America |access-date=March 31, 2016 |archive-date=October 9, 2016 |archive-url=https://web.archive.org/web/20161009205906/http://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Put+Your+Hearts+Up |url-status=live}}</ref> On a second soundtrack, ''[[Victorious 2.0]]'', released on June 5, 2012, as an [[extended play]], she supplied vocals as part of the show's cast for the song "5 Fingaz to the Face".<ref>{{cite web |url=https://www.allmusic.com/album/victorious-20-more-music-from-the-hit-tv-show-original-tv-soundtrack-mw0002392649 |title=Victorious 2.0: More Music from the Hit TV Show |last=Phares |first=Heather |publisher=[[AllMusic]] |date=June 5, 2012 |access-date=August 31, 2014 |archive-date=April 3, 2019 |archive-url=https://web.archive.org/web/20190403231415/https://www.allmusic.com/album/victorious-20-more-music-from-the-hit-tv-show-original-tv-soundtrack-mw0002392649 |url-status=live}}</ref> The third and final soundtrack, ''[[Victorious 3.0]]'', was released on November 6, 2012, which featured a duet by Grande and [[Victoria Justice]] titled "[[L.A. Boyz (song)|L.A. Boyz]]", with an accompanying music video being released shortly after.<ref>{{cite web |url=http://www.nick.com/videos/clip/victorious-la-boyz-music-video.html |archive-url=https://web.archive.org/web/20141016121251/http://www.nick.com/videos/clip/victorious-la-boyz-music-video.html |archive-date=October 16, 2014 |title=Victoria Justice & Ariana Grande: "L.A. Boyz" |publisher=[[Nick.com]] |access-date=August 31, 2014}}</ref> In December 2012, Grande collaborated on the single version of "[[Popular Song (Mika song)|Popular Song]]", a duet with British singer and songwriter [[Mika (singer)|Mika]].<ref>{{cite news |last=Depland |first=Michael |date=April 29, 2013 |title=New Video: Mika Featuring Ariana Grande, 'Popular Song' |publisher=[[MTV]] |url=http://buzzworthy.mtv.com/2013/04/29/mika-ariana-grande-popular-song-video/ |access-date=May 5, 2013 |archive-date=May 3, 2013 |archive-url=https://web.archive.org/web/20130503012439/http://buzzworthy.mtv.com/2013/04/29/mika-ariana-grande-popular-song-video }} {{Webarchive|url=https://web.archive.org/web/20130503012439/http://buzzworthy.mtv.com/2013/04/29/mika-ariana-grande-popular-song-video |date=May 3, 2013 }}</ref>
After four seasons, ''Victorious'' was not renewed,<ref>{{cite web |date=August 11, 2012 |title='Victorious': Nickelodeon Cancels Victoria Justice Series After 3 Seasons |url=https://www.huffingtonpost.com/2012/08/11/victorious-cancelled-nickelodeon_n_1768125.html |url-status=live |archive-url=https://web.archive.org/web/20170707202840/http://www.huffingtonpost.com/2012/08/11/victorious-cancelled-nickelodeon_n_1768125.html |archive-date=July 7, 2017 |access-date=September 14, 2014 |work=[[HuffPost]]}}</ref> with the finale airing in February 2013. Grande starred as [[Snow White]] in the [[pantomime]]-style musical theatre production ''[[A Snow White Christmas (musical)|A Snow White Christmas]]'' with [[Charlene Tilton]] and [[Neil Patrick Harris]] at the [[Pasadena Playhouse]].<ref>{{Cite web |last=Denette |first=Kelsey |title=Ariana Grande, Charlene Tilton and Neil Patrick Harris Headline A Snow White Christmas at Pasadena Playhouse, 12/13-23 |url=https://www.broadwayworld.com/los-angeles/article/Ariana-Grande-Charlene-Tilton-and-Neil-Patrick-Harris-Headline-A-SNOW-WHITE-CHRISTMAS-at-Pasadena-Playhouse-1213-23-20120907 |archive-url=https://web.archive.org/web/20131013014801/https://www.broadwayworld.com/los-angeles/article/Ariana-Grande-Charlene-Tilton-and-Neil-Patrick-Harris-Headline-A-SNOW-WHITE-CHRISTMAS-at-Pasadena-Playhouse-1213-23-20120907 |archive-date=October 13, 2013 |access-date=April 1, 2024 |publisher=[[BroadwayWorld]]}}</ref>{{unreliable source|sure=yes|date=March 2026}} She played Amanda Benson in ''[[Swindle (2013 film)|Swindle]]'', a 2013 Nickelodeon film adaptation of the children's [[Swindle (novel)|book of the same name]].<ref name="Spanos7"/><ref>{{cite magazine |last=Marechal |first=AJ |date=October 3, 2012 |title=Nick stars set to 'Swindle' |url=https://variety.com/2012/tv/news/nick-stars-set-to-swindle-1118060202/ |url-status=live |archive-url=https://web.archive.org/web/20231026185028/https://variety.com/2012/tv/news/nick-stars-set-to-swindle-1118060202/ |archive-date=October 26, 2023 |access-date=February 27, 2013 |magazine=[[Variety (magazine)|Variety]]}}</ref> Meanwhile, Nickelodeon created ''[[Sam & Cat]]'', an ''[[iCarly]]'' and ''Victorious'' spin-off starring [[Jennette McCurdy]] and Grande.<ref>{{cite magazine |last=Snierson |first=Dan |date=August 2, 2012 |title=Nickelodeon greenlights spin-off pilots for 'iCarly,' 'Victorious' from creator Dan Schneider – EXCLUSIVE |url=http://insidetv.ew.com/2012/08/02/nickelodeon-icarly-spinoff-victorious/ |url-status=live |archive-url=https://web.archive.org/web/20141216025119/http://insidetv.ew.com/2012/08/02/nickelodeon-icarly-spinoff-victorious/ |archive-date=December 16, 2014 |access-date=September 3, 2014 |magazine=[[Entertainment Weekly]]}}</ref> Grande and McCurdy reprised their roles as Cat Valentine and [[Sam Puckett (iCarly Character)|Sam Puckett]] on the buddy sitcom, which paired the characters as roommates who form an after-school babysitting business.<ref>{{cite news |date=August 3, 2012 |title=Nickelodeon greenlights an 'iCarly' spinoff and other new shows |url=https://www.latimes.com/entertainment/tv/showtracker/la-et-st-nickelodeon-greenlights-icarly-spinoff-20120803,0,3715048.story |url-status=live |archive-url=https://web.archive.org/web/20120807002502/http://www.latimes.com/entertainment/tv/showtracker/la-et-st-nickelodeon-greenlights-icarly-spinoff-20120803,0,3715048.story |archive-date=August 7, 2012 |access-date=August 12, 2012 |newspaper=Los Angeles Times}}</ref>
=== 2013–2015: ''Yours Truly'' and ''My Everything'' ===
{{Main|Yours Truly (Ariana Grande album)|l1=''Yours Truly'' (Ariana Grande album)|My Everything (Ariana Grande album)|l2=''My Everything'' (Ariana Grande album)}}
[[File:ArianaGrandeDecember2013 ohne Hintergrund.jpg|thumb|left|upright|Grande in 2013]]
Grande released her debut album, ''Yours Truly'', on August 30, 2013.<ref name="itunesgb">{{cite web |last=Grande |first=Ariana |date=August 30, 2013 |title=Yours Truly |url=https://music.apple.com/gb/album/yours-truly/685617992 |archive-url=https://web.archive.org/web/20131014170604/https://itunes.apple.com/gb/album/yours-truly/id685617992 |archive-date=October 14, 2013 |access-date=August 3, 2021 |url-status=live |publisher=[[iTunes Store]]}}</ref> A pop and [[contemporary R&B|R&B]] record influenced by 1950s [[doo-wop]], ''Yours Truly'' debuted at number one on the US [[Billboard 200|''Billboard'' 200]] albums chart, with 138,000 copies sold in its first week.<ref>{{cite magazine |url=https://pitchfork.com/reviews/albums/18591-ariana-grande-yours-truly/ |title=Ariana Grande Yours Truly |last=Ryce |first=Andre |magazine=[[Pitchfork (website)|Pitchfork]] |access-date=June 7, 2020 |date=September 23, 2013 |archive-url=https://web.archive.org/web/20131124214449/https://pitchfork.com/reviews/albums/18591-ariana-grande-yours-truly/ |archive-date=November 24, 2013 |url-status=live}}</ref><ref>{{cite magazine |last=Caulfield |first=Keith |title=Ariana Grande Debuts At No. 1 On ''Billboard'' 200 |url=https://www.billboard.com/articles/news/5687364/ariana-grande-debuts-at-no-1-on-billboard-200 |magazine=[[Billboard (magazine)|Billboard]] |date=September 11, 2013 |access-date=September 11, 2013 |archive-date=April 3, 2019 |archive-url=https://web.archive.org/web/20190403070409/https://www.billboard.com/articles/news/5687364/ariana-grande-debuts-at-no-1-on-billboard-200 |url-status=live}}</ref><ref>{{cite web |title=Ariana Grande, Tamar Braxton Score Top Debuts |url=http://www.rap-up.com/2013/09/11/ariana-grande-tamar-braxton-score-top-debuts/ |work=Rap-Up |date=September 11, 2014 |access-date=August 29, 2014 |archive-date=June 24, 2019 |archive-url=https://web.archive.org/web/20190624155737/https://www.rap-up.com/2013/09/11/ariana-grande-tamar-braxton-score-top-debuts/ |url-status=live}}</ref> ''Yours Truly'' also debuted in the top ten in several other countries, including Australia,<ref>{{cite web |title=Week Commencing 9 September, 2013 |url=http://www.ariacharts.com.au/chart/download/1478/albums |publisher=ARIA |archive-url=https://web.archive.org/web/20130921055715/http://www.ariacharts.com.au/chart/download/1478/albums |archive-date=September 21, 2013}}</ref> the UK,<ref>{{cite web |last=Lane |first=Daniel |title=The 1975 score debut Number 1 album |url=http://www.officialcharts.com/chart-news/the-1975-score-debut-number-1-album-2474/ |publisher=[[Official Charts Company]] |access-date=September 8, 2013 |archive-date=October 18, 2014 |archive-url=https://web.archive.org/web/20141018151324/http://www.officialcharts.com/chart-news/the-1975-score-debut-number-1-album-2474/ |url-status=live}}</ref> Ireland,<ref>{{cite web |url=http://www.chart-track.co.uk/index.jsp?c=p%252Fmusicvideo%252Fmusic%252Farchive%252Findex_test.jsp&ct=240002&arch=t&lyr=2013&year=2013&week=36 |title=GFK Chart-Track – Irish Album Chart 5 September 2013 |website=chart-track.co.uk |access-date=March 31, 2016 |archive-url=https://web.archive.org/web/20181214135218/http://www.chart-track.co.uk/index.jsp?c=p%2Fmusicvideo%2Fmusic%2Farchive%2Findex_test.jsp&ct=240002&arch=t&lyr=2013&year=2013&week=36 |archive-date=December 14, 2018 }}</ref> and the Netherlands.<ref>{{cite web |title=Yours Truly |url=http://www.dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Yours+Truly&cat=a |publisher=Dutch Charts |access-date=November 15, 2014 |archive-date=November 29, 2019 |archive-url=https://web.archive.org/web/20191129164106/https://dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Yours+Truly&cat=a |url-status=live}}</ref> Its lead single, "[[The Way (Ariana Grande song)|The Way]]", featuring [[Pittsburgh]] rapper [[Mac Miller]], debuted at number ten on the US [[Billboard Hot 100|''Billboard'' Hot 100]],<ref name="billboard1">{{cite magazine |url=https://www.billboard.com/articles/news/1555888/macklemore-ryan-lewis-top-hot-100-imagine-dragons-ariana-grande-hit-top-10 |title=Macklemore & Ryan Lewis Top Hot 100; Imagine Dragons, Ariana Grande Hit Top 10 |magazine=[[Billboard (magazine)|Billboard]] |date=February 16, 2008 |access-date=May 5, 2013 |archive-date=June 13, 2019 |archive-url=https://web.archive.org/web/20190613170813/https://www.billboard.com/articles/news/1555888/macklemore-ryan-lewis-top-hot-100-imagine-dragons-ariana-grande-hit-top-10 |url-status=live}}</ref> eventually peaking at number nine for two weeks.<ref>{{cite magazine |title=The song, featuring T.I. and Pharrell, zips 6–1 to become Thicke's first Hot 100 No. 1. Plus, Ariana Grande returns to the top 10 at a new peak and Miley Cyrus debuts at No. 11 |url=https://www.billboard.com/articles/news/1566519/robin-thickes-blurred-lines-hits-no-1-on-hot-100 |magazine=[[Billboard (magazine)|Billboard]] |date=June 12, 2013 |access-date=August 29, 2014 |archive-date=June 14, 2018 |archive-url=https://web.archive.org/web/20180614154532/https://www.billboard.com/articles/news/1566519/robin-thickes-blurred-lines-hits-no-1-on-hot-100 |url-status=live}}</ref> Grande was later sued by Minder Music for copying the line "What we gotta do right here is go back, back in time" from the 1972 song "[[Troglodyte (Cave Man)]]" by [[The Jimmy Castor Bunch]].<ref>{{cite web |title=Ariana Grande faces lawsuit over allegedly copying song lyrics |url=https://www.digitalspy.com/music/news/a538118/ariana-grande-faces-lawsuit-over-allegedly-copying-song-lyrics.html |last=Corner |first=Lewis |work=[[Digital Spy]] |date=December 13, 2013 |access-date=August 31, 2014 |archive-date=September 24, 2015 |archive-url=https://web.archive.org/web/20150924051923/http://www.digitalspy.com/music/news/a538118/ariana-grande-faces-lawsuit-over-allegedly-copying-song-lyrics.html |url-status=live}}</ref> The album's second single, "[[Baby I]]", was released in July.<ref>{{cite web |url=https://itunes.apple.com/us/album/baby-i-single/id675752389 |title=iTunes – Music – Baby I – Single by Ariana Grande |publisher=[[Apple Music]] |date=July 22, 2013 |access-date=September 1, 2013 |archive-url=https://web.archive.org/web/20130822154339/https://itunes.apple.com/us/album/baby-i-single/id675752389 |archive-date=August 22, 2013}}</ref> Its third single, "[[Right There (Ariana Grande song)|Right There]]", featuring [[Detroit]] rapper [[Big Sean]], was released in August 2013.<ref>{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-big-sean-masquerade-in-right-there-video-watch-5770708/ |title=Ariana Grande, Big Sean Masquerade in 'Right There' Video: Watch |last=Lipshutz |first=Jason |date=October 30, 2013 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 14, 2014 |archive-date=July 12, 2019 |archive-url=https://web.archive.org/web/20190712031345/https://www.billboard.com/articles/columns/pop-shop/5770708/ariana-grande-big-sean-masquerade-in-right-there-video-watch |url-status=live}}</ref> They respectively peaked at number 21 and 84 on the ''Billboard'' Hot 100.<ref>{{cite magazine |last=Lipshutz |first=Jason |title=Ariana Grande Unveils 'Yours Truly' Artwork, Confirms Release Date |url=https://www.billboard.com/music/music-news/ariana-grande-unveils-yours-truly-artwork-confirms-release-date-5380950/ |magazine=[[Billboard (magazine)|Billboard]] |date=July 31, 2013 |access-date=July 31, 2013 |archive-date=June 14, 2018 |archive-url=https://web.archive.org/web/20180614102412/https://www.billboard.com/articles/columns/pop-shop/5380950/ariana-grande-unveils-yours-truly-artwork-confirms-release-date |url-status=live}}</ref>
Grande recorded the duet "[[Almost Is Never Enough]]" with [[Nathan Sykes]] of [[The Wanted]], which was released as a promotional single in August 2013. She also joined [[Justin Bieber]] on his [[Believe Tour]] for three shows and kicked off her own headlining mini-tour, [[The Listening Sessions]].<ref>{{cite web |url=http://www.mtv.com/news/1711445/ariana-grande-justin-bieber-believe-tour-prep/ |title=Ariana Grande 'Working Out A Lot' Before Justin Bieber Tour |last=Vena |first=Jocelyn |publisher=[[MTV]] |date=July 29, 2013 |access-date=August 30, 2014 |archive-date=September 12, 2019 |archive-url=https://web.archive.org/web/20190912203314/http://www.mtv.com/news/1711445/ariana-grande-justin-bieber-believe-tour-prep/ }}</ref> At the 2013 [[American Music Awards of 2013|American Music Awards]], she won the award for [[American Music Award for New Artist of the Year|New Artist of the Year]].<ref>{{cite magazine |url=http://music-mix.ew.com/2013/11/25/amas-2013-winners-list/ |title=AMAs 2013: See the complete winners list |magazine=Entertainment Weekly |date=November 25, 2013 |access-date=November 25, 2013 |archive-date=January 13, 2015 |archive-url=https://web.archive.org/web/20150113203900/http://music-mix.ew.com/2013/11/25/amas-2013-winners-list/ |url-status=live}}</ref><ref>{{cite magazine |last=Gallo |first=Phil |title=Ariana Grande, Taylor Swift Lead AMAs to Record Twitter Traffic (Exclusive) |url=https://www.billboard.com/articles/news/5800827/amas-twitter-traffic-ariana-grande-taylor-swift |magazine=[[Billboard (magazine)|Billboard]] |date=November 26, 2013 |access-date=December 15, 2013 |archive-date=July 9, 2018 |archive-url=https://web.archive.org/web/20180709075151/https://www.billboard.com/articles/news/5800827/amas-twitter-traffic-ariana-grande-taylor-swift |url-status=live}}</ref> She released a four-song Christmas EP, ''[[Christmas Kisses (EP)|Christmas Kisses]]'' in December 2013.<ref>{{cite web |url=http://www.digitalspy.co.uk/music/news/a529329/ariana-grande-to-release-new-music-in-the-lead-up-to-christmas.html |title=Ariana Grande to release new music in the lead-up to Christmas |work=[[Digital Spy]] |date=November 6, 2013 |access-date=August 30, 2014 |archive-date=September 24, 2015 |archive-url=https://web.archive.org/web/20150924155746/http://www.digitalspy.co.uk/music/news/a529329/ariana-grande-to-release-new-music-in-the-lead-up-to-christmas.html }}</ref> Grande received the Breakthrough Artist of the Year award from the [[Music Business Association]], recognizing her achievements throughout 2013.<ref name="BillArtist13">{{cite magazine |url=https://www.billboard.com/biz/articles/news/legal-and-management/6052301/ariana-grande-to-be-awarded-breakthrough-artist-of |title=Ariana Grande to be Awarded 'Breakthrough Artist of the Year' by Music Business Association |last=Trakin |first=Roy |date=April 14, 2014 |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 30, 2014 |archive-date=January 27, 2015 |archive-url=https://web.archive.org/web/20150127075710/http://www.billboard.com/biz/articles/news/legal-and-management/6052301/ariana-grande-to-be-awarded-breakthrough-artist-of |url-status=live}}</ref> By January 2014, Grande had begun recording her second studio album, with singer-songwriter [[Ryan Tedder]] and record producers [[Benny Blanco]] and [[Max Martin]].<ref>{{cite web |url=http://www.musictimes.com/articles/3392/20140113/ariana-grande-twitter-announces-shes-working-second-album-studio.htm |title=Ariana Grande Twitter announces she's working on second album in studio |last=Menyes |first=Carolyn |date=January 13, 2014 |work=Music Times |access-date=January 14, 2014 |archive-date=April 5, 2019 |archive-url=https://web.archive.org/web/20190405004711/https://www.musictimes.com/articles/3392/20140113/ariana-grande-twitter-announces-shes-working-second-album-studio.htm |url-status=live}}</ref> The same month, she earned the Favorite Breakout Artist award at the [[40th People's Choice Awards|People's Choice Awards 2014]].<ref name="BillArtist13"/> In March 2014, Grande sang at the [[White House]] concert, "Women of Soul: In Performance at the White House".<ref>{{cite magazine |url=https://www.billboard.com/articles/news/5923162/aretha-franklin-ariana-grande-set-for-first-ladys-women-of-soul-concert |title=Aretha Franklin, Ariana Grande Set for First Lady's 'Women of Soul' Concert |date=March 4, 2014 |magazine=[[Billboard (magazine)|Billboard]] |access-date=March 5, 2014 |archive-date=July 9, 2018 |archive-url=https://web.archive.org/web/20180709084218/https://www.billboard.com/articles/news/5923162/aretha-franklin-ariana-grande-set-for-first-ladys-women-of-soul-concert |url-status=live}}</ref> The following month, President [[Barack Obama]] and First Lady [[Michelle Obama]] invited Grande again to perform at the White House for the [[Easter Egg Roll]] event.<ref>{{cite news |url=http://au.ibtimes.com/articles/549011/20140422/ariana-grande-without-knicker-easter-egg-roll.htm |title=Ariana Grande Sexy Legs on Display at Easter Egg Roll Event: Gushes About Jim Carrey |last=Singh |first=Sonalee |date=April 22, 2014 |newspaper=International Business Times |access-date=April 22, 2014 |archive-url=https://web.archive.org/web/20140424142618/http://au.ibtimes.com/articles/549011/20140422/ariana-grande-without-knicker-easter-egg-roll.htm |archive-date=April 24, 2014}}</ref>{{unreliable source|sure=yes|date=March 2026}}
Grande released her second studio album ''[[My Everything (Ariana Grande album)|My Everything]]'' on August 25, 2014; it debuted atop the ''Billboard'' 200 with 169,000 copies and received generally positive reviews.<ref>{{cite news |date=September 3, 2014 |title=Ariana Grande scores second chart-topping album on Billboard 200 |work=Reuters |url=https://www.reuters.com/article/us-music-arianagrande-charts-idINKBN0GY2DQ20140903 |access-date=July 26, 2023 |archive-date=July 26, 2023 |archive-url=https://web.archive.org/web/20230726002854/https://www.reuters.com/article/us-music-arianagrande-charts-idINKBN0GY2DQ20140903 |url-status=live}}</ref><ref>Attributed to:
* {{cite magazine |last=Sheffield |first=Rob |title=Ariana Grande's New Album: My Everything |url=https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 |archive-url=https://web.archive.org/web/20180617093135/https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 |archive-date=June 17, 2018 |access-date=August 23, 2014 |magazine=[[Rolling Stone]] |pages=59–60 |volume=August 28, 2014 |issue=1216 |issn=0035-791X}}
* {{cite web |last=Wood |first=Mikael |date=August 29, 2014 |title=Review: Ariana Grande makes big things happen on 'My Everything' |url=http://www.latimes.com/entertainment/music/posts/la-et-ms-review-ariana-grande-makes-big-things-happen-on-my-everything-20140829-story.html |url-status=live |archive-url=https://web.archive.org/web/20141006215304/http://www.latimes.com/entertainment/music/posts/la-et-ms-review-ariana-grande-makes-big-things-happen-on-my-everything-20140829-story.html |archive-date=October 6, 2014 |access-date=August 30, 2014 |work=[[Los Angeles Times]]}}
* {{cite web |last=Gardner |first=Elysa |date=August 25, 2014 |title=Ariana's 'My Everything' is all things to all fans |url=https://www.usatoday.com/story/life/music/2014/08/25/ariana-grande-my-everything-review-listen-up/14547907/ |url-status=live |archive-url=https://web.archive.org/web/20140825073145/http://www.usatoday.com/story/life/music/2014/08/25/ariana-grande-my-everything-review-listen-up/14547907/ |archive-date=August 25, 2014 |access-date=August 25, 2014 |newspaper=[[USA Today]]}}
* {{cite web |last=Garvey |first=Meaghan |date=August 29, 2014 |title=Ariana Grande: My Everything | Album Reviews |url=http://pitchfork.com/reviews/albums/19765-ariana-grande-my-everything/ |url-status=live |archive-url=https://web.archive.org/web/20140830043900/http://pitchfork.com/reviews/albums/19765-ariana-grande-my-everything/ |archive-date=August 30, 2014 |access-date=August 30, 2013 |website=[[Pitchfork (website)|Pitchfork]]}}</ref> She explored [[Electronic dance music|EDM]], [[dance-pop]], and [[Electro (music)|electro]] genres on the album.<ref>Attributed to:
* {{cite magazine |title=My Everything – Billboard Review |url=http://www.billboard.com/articles/review/6229287/ariana-grande-my-everything-billboard-album-review |url-status=live |archive-url=https://web.archive.org/web/20180625133909/https://www.billboard.com/articles/review/6229287/ariana-grande-my-everything-billboard-album-review |archive-date=June 25, 2018 |access-date=November 6, 2016 |magazine=[[Billboard (magazine)|Billboard]]}}
* {{cite news |title=Ariana Grande's 'My Everything': Album Review |url=http://www.nydailynews.com/entertainment/music/stars-ariana-grande-article-1.1912013 |url-status=live |archive-url=https://web.archive.org/web/20161107010724/http://www.nydailynews.com/entertainment/music/stars-ariana-grande-article-1.1912013 |archive-date=November 7, 2016 |access-date=November 6, 2016 |newspaper=[[New York Daily News]] |location=New York}}
* {{cite news |last1=Sawdey |first1=Evan |date=August 25, 2014 |title=Ariana Grande: My Everything | PopMatters |url=http://www.popmatters.com/review/185041-ariana-grande-my-everything |url-status=live |archive-url=https://web.archive.org/web/20160918071621/http://www.popmatters.com/review/185041-ariana-grande-my-everything/ |archive-date=September 18, 2016 |access-date=November 6, 2016 |work=[[PopMatters]]}}
* {{cite magazine |last=Lipshutz |first=Jason |date=April 28, 2014 |title=Ariana Grande Talks 'Problem' Single & Second Album, Due Out August/September |url=https://www.billboard.com/music/music-news/ariana-grande-talks-problem-single-second-album-due-out-6070079/ |url-status=live |archive-url=https://web.archive.org/web/20140501095225/http://www.billboard.com/articles/columns/pop-shop/6070079/ariana-grande-talks-problem-single-second-album-due-out |archive-date=May 1, 2014 |access-date=June 29, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Its lead single, "[[Problem (Ariana Grande song)|Problem]]" featuring Australian rapper [[Iggy Azalea]], peaked at number two on the ''Billboard'' Hot 100,<ref>{{cite magazine |last1=Trust |first1=Gary |title=Iggy Azalea Tops Hot 100 With 'Fancy,' Matches Beatles' Historic Mark |url=http://www.billboard.com/articles/news/6099390/iggy-azalea-tops-hot-100-fancy-matches-beatles |url-status=live |archive-url=https://web.archive.org/web/20150429012119/http://www.billboard.com/articles/news/6099390/iggy-azalea-tops-hot-100-fancy-matches-beatles |archive-date=April 29, 2015 |access-date=June 14, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and became Grande's first number-one on [[UK singles chart|the UK]] and [[Official Aotearoa Music Charts|New Zealand singles]] charts.<ref>{{cite web |last=Lane |first=Dan |date=July 6, 2014 |url=http://www.officialcharts.com/chart-news/ariana-grande-earns-a-place-in-official-chart-history-with-problem-3146/ |title=Ariana Grande earns a place in Official Chart history with Problem |archive-url=https://web.archive.org/web/20170601175201/http://www.officialcharts.com/chart-news/ariana-grande-earns-a-place-in-official-chart-history-with-problem__4302/ |archive-date=June 1, 2017 |publisher=[[Official Charts Company]] |access-date=November 23, 2015}}</ref><ref>{{cite web |date=May 5, 2014 |title=NZ Top 40 Singles Chart |url=https://aotearoamusiccharts.co.nz/archive/singles/2014-05-02 |url-status=live |archive-url=https://web.archive.org/web/20140502133815/http://nztop40.co.nz/chart/singles?chart=2493 |archive-date=May 2, 2014 |access-date=May 2, 2014 |publisher=[[Recorded Music NZ]]}}</ref> Selling 438,000 digital copies in its opening week, it achieved the highest first-week sales numbers of 2014<ref>{{cite magazine |last=Trust |first=Gary |date=May 7, 2014 |title=Hot 100: John Legend's "All Of Me" Hits No. 1, Ariana Grande's "Problem" Debuts At No. 3 |url=http://www.billboard.com/articles/news/6077635/hot-100-john-legend-all-of-me-ariana-grande-iggy-azalea |url-status=live |archive-url=https://web.archive.org/web/20140510180721/http://www.billboard.com/articles/news/6077635/hot-100-john-legend-all-of-me-ariana-grande-iggy-azalea |archive-date=May 10, 2014 |access-date=May 7, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and made Grande the youngest woman, at 20 years old, to debut with over 400,000 downloads at the time.<ref>{{cite magazine |last=Caulfield |first=Keith |title=Ariana Grande's 'Problem' Set for Record Sales Debut |url=http://www.billboard.com/articles/news/6077517/ariana-grande-problem-record-sales-debut-hot-100-chart |url-status=live |archive-url=https://web.archive.org/web/20180623010312/https://www.billboard.com/articles/news/6077517/ariana-grande-problem-record-sales-debut-hot-100-chart |archive-date=June 23, 2018 |access-date=May 6, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> "Problem" became 2014's eighth-best-selling digital single globally, with over 9 million copies sold, according to the [[International Federation of the Phonographic Industry]] (IFPI).<ref>{{cite web |date=April 14, 2015 |title=IFPI publishes Digital Music Report 2015 |url=http://www.ifpi.org/news/Global-digital-music-revenues-match-physical-format-sales-for-first-time |url-status=live |archive-url=https://web.archive.org/web/20150414194629/http://www.ifpi.org/news/Global-digital-music-revenues-match-physical-format-sales-for-first-time |archive-date=April 14, 2015 |access-date=April 15, 2015 |publisher=International Federation of the Phonographic Industry |page=12}}</ref> The album's second single, "[[Break Free (song)|Break Free]]", featuring German musician and producer [[Zedd]],<ref>{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-break-free-zedd-interview-video-new-single-problem-6128769/ |title=Ariana Grande's 'Break Free': Zedd Discusses The 'Problem' Follow-Up |last=Lipshutz |first=Jason |magazine=[[Billboard (magazine)|Billboard]] |date=June 23, 2014 |access-date=July 28, 2014 |archive-date=June 17, 2018 |archive-url=https://web.archive.org/web/20180617125940/https://www.billboard.com/articles/columns/pop-shop/6128769/ariana-grande-break-free-zedd-interview-video-new-single-problem |url-status=live}}</ref> was released on July 3 and reached number four in the United States.<ref name="TripleHot100">{{cite magazine |last=Trust |first=Gary |title=Ariana Grande, Iggy Azalea Triple Up In Hot 100's Top 10, MAGIC! Still No. 1 |url=https://www.billboard.com/articles/news/6221978/hot-100-ariana-grande-iggy-azalea-top-10-magic |magazine=[[Billboard (magazine)|Billboard]] |date=August 20, 2014 |access-date=August 20, 2014 |archive-date=June 13, 2018 |archive-url=https://web.archive.org/web/20180613083134/https://www.billboard.com/articles/news/6221978/hot-100-ariana-grande-iggy-azalea-top-10-magic |url-status=live}}</ref> She performed the song as the opening of the [[2014 MTV Video Music Awards]], and won [[Best Pop Video]] for "Problem".<ref>{{cite web |last=Ehrlich |first=Brenna |url=http://www.mtv.com/news/1909975/ariana-grande-best-pop-video-vma |title=Ponytail Princess Ariana Grande Wins Best Pop Video VMA |publisher=[[MTV]] |date=August 24, 2014 |access-date=September 2, 2014 |archive-date=September 16, 2019 |archive-url=https://web.archive.org/web/20190916084543/http://www.mtv.com/news/1909975/ariana-grande-best-pop-video-vma/ }}</ref> Grande and [[Nicki Minaj]] provided guest vocals on "[[Bang Bang (Jessie J, Ariana Grande and Nicki Minaj song)|Bang Bang]]", the lead single from [[Jessie J]]'s album ''[[Sweet Talker (Jessie J album)|Sweet Talker]]'',<ref>{{cite magazine |last=Lipshutz |first=Jason |title=Jessie J, Ariana Grande, Nicki Minaj Combine For 'Bang Bang' Single |url=https://www.billboard.com/music/music-news/jessie-j-ariana-grande-nicki-minaj-bang-bang-single-6141209/ |date=July 1, 2014 |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 20, 2014 |archive-date=June 17, 2018 |archive-url=https://web.archive.org/web/20180617124228/https://www.billboard.com/articles/columns/pop-shop/6141209/jessie-j-ariana-grande-nicki-minaj-bang-bang-single |url-status=live}}</ref> which peaked at number one in the UK and at number three in the US.<ref name="TripleHot100"/> The song was added to the deluxe version of ''My Everything'', serving as the third single from the album.<ref>{{cite magazine |last=Crow |first=Jones |date=April 28, 2015 |title=Five Hits, One Album: The Strategy Behind Ariana Grande's Singles From 'My Everything' |url=https://www.billboard.com/pro/five-hits-one-album-the-strategy-behind-ariana-grandes-singles/ |access-date=September 6, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 25, 2024 |archive-url=https://web.archive.org/web/20240325010234/https://www.billboard.com/pro/five-hits-one-album-the-strategy-behind-ariana-grandes-singles/ |url-status=live}}</ref> It was certified diamond by the RIAA in May 2024, for selling over 10 million units in the US; it marked the first all-female collaboration to achieve the certification.<ref>{{Cite magazine |last=Trapp |first=Malcom |date=May 23, 2024 |title=Jessie J, Nicki Minaj, And Ariana Grande's 'Bang Bang' Becomes First All-Female Collaboration To Be RIAA-Certified Diamond |url=https://www.rap-up.com/2024/05/23/nicki-minaj-earns-her-second-diamond-certification-with-bang-bang/ |access-date=September 6, 2024 |magazine=[[Rap-Up]] |archive-date=May 25, 2024 |archive-url=https://web.archive.org/web/20240525174028/https://www.rap-up.com/2024/05/23/nicki-minaj-earns-her-second-diamond-certification-with-bang-bang/ |url-status=live}}</ref> With the singles "Problem", "Break Free", and "Bang Bang", Grande became the second female artist in chart history, joining [[Adele]], with three top-ten singles simultaneously on the ''Billboard'' Hot 100 as a lead artist.<ref name="TripleHot100"/>
Grande was the musical performer on ''[[Saturday Night Live]]'', with [[Chris Pratt]] as the host on September 27, 2014.<ref>{{cite magazine |last=Reed |first=Ryan |title=Ariana Grande, Chris Pratt Set for 'Saturday Night Live' Premiere |url=https://www.rollingstone.com/tv/news/ariana-grande-chris-pratt-set-for-saturday-night-live-premiere-20140910 |magazine=[[Rolling Stone]] |date=September 10, 2014 |access-date=September 17, 2014 |archive-date=September 12, 2014 |archive-url=https://web.archive.org/web/20140912222951/http://www.rollingstone.com/tv/news/ariana-grande-chris-pratt-set-for-saturday-night-live-premiere-20140910 }}</ref> That same month, the fourth single from ''My Everything'', "[[Love Me Harder]]", featuring Canadian recording artist [[the Weeknd]], was released and peaked at number seven in the United States.<ref>{{cite magazine |last=Trust |first=Gary |title=Hot 100 Chart Moves: Ed Sheeran, Ariana Grande, Fergie Debut |url=https://www.billboard.com/pro/hot-100-ed-sheeran-ariana-grande-fergie/ |magazine=[[Billboard (magazine)|Billboard]] |date=October 17, 2014 |access-date=April 20, 2020 |archive-date=June 23, 2018 |archive-url=https://web.archive.org/web/20180623040146/https://www.billboard.com/articles/columns/chart-beat/6289067/hot-100-ed-sheeran-ariana-grande-fergie |url-status=live}}</ref> In November 2014, Grande was featured in [[Major Lazer]]'s song "[[All My Love (Major Lazer song)|All My Love]]" from the [[The Hunger Games: Mockingjay, Part 1 – Original Motion Picture Soundtrack|soundtrack album]] for the film ''[[The Hunger Games: Mockingjay – Part 1]]'' (2014).<ref name="spin">{{cite news |last=Carley |first=Brennan |date=November 13, 2014 |title=Major Lazer and Ariana Grande Team Up for Piercing 'Mockingjay' Cut |work=[[Spin (magazine)|Spin]] |url=https://www.spin.com/2014/11/ariana-grande-major-lazer-mockingjay-all-my-love-stream/ |access-date=May 18, 2018 |archive-date=August 17, 2023 |archive-url=https://web.archive.org/web/20230817074515/https://www.spin.com/2014/11/ariana-grande-major-lazer-mockingjay-all-my-love-stream/ |url-status=live}}</ref> Later that month, Grande released the Christmas song "[[Santa Tell Me]]" as a single from the [[reissue]] of her first Christmas EP, ''Christmas Kisses'' (2014).<ref>{{cite web |last1=White |first1=Caitlin |title=Ariana Grande's 'Santa Tell Me' Is Officially Here, and It Sounds Like Christmas Came Early! |url=http://www.mtv.com/news/2007283/ariana-grande-santa-tell-me/ |publisher=[[MTV]] |date=November 24, 2014 |access-date=November 30, 2014 |archive-date=April 1, 2019 |archive-url=https://web.archive.org/web/20190401033750/http://www.mtv.com/news/2007283/ariana-grande-santa-tell-me/ }}</ref> The track became a modern [[Standard (music)|Christmas standard]], significantly rising in popularity on streaming services during the holiday season every year.<ref>{{Cite magazine |last=Beck |first=Lia |date=November 2, 2022 |title=These Are the Best 33 Modern Christmas Songs to Add to Your Holiday Playlist |url=https://www.cosmopolitan.com/entertainment/music/a34287825/best-modern-christmas-songs/ |access-date=November 20, 2022 |magazine=[[Cosmopolitan (magazine)|Cosmopolitan]] |archive-date=September 18, 2025 |archive-url=https://web.archive.org/web/20250918153926/https://www.cosmopolitan.com/entertainment/music/a34287825/best-modern-christmas-songs/ |url-status=live}}</ref> A decade after its release, it reached number five on the Hot 100 issue dated January 4, 2025—being the first Christmas song released in the 21st century to appear in the chart's top-five region.<ref>{{Cite magazine |last=Trust |first=Gary |date=December 30, 2024 |title=Mariah Carey's 'All I Want for Christmas Is You' Adds 18th Week at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/lists/mariah-carey-all-i-want-for-christmas-is-you-hot-100-number-one-18-weeks/christmas-streams-airplay-sales-4/ |access-date=December 31, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 2, 2025 |archive-url=https://web.archive.org/web/20250102213414/https://www.billboard.com/lists/mariah-carey-all-i-want-for-christmas-is-you-hot-100-number-one-18-weeks/christmas-streams-airplay-sales-4/ |url-status=live}}</ref><ref>{{Cite magazine |last=Trust |first=Gary |date=December 30, 2024 |title=Here's Every Holiday Hit That Has Jingled to the Billboard Hot 100's Top 10 |url=https://www.billboard.com/lists/holiday-songs-hot-100-top-10/ |access-date=December 31, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 30, 2024 |archive-url=https://web.archive.org/web/20241230224013/https://www.billboard.com/lists/holiday-songs-hot-100-top-10/ |url-status=live}}</ref> The following month, she appeared on Nicki Minaj's third album ''[[The Pinkprint]]'', with the song "[[Get on Your Knees (Nicki Minaj song)|Get on Your Knees]]". She later released the fifth and the final single from ''My Everything'', "[[One Last Time (Ariana Grande song)|One Last Time]]", which peaked at number 13 in the US.<ref>{{cite magazine |url=https://www.billboard.com/artist/ariana-grande/chart-history/hot-100 |title=Ariana Grande – Chart History: The Hot 100 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 29, 2019 |archive-date=November 21, 2021 |archive-url=https://web.archive.org/web/20211121103915/https://www.billboard.com/artist/ariana-grande/chart-history/hot-100/ |url-status=live}}</ref>
[[File:Ariana Grande - The Honeymoon Tour Live Jakarta (3).jpg|thumb|upright|Grande performing on [[the Honeymoon Tour]] in 2015]]
In February 2015, Grande embarked on her first worldwide concert tour, [[The Honeymoon Tour]], to further promote ''My Everything'', with shows in North America, Europe, Asia and South America.<ref>{{cite news |last=Perdani |first=Yuliasri |title=Ariana Grande to debut in Jakarta soon |url=http://www.thejakartapost.com/news/2015/06/16/ariana-grande-debut-jakarta-soon.html |newspaper=[[The Jakarta Post]] |date=June 16, 2015 |access-date=June 29, 2015 |archive-date=October 24, 2019 |archive-url=https://web.archive.org/web/20191024222129/https://www.thejakartapost.com/news/2015/06/16/ariana-grande-debut-jakarta-soon.html |url-status=live}}</ref> Grande was featured on [[Cashmere Cat]]'s song [[Adore (Cashmere Cat song)|"Adore"]], which was released in March 2015.<ref>{{cite web |last1=McDermott |first1=Maeve |last2=Ryan |first2=Patrick |url=https://www.usatoday.com/story/life/music/2015/12/22/songs-of-the-year-2015/77689258/ |title=The 50 best songs of 2015 |work=[[USA Today]] |date=December 22, 2015 |access-date=August 24, 2017 |archive-date=December 9, 2019 |archive-url=https://web.archive.org/web/20191209190650/https://www.usatoday.com/story/life/music/2015/12/22/songs-of-the-year-2015/77689258/ |url-status=live}}</ref> In the spring, she signed an exclusive publishing contract with the [[Universal Music Publishing Group]], covering her entire music catalog.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/6583126/ariana-grande-signs-with-universal-music-publishing-group |title=Ariana Grande Signs with Universal Music Publishing Group |magazine=[[Billboard (magazine)|Billboard]] |date=June 1, 2015 |access-date=April 20, 2020 |archive-date=October 26, 2023 |archive-url=https://web.archive.org/web/20231026185044/https://pixels.ad.gt/api/v1/getpixels?tagger_id=fbf4aef3db1f9d87b19a37e2c9c2dc7f&url=https%3A%2F%2Fwww.billboard.com%2Fmusic%2Fmusic-news%2Fariana-grande-signs-with-universal-music-publishing-group-6583126%2F&code=%27none%27 |url-status=live}} and {{cite web |last1=Stassen |first1=Murray |title=Ariana Grande signs worldwide publishing deal with UMPG |url=http://www.musicweek.com/news/read/ariana-grande-signs-worldwide-publishing-deal-with-umpg/061935 |website=[[Music Week]] |date=June 2, 2015 |access-date=June 12, 2015 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213250/http://www.musicweek.com/news/read/ariana-grande-signs-worldwide-publishing-deal-with-umpg/061935 |url-status=live}}</ref> Grande also filmed an episode for the [[Fox Broadcasting Company]] reality TV series ''[[Knock Knock Live]]'' (2015),<ref name="KKL">{{cite web |last=Holloway |first=Daniel |url=https://www.thewrap.com/justin-bieber-ariana-grande-to-appear-on-ryan-seacrests-knock-knock-live |title=Justin Bieber, Ariana Grande to Appear on Ryan Seacrest's ''Knock Knock Live'' |website=[[TheWrap]] |date=July 14, 2015 |access-date=October 30, 2016 |archive-date=April 20, 2021 |archive-url=https://web.archive.org/web/20210420181148/https://www.thewrap.com/justin-bieber-ariana-grande-to-appear-on-ryan-seacrests-knock-knock-live/ |url-status=live}}</ref> but the show was canceled before her episode aired.<ref>{{cite web |last=Wagmeister |first=Elizabeth |url=https://variety.com/2015/tv/news/knock-knock-live-fox-cancelled-ryan-seacrest-1201553836/ |title=Fox Pulls Ryan Seacrest's ''Knock Knock Live'' After Two Episodes |work=[[Variety (magazine)|Variety]] |date=July 30, 2015 |access-date=December 10, 2017 |archive-date=November 22, 2019 |archive-url=https://web.archive.org/web/20191122013451/https://variety.com/2015/tv/news/knock-knock-live-fox-cancelled-ryan-seacrest-1201553836/ |url-status=live}}</ref> She also guest-starred on several episodes of the Fox [[comedy-horror]] television series ''[[Scream Queens (2015 TV series)|Scream Queens]]'' as [[Sonya Herfmann]]/Chanel #2 from September to November 2015.<ref name="ScreamQueens">{{cite magazine |last=Stack |first=Tim |date=April 24, 2015 |title=First Look: Ariana Grande on the set of Scream Queens |url=https://www.ew.com/article/2015/04/24/first-look-ariana-grande-scream-queens |archive-url=https://web.archive.org/web/20210419215425/https://ew.com/article/2015/04/24/first-look-ariana-grande-scream-queens/ |archive-date=April 19, 2021 |access-date=April 20, 2020 |magazine=[[Entertainment Weekly]]}}</ref> She recorded the duet "[[E Più Ti Penso]]" with Italian recording artist [[Andrea Bocelli]], which was released in October 2015 as the lead single from Bocelli's album ''[[Cinema (Andrea Bocelli album)|Cinema]]'' (2015),<ref>{{cite web |last=Mallenbaum |first=Carly |url=https://www.usatoday.com/story/life/entertainthis/2015/10/14/ariana-grande-andrea-bocelli/73929168/ |title=Ariana Grande has Italian duet with Andrea Bocelli. Of course it's good |work=[[USA Today]] |date=October 14, 2015 |access-date=August 24, 2017 |archive-date=December 8, 2019 |archive-url=https://web.archive.org/web/20191208022423/https://www.usatoday.com/story/life/entertainthis/2015/10/14/ariana-grande-andrea-bocelli/73929168/ |url-status=live}}</ref> and covered the song "Zero to Hero", originally from the [[animated film]] ''[[Hercules (1997 film)|Hercules]]'' (1997), for the compilation album ''[[We Love Disney (2015 album)|We Love Disney]]'' (2015).<ref>{{cite web |last=Glein |first=Kelsey |url=http://www.instyle.com/news/ariana-grande-gwen-stefani-we-love-disney-album |title=Gwen Stefani, Ariana Grande, and More Reimagine Your Favorite Disney Songs on New Album |work=[[InStyle]] |date=October 30, 2015 |access-date=October 30, 2015 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184549/https://www.instyle.com/news/ariana-grande-gwen-stefani-we-love-disney-album }}</ref> Grande also released her second Christmas EP, ''[[Christmas & Chill]]'' in December 2015.<ref>{{cite magazine |last=Spanos |first=Brittany |url=https://www.rollingstone.com/music/news/hear-ariana-grandes-surprise-released-ep-christmas-chill-20151217 |title=Hear Ariana Grande's Surprise-Released EP 'Christmas & Chill' |magazine=[[Rolling Stone]] |date=December 17, 2015 |access-date=August 24, 2017 |archive-date=June 16, 2018 |archive-url=https://web.archive.org/web/20180616204319/https://www.rollingstone.com/music/news/hear-ariana-grandes-surprise-released-ep-christmas-chill-20151217 }}</ref>
===2015–2018: ''Dangerous Woman'' and ''Sweetener''===
{{See also|Dangerous Woman {{!}} ''Dangerous Woman''|Manchester Arena bombing|One Love Manchester|Sweetener (album) {{!}} ''Sweetener'' (album)}}
Grande began recording songs for her third studio album, ''[[Dangerous Woman]]'', originally titled ''Moonlight'', in 2015.<ref>{{cite web |last=Roth |first=Madeline |title=Ariana Grande Revealed Her New Album Title – And It's Literally Out of This World |url=http://www.mtv.com/news/2173375/ariana-grande-third-album-title/ |publisher=[[MTV]] |access-date=May 30, 2015 |archive-url=https://web.archive.org/web/20150530221938/http://www.mtv.com/news/2173375/ariana-grande-third-album-title/ |archive-date=May 30, 2015 |date=May 30, 2015}}</ref> In October of that year, she released the single "[[Focus (Ariana Grande song)|Focus]]", initially intended as the lead single from the album; the song debuted at number seven on the ''Billboard'' Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/adele-hello-hot-100-second-week/ |title=Adele's 'Hello' Tops Hot 100 for Second Week; Ariana Grande, Meghan Trainor Hit Top 10 |magazine=[[Billboard (magazine)|Billboard]] |date=November 9, 2015 |access-date=April 20, 2020 |archive-date=May 7, 2016 |archive-url=https://web.archive.org/web/20160507132105/http://www.billboard.com/articles/columns/chart-beat/6754159/adele-hello-hot-100-second-week |url-status=live}}</ref> The next month American singer [[Who Is Fancy]] released the single "[[Boys Like You (Who Is Fancy song)|Boys Like You]]", which features Ariana Grande and [[Meghan Trainor]].<ref>{{cite web |url=http://www.m-magazine.com/posts/ariana-grande-teams-with-who-is-fancy-for-boys-like-you-song-77005 |title=Ariana Grande Teams With Who is Fancy For 'Boys Like You' Song |work=[[M Magazine]] |date=November 23, 2015 |access-date=November 23, 2015 |archive-url=https://web.archive.org/web/20151116015553/http://www.m-magazine.com/posts/ariana-grande-teams-with-who-is-fancy-for-boys-like-you-song-77005 |archive-date=November 16, 2015 |last=Thompson |first=Heather}}</ref> She was featured in the remix version of "[[Over and Over Again]]", a song by English singer [[Nathan Sykes]] from his solo debut studio album ''[[Unfinished Business (Nathan Sykes album)|Unfinished Business]]'', which was released in January 2016.<ref>{{cite magazine |last=Mallenbaum |first=Carly |url=https://www.rollingstone.com/music/music-news/hear-ariana-grande-join-ex-boyfriend-nathan-sykes-on-over-and-over-again-178484/ |title=Hear Ariana Grande Join Ex-Boyfriend Nathan Sykes on 'Over and Over Again' |magazine=[[Rolling Stone]] |date=January 16, 2016 |access-date=October 18, 2020 |archive-date=July 15, 2021 |archive-url=https://web.archive.org/web/20210715173115/https://www.rollingstone.com/music/music-news/hear-ariana-grande-join-ex-boyfriend-nathan-sykes-on-over-and-over-again-178484/ |url-status=live}}</ref> In March 2016, Grande released "[[Dangerous Woman (song)|Dangerous Woman]]" as the lead single from the retitled album of the same name.<ref>{{cite magazine |last=Nolfi |first=Joey |url=https://www.ew.com/article/2016/03/10/ariana-grande-dangerous-woman |title=Hear Ariana Grande's sultry new single 'Dangerous Woman' |magazine=Entertainment Weekly |date=March 10, 2016 |access-date=April 20, 2020 |archive-date=March 16, 2022 |archive-url=https://web.archive.org/web/20220316225641/https://ew.com/article/2016/03/10/ariana-grande-dangerous-woman/ |url-status=live}}; {{cite web |last=Geffen |first=Sasha |url=http://www.mtv.com/news/2753217/ariana-grande-dangerous-woman-single/ |title=Ariana Grande's 'Dangerous Woman' Is Here and It Deserves Its Own Spy Movie |publisher=[[MTV]] |date=March 11, 2016 |access-date=March 12, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213308/http://www.mtv.com/news/2753217/ariana-grande-dangerous-woman-single/ }}</ref><ref>{{cite web |url=https://music.apple.com/us/album/dangerous-woman/1440843597 |title=iTunes – Music – Dangerous Woman by Ariana Grande |publisher=[[iTunes Store]] (US) |access-date=March 10, 2016 |archive-date=March 27, 2019 |archive-url=https://web.archive.org/web/20190327111705/https://itunes.apple.com/us/album/dangerous-woman/id1091145606 |url-status=live}}</ref> The single debuted at number ten on the ''Billboard'' Hot 100, making her the first artist to have the lead single from each of their first three albums debut in the top ten.<ref name="FirstThree">{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/rihanna-hot-100-no-1-fifth-week-ariana-grande-debuts/ |title=Rihanna Rules Hot 100 for Fifth Week, Ariana Grande Debuts at No. 10 |magazine=[[Billboard (magazine)|Billboard]] |date=March 21, 2016 |access-date=April 20, 2020 |archive-date=May 6, 2021 |archive-url=https://web.archive.org/web/20210506170226/https://www.billboard.com/articles/columns/chart-beat/7263992/rihanna-hot-100-no-1-fifth-week-ariana-grande-debuts |url-status=live}}</ref> The same month, Grande appeared as host and musical guest of ''Saturday Night Live'', where she performed "Dangerous Woman" and debuted the promotional single "[[Be Alright (Ariana Grande song)|Be Alright]]",<ref>{{Cite magazine |date=February 25, 2016 |title=Ariana Grande to Host and Perform on 'Saturday Night Live' |url=https://time.com/4237667/ariana-grande-saturday-night-live-dangerous-woman-be-alright/ |access-date=April 3, 2024 |magazine=Time |archive-date=April 3, 2024 |archive-url=https://web.archive.org/web/20240403065746/https://time.com/4237667/ariana-grande-saturday-night-live-dangerous-woman-be-alright/ |url-status=live}}</ref> which charted at number 43 on the ''Billboard'' Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/hot-100-chart-moves-iggy-azalea-ariana-grande-debut/ |title=Hot 100 Chart Moves: Iggy Azalea & Ariana Grande Debut |magazine=[[Billboard (magazine)|Billboard]] |date=March 31, 2016 |access-date=April 20, 2020 |archive-date=October 26, 2023 |archive-url=https://web.archive.org/web/20231026185029/https://www.billboard.com/pro/hot-100-chart-moves-iggy-azalea-ariana-grande-debut/ |url-status=live}}</ref> Grande garnered positive reviews for her appearance on the show, including praise for her impressions of various singers,<ref>{{cite web |date=March 14, 2016 |title=Ariana Grande Incredibly Imitates Whitney, Celine, Britney and More |url=http://shows.huffingtonpost.com/video/ariana-grande-incredibly-imitates-whitney-celine-britney-and-more-519579275 |archive-url=https://web.archive.org/web/20231026185030/https://www.huffpost.com/section/video |archive-date=October 26, 2023 |access-date=March 15, 2016 |work=[[HuffPost]]}}</ref><ref>{{cite news |url=https://time.com/4257737/ariana-grande-saturday-night-live-review/ |title=Ariana Grande's Saturday Night Live Performance Was a Triumph |last1=D'Addario |first1=Daniel |access-date=March 15, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213248/http://time.com/4257737/ariana-grande-saturday-night-live-review/ |url-status=live }} {{Webarchive|url=https://web.archive.org/web/20190319213248/http://time.com/4257737/ariana-grande-saturday-night-live-review/ |date=March 19, 2019 }}</ref> some of which she had done on ''[[The Tonight Show Starring Jimmy Fallon]]''.<ref>{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-celebrity-impressions-watch-7256256/ |title=Watch All of Ariana Grande's Celebrity Impressions |last1=Iasimone |first1=Ashley |magazine=[[Billboard (magazine)|Billboard]] |date=March 13, 2016 |access-date=April 20, 2020 |archive-date=January 13, 2020 |archive-url=https://web.archive.org/web/20200113130800/https://www.billboard.com/articles/columns/pop/7256256/ariana-grande-celebrity-impressions-watch |url-status=live}}</ref>
[[File:Dangerous Woman Tour2.jpg|thumb|left|upright|Grande performing on the [[Dangerous Woman Tour]] in 2017]]
Grande released ''Dangerous Woman'' on May 20, 2016, which debuted at number two on the ''Billboard'' 200.<ref>{{cite magazine |last=Caulfield |first=Keith |url=https://www.billboard.com/pro/drake-views-no-1-on-billboard-200-album-chart-ariana-grande-blake-shelton/ |title=Drake's ''Views'' Still No. 1 on ''Billboard'' 200, Ariana Grande and Blake Shelton Debut at Nos. 2 & 3 |magazine=[[Billboard (magazine)|Billboard]] |date=May 29, 2016 |access-date=April 20, 2020 |archive-date=May 30, 2016 |archive-url=https://web.archive.org/web/20160530124854/https://www.billboard.com/articles/columns/chart-beat/7386082/drake-views-no-1-on-billboard-200-album-chart-ariana-grande-blake-shelton |url-status=live}}</ref> It also debuted at number two in Japan,<ref>{{cite web |url=http://www.oricon.co.jp/rank/ja/w/2016-05-30/ |title=週間 CDアルバムランキング: 2016年05月16日〜2016年05月22 |publisher=[[Oricon]] |archive-url=https://web.archive.org/web/20160525023530/http://www.oricon.co.jp/rank/ja/w/2016-05-30/ |archive-date=May 25, 2016}}</ref> and at number one in several other markets, including Australia, the Netherlands, Ireland, Italy, New Zealand and the UK.<ref>{{cite web |url=http://australian-charts.com/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |title=Ariana Grande – ''Dangerous Woman'' |website=australian-charts.com |access-date=May 29, 2016 |archive-date=May 4, 2019 |archive-url=https://web.archive.org/web/20190504013646/https://australian-charts.com/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |url-status=live}}; {{cite web |url=http://www.dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |title=Ariana Grande – ''Dangerous Woman'' |website=dutchcharts.nl |access-date=May 28, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319220316/https://dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |url-status=live}}; {{cite web |url=http://www.chart-track.co.uk/index.jsp?c=p%2Fmusicvideo%2Fmusic%2Farchive%2Findex_test.jsp&ct=240002&arch=t&lyr=2016&year=2016&week=21 |title=Top 100 Artist Album, Week Ending 26 May 2016 |work=Irish Music Charts Archive |access-date=May 29, 2016 |archive-url=https://web.archive.org/web/20181116092852/http://www.chart-track.co.uk/index.jsp?c=p%2Fmusicvideo%2Fmusic%2Farchive%2Findex_test.jsp&ct=240002&arch=t&lyr=2016&year=2016&week=21 |archive-date=November 16, 2018 }}; {{cite web |url=http://www.fimi.it/classifiche#/category:album/id:2256 |title=Album – Classifica settimanale WK 21 |publisher=[[Federazione Industria Musicale Italiana]] |access-date=May 28, 2016 |language=it |archive-date=February 3, 2019 |archive-url=https://web.archive.org/web/20190203185228/http://www.fimi.it/classifiche#/category:album/id:2256 |url-status=live}}; {{cite web |url=https://aotearoamusiccharts.co.nz/archive/albums/2011-11-11 |title=New Zealand Top 40 Albums Chart |archive-url=https://www.webcitation.org/67eErXXv7?url=http://nztop40.co.nz/chart/albums |archive-date=May 14, 2012 |publisher=Recorded Music New Zealand |access-date=May 29, 2016}}</ref><ref>{{cite web |last1=White |first1=Jack |publisher=[[Official Charts Company]] |title=Ariana Grande scores first Number 1 album with Dangerous Woman |url=http://www.officialcharts.com/chart-news/ariana-grande-scores-first-number-1-album-with-dangerous-woman__15171 |date=May 27, 2016 |access-date=June 1, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213259/https://www.officialcharts.com/chart-news/ariana-grande-scores-first-number-1-album-with-dangerous-woman__15171/ |url-status=live}}</ref> Mark Savage, writing for ''BBC News'', called the album "a mature, confident record".<ref name="Savage"/> In August, Grande released a third single from the album, "[[Side to Side]]", featuring rapper [[Nicki Minaj]], her eighth top ten entry on the Hot 100, which peaked at number four on that chart.<ref>{{cite magazine |url=https://www.billboard.com/charts/hot-100/2016-12-03 |title=The Hot 100: The Week of December 3, 2016 |magazine=[[Billboard (magazine)|Billboard]] |date=November 23, 2016 |access-date=April 20, 2020 |archive-date=August 12, 2020 |archive-url=https://web.archive.org/web/20200812162501/https://www.billboard.com/charts/hot-100/2016-12-03 |url-status=live}}</ref> ''Dangerous Woman'' was nominated for [[Grammy Award for Best Pop Vocal Album]] and the title track for [[Best Pop Solo Performance]].<ref name="GrammyNoms2017">{{cite magazine |url=https://www.billboard.com/articles/news/7597556/grammys-nominees-complete-list-2017 |title=Here Is the Complete List of Nominees for the 2017 Grammys |magazine=[[Billboard (magazine)|Billboard]] |date=December 6, 2016 |access-date=April 20, 2020 |archive-date=December 6, 2016 |archive-url=https://web.archive.org/web/20161206151125/http://www.billboard.com/articles/news/7597556/grammys-nominees-complete-list-2017 |url-status=live}}</ref>
Aside from music, Grande played Penny Pingleton in the NBC television broadcast ''[[Hairspray Live!]]'', which aired in December 2016.<ref>{{cite magazine |last=Saraiya |first=Sonia |url=https://variety.com/2016/tv/reviews/tv-review-hairspray-live-jennifer-hudson-ariana-grande-1201936567 |title=TV Review: ''Hairspray Live!'' |magazine=Variety |date=December 7, 2016 |access-date=December 10, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213944/https://variety.com/2016/tv/reviews/tv-review-hairspray-live-jennifer-hudson-ariana-grande-1201936567/ |url-status=live}}</ref> Grande recorded [[Beauty and the Beast (Disney song)#Ariana Grande and John Legend version|the title track]] of the soundtrack for the [[Beauty and the Beast (2017 film)|2017 live-action remake]] of Disney's 1991 animated film ''[[Beauty and the Beast (1991 film)|Beauty and the Beast]]''. The recording was released as a duet with American singer [[John Legend]] in February 2017.<ref>{{cite web |last=Stutz |first=Colin |url=https://www.hollywoodreporter.com/news/ariana-grande-john-legend-record-beauty-beast-duet-disney-film-963725 |title=Ariana Grande and John Legend to Record 'Beauty and the Beast' Duet for Disney Film |work=[[The Hollywood Reporter]] |date=January 11, 2017 |access-date=March 31, 2021 |archive-date=April 22, 2021 |archive-url=https://web.archive.org/web/20210422142238/https://www.hollywoodreporter.com/news/ariana-grande-john-legend-record-beauty-beast-duet-disney-film-963725 |url-status=live}}</ref> The same month, Grande embarked on her third concert tour, the [[Dangerous Woman Tour]], to promote the album.<ref>{{cite web |last=Kelemen |first=Matt |url=https://lasvegasmagazine.com/entertainment/2017/jan/27/ariana-grande-mgm-grand |title=Ariana Grande Is a Dangerous Talent |work=Las Vegas |date=January 27, 2017 |access-date=January 28, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213301/https://lasvegasmagazine.com/entertainment/2017/jan/27/ariana-grande-mgm-grand/ |url-status=live}}</ref>
On May 22, 2017, [[Manchester Arena bombing|her concert]] at [[Manchester Arena]] was the target of a [[suicide bombing]]. An [[Islamic extremist]], motivated by [[Muslim]] casualties from [[American-led intervention in the Syrian Civil War|US intervention in the Syrian Civil War]], detonated a [[nail bomb|shrapnel-laden]] [[homemade bomb]] as people were leaving the arena. The [[Manchester Arena bombing]], which occurred at the City Room, caused 22 deaths and injured over a thousand more. Grande suspended the remainder of the tour and held a televised benefit concert, [[One Love Manchester]], on June 4,<ref>{{cite web |url=https://www.hollywoodreporter.com/news/ariana-grandes-manchester-benefit-concert-draws-biggest-uk-tv-audience-2017-1010106 |title=Ariana Grande's Manchester Benefit Concert Draws Biggest U.K. TV Audience of 2017 |work=The Hollywood Reporter |date=June 5, 2017 |access-date=June 5, 2017 |archive-date=April 25, 2021 |archive-url=https://web.archive.org/web/20210425053824/https://www.hollywoodreporter.com/news/ariana-grandes-manchester-benefit-concert-draws-biggest-uk-tv-audience-2017-1010106 |url-status=live}}</ref> helping to raise $23 million to aid the bombing's victims and affected families.<ref name="FundsRaised">{{cite magazine |last=Blistein |first=Jon |url=https://www.rollingstone.com/music/news/families-of-ariana-grande-concert-attack-victims-to-receive-324000-w498012 |title=Families of Ariana Grande Concert Attack Victims to Receive $324,000 |magazine=[[Rolling Stone]] |date=August 15, 2017 |access-date=August 24, 2017 |archive-date=June 16, 2018 |archive-url=https://web.archive.org/web/20180616230556/https://www.rollingstone.com/music/news/families-of-ariana-grande-concert-attack-victims-to-receive-324000-w498012 }}</ref> The concert featured performances from Grande, as well as [[Liam Gallagher]], [[Robbie Williams]], [[Justin Bieber]], [[Katy Perry]], [[Miley Cyrus]] and other artists.<ref>{{cite magazine |last=Smirke |first=Richard |url=https://www.billboard.com/music/pop/one-love-manchester-concert-ariana-grande-bravery-resilience-7817617/ |title=Bravery, Resilience Shine as Ariana Grande Leads All-Star Benefit Concert for Victims of Manchester Bombing |magazine=[[Billboard (magazine)|Billboard]] |date=June 4, 2017 |access-date=April 20, 2020 |archive-date=April 22, 2021 |archive-url=https://web.archive.org/web/20210422142238/https://www.billboard.com/articles/columns/pop/7817617/one-love-manchester-concert-ariana-grande-bravery-resilience |url-status=live}}</ref> To recognize her efforts, the [[Manchester City Council]] named Grande the first [[honorary citizen]] of [[Manchester]]<ref>{{cite web |last=Macguire |first=Eoghan |url=https://www.nbcnews.com/storyline/manchester-concert-explosion/manchester-names-ariana-grande-honorary-citizen-n781711 |title=Manchester Names Ariana Grande Honorary Citizen |publisher=NBC News |date=July 12, 2017 |access-date=April 20, 2020 |archive-date=August 7, 2020 |archive-url=https://web.archive.org/web/20200807051027/https://www.nbcnews.com/storyline/manchester-concert-explosion/manchester-names-ariana-grande-honorary-citizen-n781711 |url-status=live}}</ref><ref name="FundsRaised"/> and, later in the year, she was reported to have declined an honorary UK [[dame]]hood. The tour resumed on June 7 in Paris and ended in September 2017.<ref>{{cite web |last=Lynch |first=Jess |url=http://www.cosmopolitan.com.au/celebrity/ariana-grande-resumes-dangerous-woman-world-tour-22609 |title=Ariana Grande proves she's an unstoppable force as she resumes her world tour |work=[[Cosmopolitan (magazine)|Cosmopolitan]] |date=June 7, 2017 |access-date=June 8, 2017 |archive-url=https://web.archive.org/web/20170608060705/http://www.cosmopolitan.com.au/celebrity/ariana-grande-resumes-dangerous-woman-world-tour-22609 |archive-date=June 8, 2017 }}; and {{cite web |last=Gonzalez |first=Sandra |url=http://www.cnn.com/2017/06/07/entertainment/ariana-grande-tour-resumes |title=Ariana Grande honors 'angels' as tour resumes |publisher=CNN |date=June 7, 2017 |access-date=June 7, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319215158/https://www.cnn.com/2017/06/07/entertainment/ariana-grande-tour-resumes |url-status=live}}; and {{cite magazine |url=https://www.billboard.com/articles/news/international/7949934/ariana-grande-first-tour-mainland-china |title=Ariana Grande Wraps Up First Tour of Mainland China |last=[[Billboard (magazine)|Billboard]] |magazine=[[Billboard (magazine)|Billboard]] |date=September 1, 2017 |access-date=April 20, 2020 |archive-date=April 27, 2021 |archive-url=https://web.archive.org/web/20210427032405/https://www.billboard.com/articles/news/international/7949934/ariana-grande-first-tour-mainland-china |url-status=live}}</ref><ref>{{cite web |last=Lakshmin |first=Deepa |url=http://www.mtv.com/news/3037300/ariana-grande-goodbye-dangerous-woman-tour |title=Ariana Grande Wrote A Beautiful Goodbye Note To Her Dangerous Woman Tour |publisher=[[MTV]] |date=September 21, 2017 |access-date=September 22, 2017 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184557/http://www.mtv.com/news/3037300/ariana-grande-goodbye-dangerous-woman-tour/ }}</ref>
In August 2017, Grande appeared in an [[Apple Music]] ''[[Carpool Karaoke]]'' episode, singing [[musical theatre]] songs with American entertainer [[Seth MacFarlane]].<ref name="Carpool">{{cite web |last=Fierberg |first=Ruthie |url=http://www.playbill.com/article/ariana-grande-and-seth-macfarlane-sing-little-shops-suddenly-seymour-on-carpool-karaoke |title=Ariana Grande and Seth MacFarlane Sing ''Little Shop's'' 'Suddenly Seymour' on ''Carpool Karaoke'' |work=[[People (magazine)|People]] |date=August 22, 2017 |access-date=August 23, 2017 |archive-date=September 7, 2019 |archive-url=https://web.archive.org/web/20190907084955/http://www.playbill.com/article/ariana-grande-and-seth-macfarlane-sing-little-shops-suddenly-seymour-on-carpool-karaoke |url-status=live}}</ref> In December 2017, ''[[Billboard (magazine)|Billboard]]'' magazine named her "Female Artist of the Year".<ref>{{cite web |last=McNeilage |first=Ross |url=https://www.mtv.co.uk/news/8pbxid/ariana-grande-is-billboards-female-artist-of-the-year |title=Ariana Grande Is Billboard's Female Artist of the Year |publisher=[[MTV]] |date=December 2, 2017 |access-date=December 13, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213256/http://www.mtv.co.uk/ariana-grande/news/ariana-grande-is-billboards-female-artist-of-the-year |url-status=live}}</ref>
Grande began working on songs for her fourth studio album, ''[[Sweetener (album)|Sweetener]]'' with [[Pharrell Williams]] in 2016.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/8470827/pharrell-on-working-with-ariana-grande-on-sweetener |title=Pharrell on Working With Ariana Grande on 'Sweetener': 'She Really Unzipped' |date=August 17, 2018 |access-date=September 20, 2018 |first=Rania |last=Aniftos |magazine=[[Billboard (magazine)|Billboard]] |archive-date=September 12, 2019 |archive-url=https://web.archive.org/web/20190912234835/https://www.billboard.com/articles/news/8470827/pharrell-on-working-with-ariana-grande-on-sweetener |url-status=live}}</ref> Grande released "[[No Tears Left to Cry]]" as the lead single from ''Sweetener'' in April 2018,<ref>{{cite magazine |last=Reed |first=Ryan |url=https://www.rollingstone.com/music/news/hear-ariana-grandes-uplifting-new-song-no-tears-left-to-cry-w519323 |title=Hear Ariana Grande's Uplifting New Song 'No Tears Left to Cry' |magazine=[[Rolling Stone]] |date=April 20, 2018 |access-date=April 20, 2018 |archive-date=June 12, 2018 |archive-url=https://web.archive.org/web/20180612140413/https://www.rollingstone.com/music/news/hear-ariana-grandes-uplifting-new-song-no-tears-left-to-cry-w519323 }}</ref> with the song debuting at number three on the ''Billboard'' Hot 100, making Grande the only artist to have debuted the lead single of her first four albums in the top ten of the Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/drake-nice-for-what-hot-100-number-one-ariana-grande-j-cole/ |title=Drake Leads ''Billboard'' Hot 100, Ariana Grande Arrives at No. 3 & J. Cole Collects Record Three Debuts in Top 10 |magazine=[[Billboard (magazine)|Billboard]] |date=April 30, 2018 |access-date=May 1, 2018 |archive-date=March 29, 2019 |archive-url=https://web.archive.org/web/20190329054545/https://www.billboard.com/articles/columns/chart-beat/8412480/drake-nice-for-what-hot-100-number-one-ariana-grande-j-cole |url-status=live}}</ref><ref>{{cite web |last=Nelson |first=Jeff |url=https://people.com/music/ariana-grande-the-light-is-coming-music-video-nicki-minaj |title=Ariana Grande Drops 'The Light Is Coming' Video, Frolics in the Woods with Nicki Minaj |work=[[People (magazine)|People]] |date=June 20, 2018 |access-date=June 20, 2018 |archive-date=June 28, 2019 |archive-url=https://web.archive.org/web/20190628170338/https://people.com/music/ariana-grande-the-light-is-coming-music-video-nicki-minaj/ |url-status=live}}</ref> In June 2018, she was featured in "[[Bed (Nicki Minaj song)|Bed]]", the second single from [[Nicki Minaj]]'s fourth studio album ''[[Queen (Nicki Minaj album)|Queen]]''.<ref>{{cite web |last=Kiefer |first=Halle |url=https://www.teenvogue.com/story/ariana-grande-nicki-minaj-just-released-their-new-single-bed |title=Ariana Grande and Nicki Minaj Just Released Their New Single, "Bed" |work=Teen Vogue |date=June 14, 2018 |access-date=October 18, 2020 |archive-date=September 28, 2020 |archive-url=https://web.archive.org/web/20200928202534/https://www.teenvogue.com/story/ariana-grande-nicki-minaj-just-released-their-new-single-bed |url-status=live}}</ref> The same month, she was featured on [[Troye Sivan]]'s single "[[Dance to This]]" from his sophomore album [[Bloom (Troye Sivan album)|''Bloom'']]. The second single, "[[God Is a Woman]]",<ref>{{cite web |last=Kiefer |first=Halle |url=https://www.vulture.com/2018/07/listen-to-ariana-grandes-new-song-god-is-a-woman.html |title=Listen to Ariana Grande's New Song 'God is a woman' |work=Vulture |date=July 13, 2018 |access-date=July 13, 2018 |archive-date=July 13, 2018 |archive-url=https://web.archive.org/web/20180713072630/http://www.vulture.com/2018/07/listen-to-ariana-grandes-new-song-god-is-a-woman.html |url-status=live}}</ref><ref>{{cite magazine |last=Whittum |first=Connor |url=https://www.billboard.com/articles/news/8465375/ariana-grande-epic-god-is-a-woman-video-decoded |title=Ariana Grande's Epic 'God Is a Woman' Video, Decoded |magazine=[[Billboard (magazine)|Billboard]] |date=July 13, 2018 |access-date=July 13, 2018 |archive-date=June 8, 2019 |archive-url=https://web.archive.org/web/20190608205133/https://www.billboard.com/articles/news/8465375/ariana-grande-epic-god-is-a-woman-video-decoded |url-status=live}}</ref> peaked at number 8 on the Hot 100 and became Grande's tenth top ten single in the US.<ref name=10thArianaBB>{{cite magazine |last=Zellner |first=Xander |url=https://www.billboard.com/pro/ariana-grande-10th-top-10-hit-10-songs-billboard-hot-100-chart/ |title=Ariana Grande Earns 10th Top 10 Hit, Lands 10 Songs on ''Billboard'' Hot 100 |magazine=[[Billboard (magazine)|Billboard]] |date=August 27, 2018 |access-date=August 27, 2018 |archive-date=June 14, 2019 |archive-url=https://web.archive.org/web/20190614121011/https://www.billboard.com/articles/columns/chart-beat/8472538/ariana-grande-10th-top-10-hit-10-songs-billboard-hot-100-chart |url-status=live}}</ref> Released in August 2018,<ref>{{cite magazine |last=Blistein |first=Jon |url=https://www.rollingstone.com/music/news/hear-ariana-grande-tap-nicki-minaj-for-snappy-the-light-is-coming-w521757 |title=Hear Ariana Grande Tap Nicki Minaj for Snappy 'The Light Is Coming' |magazine=[[Rolling Stone]] |date=June 20, 2018 |access-date=June 20, 2018 |archive-date=June 20, 2018 |archive-url=https://web.archive.org/web/20180620074213/https://www.rollingstone.com/music/news/hear-ariana-grande-tap-nicki-minaj-for-snappy-the-light-is-coming-w521757 }}; {{cite magazine |url=https://www.billboard.com/articles/news/8461868/ariana-grande-the-light-is-coming-featuring-nicki-minaj-stream |title=Ariana Grande Switches on 'The Light Is Coming' Featuring Nicki Minaj: Stream It Here |magazine=[[Billboard (magazine)|Billboard]] |date=June 20, 2018 |access-date=June 20, 2018 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319224851/https://www.billboard.com/articles/news/8461868/ariana-grande-the-light-is-coming-featuring-nicki-minaj-stream |url-status=live}}</ref> ''Sweetener'' debuted at number one on the ''Billboard'' 200<ref>{{cite magazine |last=Kreps |first=Daniel |url=https://www.rollingstone.com/music/music-news/on-the-charts-ariana-grandes-sweetener-opens-at-number-one-715957 |title=On the Charts: Ariana Grande's ''Sweetener'' Opens at Number One |magazine=[[Rolling Stone]] |date=August 26, 2018 |access-date=August 26, 2018 |archive-date=September 19, 2019 |archive-url=https://web.archive.org/web/20190919233603/https://www.rollingstone.com/music/music-news/on-the-charts-ariana-grandes-sweetener-opens-at-number-one-715957/ |url-status=live}}</ref> and received acclaim from critics.<ref>{{cite web |url=https://www.metacritic.com/music/sweetener/ariana-grande |title=Reviews for Sweetener by Ariana Grande |publisher=[[Metacritic]] |access-date=August 28, 2018 |archive-date=July 13, 2022 |archive-url=https://web.archive.org/web/20220713142434/https://www.metacritic.com/music/sweetener/ariana-grande |url-status=live}}</ref> She simultaneously charted nine songs from the album on the Hot 100, along with a collaboration, making her the fourth female artist to reach the ten-song mark.<ref name=10thArianaBB/> Grande gave four concerts to promote the album, billed as [[The Sweetener Sessions]], in New York City, Chicago, Los Angeles, and London between August 20 and September 4, 2018.<ref>{{cite magazine |last=Legaspi |first=Althea |url=https://www.rollingstone.com/music/music-news/ariana-grande-details-intimate-sweetener-sessions-concerts-708392 |title=Ariana Grande Details Intimate ''Sweetener Sessions'' Concerts |magazine=[[Rolling Stone]] |date=August 8, 2018 |access-date=August 22, 2018 |archive-date=June 29, 2019 |archive-url=https://web.archive.org/web/20190629161609/https://www.rollingstone.com/music/music-news/ariana-grande-details-intimate-sweetener-sessions-concerts-708392/ }}</ref> In October 2018, Grande participated in the NBC broadcast, ''[[A Very Wicked Halloween]]'', singing "[[The Wizard and I]]" from the musical ''[[Wicked (musical)|Wicked]]''.<ref>{{cite magazine |last=Lenker |first=Maureen Lee |url=https://ew.com/tv/2018/10/29/the-5-best-moments-in-a-very-wicked-halloween |title=The 5 best moments in ''A Very Wicked Halloween'' |magazine=Entertainment Weekly |date=October 29, 2018 |access-date=October 30, 2018 |archive-date=July 31, 2019 |archive-url=https://web.archive.org/web/20190731222946/https://ew.com/tv/2018/10/29/the-5-best-moments-in-a-very-wicked-halloween/ |url-status=live}}</ref> The following month, the BBC aired a one-hour special, ''[[Ariana Grande at the BBC]]'', featuring interviews and performances.<ref>{{cite web |last=Blair |first=Olivia |url=https://www.cosmopolitan.com/uk/entertainment/a24255798/ariana-grande-bbc-special |title=Ariana Grande has a one hour special airing on the BBC this week and it's a dream |website=Cosmopolitan |date=October 29, 2018 |access-date=October 30, 2018 |archive-date=November 2, 2019 |archive-url=https://web.archive.org/web/20191102012807/https://www.cosmopolitan.com/uk/entertainment/a24255798/ariana-grande-bbc-special/ |url-status=live}}</ref><ref name="AtTheBBC">{{cite web |last=Sporn |first=Natasha |url=https://www.standard.co.uk/stayingin/tvfilm/ariana-grande-at-the-bbc-why-davina-mccall-s-chat-with-star-is-a-must-watch-a3978191.html |title=Ariana Grande at the BBC: Why Davina McCall's chat with star is a must watch |website=Evening Standard |date=November 1, 2018 |access-date=November 2, 2018 |archive-date=June 5, 2019 |archive-url=https://web.archive.org/web/20190605060909/https://www.standard.co.uk/stayingin/tvfilm/ariana-grande-at-the-bbc-why-davina-mccall-s-chat-with-star-is-a-must-watch-a3978191.html |url-status=live}}</ref>
[[File:Ariana Grande - God Is A Woman VMA 2018 2.jpg|thumb|Grande performs "God Is A Woman" at the [[2018 MTV Video Music Awards]] in New York City.]]
=== 2018–2019: ''Thank U, Next'' ===
{{Main|Thank U, Next (album)|l1=''Thank U, Next'' (album)}}
In November 2018, Grande released the single "[[Thank U, Next (song)|Thank U, Next]]" and announced her [[Thank U, Next|fifth studio album of the same name]].<ref>{{cite magazine |url=https://www.billboard.com/articles/news/8483065/ariana-grande-new-album-thank-u-next |title=Ariana Grande Teases New Album 'Thank U, Next' |last=Stiernberg |first=Bonnie |date=November 3, 2018 |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 3, 2018 |archive-date=June 12, 2019 |archive-url=https://web.archive.org/web/20190612072957/https://www.billboard.com/articles/news/8483065/ariana-grande-new-album-thank-u-next |url-status=live}}</ref><ref>{{cite web |url=https://itunes.apple.com/us/album/thank-u-next/1441178207 |title=thank u, next – Single by Ariana Grande |date=November 3, 2018 |publisher=iTunes Store |access-date=November 4, 2018 |archive-date=November 4, 2018 |archive-url=https://web.archive.org/web/20181104135935/https://itunes.apple.com/us/album/thank-u-next/1441178207 }}</ref> The song debuted at number one on the ''Billboard'' Hot 100, becoming Grande's first chart-topping single in the United States, spending seven non-consecutive weeks atop.<ref>{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-thank-u-next-hot-100-first-number-one-debut/ |title=Ariana Grande Achieves First Billboard Hot 100 No. 1 as 'Thank U, Next' Debuts on Top |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 13, 2018 |archive-date=March 20, 2019 |archive-url=https://web.archive.org/web/20190320011137/https://www.billboard.com/articles/columns/chart-beat/8484401/ariana-grande-thank-u-next-hot-100-first-number-one-debut |url-status=live}}</ref><ref>{{cite magazine |url=https://www.billboard.com/artist/ariana-grande/chart-history/hsi/ |title=Chart History Ariana Grande |magazine=[[Billboard (magazine)|Billboard]] |access-date=February 2, 2020 |archive-date=November 22, 2021 |archive-url=https://web.archive.org/web/20211122194105/https://www.billboard.com/artist/ariana-grande/chart-history/hsi/ |url-status=live}}</ref> Since then, it has been certified eight-times platinum in the United States;<ref>{{cite news |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U,+Next#search_section |title=Gold & Platinum – Ariana Grande – Thank U, Next |publisher=Recording Industry Association of America |access-date=November 29, 2018 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184551/https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U,+Next#search_section |url-status=live}}</ref> the song's music video broke records for most-watched music video on YouTube within 24 hours of release<ref>{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-thank-u-next-biggest-music-video-debut-youtube-8488652/ |title=Ariana Grande's 'Thank U, Next' Has the Biggest Music Video Debut in YouTube History |magazine=[[Billboard (magazine)|Billboard]] |access-date=December 9, 2018 |archive-date=December 5, 2018 |archive-url=https://web.archive.org/web/20181205054721/https://www.billboard.com/articles/columns/pop/8488652/ariana-grande-thank-u-next-biggest-music-video-debut-youtube |url-status=live}}</ref> and fastest Vevo video to reach 100 million views on YouTube, at the time.<ref>{{cite news |url=https://www.reuters.com/article/us-music-ariana-grande-idUSKBN1O32FZ |title=Grande's 'thank u, next' bests Adele to fastest 100 million views |date=December 4, 2018 |work=Reuters |access-date=December 4, 2018 |archive-date=December 5, 2018 |archive-url=https://web.archive.org/web/20181205003529/https://www.reuters.com/article/us-music-ariana-grande-idUSKBN1O32FZ |url-status=live}}</ref> On [[Spotify]], it became the fastest song to reach 100 million streams (11 days) and most-streamed song by a female artist in a 24-hour period, with 9.6 million streams, before being surpassed by her own "[[7 Rings]]" (nearly 15 million streams).<ref>{{cite news |url=https://www.thefader.com/2018/11/15/ariana-grande-100m-spotify-streams-thank-u-next |title=Ariana Grande breaks 100 m Spotify streams record with "thank u, next" |work=[[Fader (magazine)|Fader]] |access-date=December 13, 2018 |archive-date=July 26, 2020 |archive-url=https://web.archive.org/web/20200726083850/https://www.thefader.com/2018/11/15/ariana-grande-100m-spotify-streams-thank-u-next |url-status=live}}</ref> "Thank U, Next" was the most-streamed song by a woman globally on [[Apple Music]] in 2019.<ref name="moststreamed2010s2">{{cite web |last=Amatulli |first=Jenna |date=December 3, 2019 |title=Ariana Grande Was The Most Streamed Female Artist Of The 2010s |url=https://www.huffpost.com/entry/ariana-grande-spotify-most-streamed-artist_n_5de6cd6ae4b0d50f32aa59af |access-date=June 19, 2020 |work=[[HuffPost]] |archive-date=May 22, 2020 |archive-url=https://web.archive.org/web/20200522200642/https://www.huffpost.com/entry/ariana-grande-spotify-most-streamed-artist_n_5de6cd6ae4b0d50f32aa59af |url-status=live}}</ref>
Grande released, in collaboration with [[YouTube]], a four-part docuseries titled ''[[Ariana Grande: Dangerous Woman Diaries]]''. It shows behind the scenes and concert footage from Grande's [[Dangerous Woman Tour]], including moments from the [[One Love Manchester]] concert, and follows her professional life during the tour and the making of ''Sweetener''. The series debuted on November 29, 2018.<ref>{{cite magazine |url=https://www.hollywoodreporter.com/live-feed/ariana-grande-docuseries-dangerous-woman-diaries-stream-youtube-1164416 |title=Ariana Grande Docuseries to Stream on YouTube |last=Jarvey |first=Natalie |magazine=The Hollywood Reporter |date=November 28, 2018 |access-date=November 29, 2018 |archive-date=November 29, 2018 |archive-url=https://web.archive.org/web/20181129011939/https://www.hollywoodreporter.com/live-feed/ariana-grande-docuseries-dangerous-woman-diaries-stream-youtube-1164416 |url-status=live}}</ref> By the end of the year, she became the most-streamed female artist on Spotify,<ref>{{cite magazine |url=https://www.billboard.com/music/music-news/spotify-2018-wrapped-most-streamed-stats-drake-ariana-grande-8488027/ |title=Spotify Announces 2018 'Wrapped' Most Streamed Stats: Drake & Ariana Grande Top the List |magazine=[[Billboard (magazine)|Billboard]] |date=December 4, 2022 |access-date=January 5, 2022 |archive-date=January 5, 2022 |archive-url=https://web.archive.org/web/20220105152631/https://www.billboard.com/music/music-news/spotify-2018-wrapped-most-streamed-stats-drake-ariana-grande-8488027/ |url-status=live}}</ref> and was named [[Billboard Women in Music|''Billboard''<nowiki/>'s Woman of the Year]]. In January 2019, it was announced that Grande would be headlining the [[Coachella Valley Music and Arts Festival]],<ref>{{cite web |url=https://pitchfork.com/news/coachella-announces-2019-lineup-one-artist-at-a-time/ |title=Coachella 2019: Full Lineup Announced |website=Pitchfork |date=January 2, 2019 |access-date=January 3, 2019 |archive-date=July 4, 2019 |archive-url=https://web.archive.org/web/20190704125803/https://pitchfork.com/news/coachella-announces-2019-lineup-one-artist-at-a-time/ |url-status=live}}</ref> where she became the youngest and the fourth female artist ever to headline the festival.<ref>{{cite web |url=https://www.elle.com/culture/celebrities/a25734322/ariana-grande-coachella-headliner/ |title=Ariana Grande Is Making History at Coachella This Year |website=[[Elle (magazine)|Elle]] |date=January 3, 2019 |access-date=January 3, 2019 |archive-date=August 16, 2019 |archive-url=https://web.archive.org/web/20190816000941/https://www.elle.com/culture/celebrities/a25734322/ariana-grande-coachella-headliner/ |url-status=live}}</ref> Grande brought a number of guest artists to perform with her, including [[NSYNC]], [[P. Diddy]], [[Nicki Minaj]], and [[Justin Bieber]]. Her set received critical acclaim.<ref>{{cite web |url=https://jezebel.com/ariana-grande-reportedly-raked-in-8-million-from-coach-1834063930 |title=Ariana Grande Reportedly Raked in $8 Million from Coachella |website=Jezebel |date=April 15, 2019 |access-date=June 18, 2019 |archive-date=August 22, 2019 |archive-url=https://web.archive.org/web/20190822224749/https://jezebel.com/ariana-grande-reportedly-raked-in-8-million-from-coach-1834063930 |url-status=live}}</ref><ref>{{cite web |url=https://pitchfork.com/news/watch-ariana-grande-bring-out-justin-bieber-at-coachella-2019/ |title=Watch Ariana Grande Bring Out Justin Bieber at Coachella 2019 |website=Pitchfork |date=April 22, 2019 |access-date=June 18, 2019 |archive-date=March 2, 2020 |archive-url=https://web.archive.org/web/20200302231206/https://pitchfork.com/news/watch-ariana-grande-bring-out-justin-bieber-at-coachella-2019/ |url-status=live}}</ref>
Grande's second single from ''Thank U, Next'', "[[7 Rings]]", was released on January 18, 2019, and debuted at number one on the ''Billboard'' Hot 100 issue dated February 2, becoming her second single in a row (and overall) to top the charts.<ref>{{cite web |url=https://www.mtv.co.uk/news/3ppkql/ariana-grande-breaks-her-own-record-again-with-7-rings |title=Ariana Grande breaks her own record (again) with '7 Rings' |date=January 19, 2019 |website=[[MTV]] UK |access-date=January 26, 2019 |archive-date=January 20, 2019 |archive-url=https://web.archive.org/web/20190120062405/http://www.mtv.co.uk/ariana-grande/news/ariana-grande-breaks-her-own-record-again-with-7-rings |url-status=live}}</ref> It made Grande the third female artist with multiple number-one debuts after Mariah Carey (3) and [[Britney Spears]] (2) and fifth artist overall after [[Justin Bieber]] and [[Drake (musician)|Drake]].<ref>{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-7-rings-hot-100-number-one-debut/ |title=Ariana Grande's '7 Rings' Soars In at No. 1 on Billboard Hot 100 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 29, 2019 |archive-date=January 27, 2020 |archive-url=https://web.archive.org/web/20200127072053/https://www.billboard.com/articles/columns/chart-beat/8495202/ariana-grande-7-rings-hot-100-number-one-debut |url-status=live}}</ref> Spending eight non-consecutive weeks at the summit, it became Grande's most successful song on the chart<ref>{{Cite magazine |last=Anderson |first=Trevor |date=June 26, 2024 |title=Ariana Grande's Biggest ''Billboard'' Hot 100 Hits |url=https://www.billboard.com/lists/ariana-grande-biggest-hits-hot-100/ |access-date=October 26, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 12, 2024 |archive-url=https://web.archive.org/web/20241212113751/https://www.billboard.com/lists/ariana-grande-biggest-hits-hot-100/ |url-status=live}}</ref> and was certified diamond in the US.<ref>{{Cite web |title=American single certifications – Ariana Grande – 7 Rings |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=7+Rings&format=Single&type=#search_section |access-date=August 26, 2024 |publisher=[[Recording Industry Association of America]] |archive-date=October 15, 2024 |archive-url=https://web.archive.org/web/20241015211936/https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=7+Rings&format=Single&type=#search_section |url-status=live}}</ref> "7 Rings" became 2019's fifth-best-selling song globally, and one of the [[List of best-selling singles|best-selling digital singles worldwide]].<ref>{{cite magazine |last=Cirisano |first=Tatiana |date=March 10, 2020 |title=Billie Eilish's 'Bad Guy' Named IFPI's Biggest Global Single of 2019 |url=http://www.billboard.com/articles/news/international/9331529/billie-eilish-bad-guy-ifpi-global-single-2019-list |access-date=August 26, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 11, 2020 |archive-url=https://web.archive.org/web/20200311104939/https://www.billboard.com/articles/news/international/9331529/billie-eilish-bad-guy-ifpi-global-single-2019-list |url-status=live}}</ref> ''Thank U, Next'' was released on February 8, 2019, and debuted at number one on the [[Billboard 200|''Billboard'' 200]] while receiving acclaim from critics.<ref name="Metacritic">{{cite web |url=https://www.metacritic.com/music/thank-u-next/ariana-grande |title=Reviews for thank u, next by Ariana Grande |publisher=[[Metacritic]] |access-date=February 11, 2019 |archive-date=March 21, 2019 |archive-url=https://web.archive.org/web/20190321113505/https://www.metacritic.com/music/thank-u-next/ariana-grande |url-status=live}}</ref> The album garnered Grande's largest sales week of all time in the United States (360,000 album-equivalent units).<ref name="BB2002">{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-thank-u-next-debuts-at-no-1-on-billboard-200-chart-album/ |title=Ariana Grande's 'Thank U, Next' Debuts at No. 1 on Billboard 200 Chart With Biggest Streaming Week Ever for a Pop Album |magazine=[[Billboard (magazine)|Billboard]] |last=Caulfield |first=Keith |date=February 17, 2019 |access-date=February 18, 2019 |archive-date=January 5, 2020 |archive-url=https://web.archive.org/web/20200105210938/https://www.billboard.com/articles/columns/chart-beat/8498762/ariana-grande-thank-u-next-debuts-at-no-1-on-billboard-200-chart-album |url-status=live}}</ref> Her fourth number-one album, and second in less than six months, it marked the shortest gap between number-one albums for a woman at the time. ''Thank U, Next'' broke records for the largest streaming week for a pop album and for a female album in the US, with 307 million on-demand streams.<ref name="BB2002"/> At the time, it was the only non-hip hop title among the twenty largest US album streaming weeks, at number eight.<ref name="BB2002"/> The album also achieved the largest streaming week by a female artist in Canada and the United Kingdom.<ref>{{cite web |last=Copsey |first=Rob |date=February 15, 2019 |title=Ariana Grande scores a record-breaking week with Thank U, Next on the Official Chart |url=https://www.officialcharts.com/chart-news/ariana-grande-scores-a-record-breaking-week-with-thank-u-next-on-the-official-chart__25567/ |access-date=October 10, 2024 |publisher=[[Official Charts Company]] |archive-date=February 16, 2019 |archive-url=https://web.archive.org/web/20190216094129/https://www.officialcharts.com/chart-news/ariana-grande-scores-a-record-breaking-week-with-thank-u-next-on-the-official-chart__25567/ |url-status=live}}</ref><ref>{{cite web |title=2019 Nielsen Music/MRC Data Canada Year-End Report |url=https://static.billboard.com/files/pdfs/NIELSEN_2019_YEARENDreportCANADA.pdf |url-status=live |archive-url=https://web.archive.org/web/20200402131151/https://static.billboard.com/files/pdfs/NIELSEN_2019_YEARENDreportCANADA.pdf |archive-date=April 2, 2020 |access-date=April 2, 2020 |publisher=[[Nielsen Holdings|Nielsen]]}}</ref> In June 2020, ''Thank U, Next'' was certified double platinum by the RIAA.<ref>{{Cite web |title=American album certifications – Ariana Grande – Thank U, Next |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U%2C+Next&format=Album&type=#search_section |access-date=October 10, 2024 |publisher=[[Recording Industry Association of America]] |archive-date=December 13, 2024 |archive-url=https://web.archive.org/web/20241213225131/https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U%2C+Next&format=Album&type=#search_section |url-status=live}}</ref>
Grande became the first solo artist to occupy the top three spots on the ''Billboard'' Hot 100 with "7 Rings" at number one, her third single "[[Break Up with Your Girlfriend, I'm Bored]]" debuting at number two, and her lead single "Thank U, Next" rose to number three, and the overall second artist to do so since [[the Beatles]] did in 1964 when they occupied the top five spots.<ref name="B19">{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-top-3-spots-hot-100/ |title=Ariana Grande Claims Nos. 1, 2 & 3 on Billboard Hot 100, Is First Act to Achieve the Feat Since The Beatles in 1964 |magazine=[[Billboard (magazine)|Billboard]] |last=Trust |first=Gary |date=February 19, 2019 |access-date=February 19, 2019 |archive-date=April 5, 2019 |archive-url=https://web.archive.org/web/20190405153906/https://www.billboard.com/articles/columns/chart-beat/8498841/ariana-grande-top-3-spots-hot-100 |url-status=live}}</ref> In the United Kingdom, Grande became the second female solo artist to simultaneously hold the number one and two spots and the first musical artist to replace herself at number one, twice consecutively.<ref>{{cite web |url=https://www.independent.co.uk/arts-entertainment/music/ariana-grande-chart-uk-thank-u-next-new-album-break-up-girlfriend-bored-a8781931.html |title=Ariana Grande just made UK chart history |date=February 15, 2019 |website=The Independent |access-date=February 28, 2019 |archive-date=March 18, 2020 |archive-url=https://web.archive.org/web/20200318185225/https://www.independent.co.uk/arts-entertainment/music/ariana-grande-chart-uk-thank-u-next-new-album-break-up-girlfriend-bored-a8781931.html |url-status=live}}</ref> With eleven ''Thank U, Next'' tracks appearing within the top 40 region on the Hot 100, Grande broke the record for the most simultaneous top 40 entries by a female artist.<ref name=MostTop40>{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-most-simultaneous-top-40-hot-100-hits/ |title=Ariana Grande Breaks Record For Most Simultaneous Top 40 ''Billboard'' Hot 100 Hits by a Female Artist |last=Trust |first=Gary |date=February 19, 2019 |magazine=[[Billboard (magazine)|Billboard]] |access-date=February 19, 2019 |archive-date=February 27, 2020 |archive-url=https://web.archive.org/web/20200227084537/https://www.billboard.com/articles/columns/chart-beat/8498842/ariana-grande-most-simultaneous-top-40-hot-100-hits |url-status=live}}</ref>
In February 2019, it was reported Grande would not attend the [[61st Annual Grammy Awards|Grammy Awards]] after she had a disagreement with producers over a potential performance at the ceremony.<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-not-attending-grammys-insulted-790743/ |title=Ariana Grande Not Attending Grammys After Producers 'Insulted' Her |magazine=[[Rolling Stone]] |last=Kreps |first=Daniel |date=February 6, 2019 |access-date=October 18, 2020 |archive-date=August 31, 2020 |archive-url=https://web.archive.org/web/20200831033521/https://www.rollingstone.com/music/music-news/ariana-grande-not-attending-grammys-insulted-790743/ |url-status=live}}</ref> Grande ended up earning her first Grammy, for [[Best Pop Vocal Album]], for ''Sweetener''.<ref>{{cite web |title=Grammys 2019: Ariana Grande Wins First Grammy |url=https://pitchfork.com/news/grammys-2019-ariana-grande-wins-best-pop-vocal-album/ |date=February 10, 2019 |website=[[Pitchfork (website)|Pitchfork]] |access-date=February 10, 2019 |archive-date=January 25, 2020 |archive-url=https://web.archive.org/web/20200125024153/https://pitchfork.com/news/grammys-2019-ariana-grande-wins-best-pop-vocal-album/ |url-status=live}}</ref> The same month, Grande won a [[Brit Award]] for [[Brit Award for International Female Solo Artist|International Female Solo Artist]].<ref>{{cite magazine |url=https://www.billboard.com/articles/news/awards/8499271/brit-awards-2019-winners-list |title=Brit Awards 2019 Winners: The Complete List |magazine=[[Billboard (magazine)|Billboard]] |last=Lynch |first=Joe |date=February 20, 2019 |access-date=February 20, 2019 |archive-date=February 21, 2019 |archive-url=https://web.archive.org/web/20190221122208/https://www.billboard.com/articles/news/awards/8499271/brit-awards-2019-winners-list |url-status=live}}</ref> She also embarked on her third headlining tour, the [[Sweetener World Tour]], to promote both ''Sweetener'' and ''Thank U, Next'', which began on March 18,<ref>{{cite magazine |last=Brandle |first=Lars |url=https://www.billboard.com/articles/news/8481638/ariana-grande-sweetener-tour-dates |title=Ariana Grande Announces 'Sweetener' World Tour: See the Dates |magazine=[[Billboard (magazine)|Billboard]] |date=October 25, 2018 |access-date=October 25, 2018 |archive-date=March 29, 2019 |archive-url=https://web.archive.org/web/20190329110149/https://www.billboard.com/articles/news/8481638/ariana-grande-sweetener-tour-dates |url-status=live}}</ref> and concluded on December 22, 2019.<ref>{{Cite magazine |last=Phull |first=Hardeep |date=December 23, 2019 |title=Ariana Grande Closes Sweetener World Tour in Los Angeles With Tears and Hits Aplenty |url=https://www.billboard.com/pro/last-show-ariana-grande-sweetener-tour-recap/ |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=May 25, 2022 |archive-url=https://web.archive.org/web/20220525014350/https://www.billboard.com/pro/last-show-ariana-grande-sweetener-tour-recap/ |url-status=live}}</ref> Spanning 97 shows through North America and Europe, it grossed US$146.6 million with over 1.3 million tickets sold, marking Grande's highest-grossing and biggest tour to date.<ref>{{Cite magazine |last=Frankenberg |first=Eric |date=January 23, 2020 |title=The Sweetener World Tour Finishes as Ariana Grande's Biggest Yet: Final Numbers Are In |url=https://www.billboard.com/articles/business/chart-beat/8548830/sweetener-world-tour-ariana-grande-biggest |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 23, 2020 |archive-url=https://web.archive.org/web/20200123225815/https://www.billboard.com/articles/business/chart-beat/8548830/sweetener-world-tour-ariana-grande-biggest |url-status=live}}</ref> A live album of the tour's setlist, titled ''[[K Bye for Now (SWT Live)]]'', was released on December 23.<ref>{{Cite web |last1=Hussey |first1=Allison |last2=Monroe |first2=Jazz |date=December 23, 2019 |title=Ariana Grande Releases New Live Album k bye for now |url=https://pitchfork.com/news/ariana-grande-releases-new-live-album-k-bye-for-now/ |access-date=October 11, 2024 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=September 7, 2021 |archive-url=https://web.archive.org/web/20210907202836/https://pitchfork.com/news/ariana-grande-releases-new-live-album-k-bye-for-now/ |url-status=live}}</ref> Grande was nominated for 9 awards at the [[2019 Billboard Music Awards|2019 ''Billboard'' Music Awards]], including [[Billboard Music Award for Top Artist|Top Artist]]. She would win two awards for [[Billboard Music Award for Chart Achievement|''Billboard'' Chart Achievement]] and [[Billboard Music Award for Top Female Artist|Top Female Artist]] on May 1, 2019.<ref name="billboard_8509655">{{cite magazine |last=Lynch |first=Joe |url=https://www.billboard.com/articles/news/awards/8509655/billboard-music-awards-2019-winners-list |title=2019 Billboard Music Awards Winners: The Complete List |magazine=[[Billboard (magazine)|Billboard]] |date=May 1, 2019 |access-date=May 2, 2019 |archive-date=May 16, 2019 |archive-url=https://web.archive.org/web/20190516041948/https://www.billboard.com/articles/news/awards/8509655/billboard-music-awards-2019-winners-list |url-status=live}}</ref> Grande performed at the event via a pre-recorded performance from her Sweetener World Tour.<ref>{{cite magazine |last=Daw |first=Stephen |url=https://www.billboard.com/articles/news/awards/8509712/ariana-grande-performance-7-rings-2019-bbmas |title=Ariana Grande Gives Epic Performance Of '7 Rings' at the 2019 BBMAs: Watch |magazine=[[Billboard (magazine)|Billboard]] |date=May 1, 2019 |access-date=May 2, 2019 |archive-date=May 27, 2019 |archive-url=https://web.archive.org/web/20190527055932/https://www.billboard.com/articles/news/awards/8509712/ariana-grande-performance-7-rings-2019-bbmas |url-status=live}}</ref>
Grande co-executive produced [[Charlie's Angels: Original Motion Picture Soundtrack|the soundtrack]] to the film ''[[Charlie's Angels (2019 film)|Charlie's Angels]]'', which was released on November 1, 2019; she co-wrote and performed various songs for the record.<ref>{{cite web |last=Minsker |first=Evan |date=October 11, 2019 |title=Ariana Grande Details ''Charlie's Angels'' Soundtrack: Nicki Minaj, Chaka Khan, Normani, More |url=https://pitchfork.com/news/ariana-grande-details-charlies-angels-soundtrack-nicki-minaj-chaka-khan-normani-more/ |access-date=October 10, 2024 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=October 11, 2019 |archive-url=https://web.archive.org/web/20191011045012/https://pitchfork.com/news/ariana-grande-details-charlies-angels-soundtrack-nicki-minaj-chaka-khan-normani-more/ |url-status=live}}</ref> The soundtrack was met with lukewarm reception.<ref>{{cite magazine |last=Amorosi |first=A.D. |date=November 1, 2019 |title=Album Review: 'Charlie's Angels: Original Motion Picture Soundtrack' |url=https://variety.com/2019/music/reviews/charlies-angels-soundtrack-album-review-ariana-grande-1203390153/ |access-date=October 10, 2024 |magazine=[[Variety (magazine)|Variety]] |archive-date=January 8, 2020 |archive-url=https://web.archive.org/web/20200108021431/https://variety.com/2019/music/reviews/charlies-angels-soundtrack-album-review-ariana-grande-1203390153/ |url-status=live}}</ref><ref>{{cite web |last=Torres |first=Eric |date=November 7, 2019 |title=Various Artists: Charlie's Angels (Original Motion Picture Soundtrack) Album Review |url=https://pitchfork.com/reviews/albums/various-artists-charlies-angels-original-motion-picture-soundtrack/ |access-date=October 10, 2024 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=January 4, 2020 |archive-url=https://web.archive.org/web/20200104051217/https://pitchfork.com/reviews/albums/various-artists-charlies-angels-original-motion-picture-soundtrack/ |url-status=live}}</ref> A collaboration with [[Miley Cyrus]] and [[Lana Del Rey]], titled "[[Don't Call Me Angel]]", was released as the lead single on September 13.<ref>{{cite web |last1=Schatz |first1=Lake |date=September 13, 2019 |title=Ariana Grande, Lana Del Rey, and Miley Cyrus premiere new song "Don't Call Me Angel": Stream |url=https://consequence.net/2019/09/ariana-lana-miley-dont-call-me-angel-stream/ |access-date=October 10, 2024 |work=[[Consequence of Sound]] |archive-date=December 12, 2024 |archive-url=https://web.archive.org/web/20241212064616/https://consequence.net/2019/09/ariana-lana-miley-dont-call-me-angel-stream/ |url-status=live}}</ref> ''[[Pitchfork (website)|Pitchfork]]'' wrote that the pop stars "meet at a lower creative common denominator than they've enjoyed lately".<ref>{{cite web |last1=Anderson |first1=Stacey |date=September 13, 2019 |title="Don't Call Me Angel" by Ariana Grande / Lana Del Rey / Miley Cyrus Review |url=https://pitchfork.com/reviews/tracks/ariana-grande-lana-del-rey-miley-cyrus-dont-call-me-angel/ |access-date=October 10, 2024 |website=Pitchfork |archive-date=February 14, 2020 |archive-url=https://web.archive.org/web/20200214182852/https://pitchfork.com/reviews/tracks/ariana-grande-lana-del-rey-miley-cyrus-dont-call-me-angel/ |url-status=live}}</ref> The track was nominated for [[Satellite Award for Best Original Song|Best Original Song]] at the [[24th Satellite Awards]].<ref>{{cite web |date=December 19, 2019 |title=2019 Winners |url=https://www.pressacademy.com/2019-ipa-awards/ |access-date=October 10, 2024 |website=Satellite Awards |publisher=[[International Press Academy]] |archive-date=December 19, 2019 |archive-url=https://web.archive.org/web/20191219204231/https://www.pressacademy.com/2019-ipa-awards/ |url-status=live}}</ref> In August 2019, she released the single "[[Boyfriend (Ariana Grande and Social House song)|Boyfriend]]" with pop duo [[Social House]];<ref>{{Cite web |last=Allaire |first=Christian |date=August 2, 2019 |title=Ariana Grande and Social House Release "Boyfriend"—A New Song About Crippling Crushes |url=https://www.vogue.com/article/ariana-grande-social-house-boyfriend-music-video |url-status=live |archive-url=https://web.archive.org/web/20240402005312/https://www.vogue.com/article/ariana-grande-social-house-boyfriend-music-video |archive-date=April 2, 2024 |access-date=April 2, 2024 |magazine=Vogue}}</ref> it debuted at number eight on the Hot 100,<ref>{{Cite magazine |last=Zellner |first=Xander |date=August 13, 2019 |title=A History of Boyfriends & Girlfriends on the Hot 100, From 'My Boyfriend's Back' to 'Break Up With Your Girlfriend' |url=https://www.billboard.com/pro/boyfriend-girlfriend-hot-100-chart-history-ariana-grande-social-house/ |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 17, 2024 |archive-url=https://web.archive.org/web/20241217195242/https://www.billboard.com/pro/boyfriend-girlfriend-hot-100-chart-history-ariana-grande-social-house/ |url-status=live}}</ref> and became the first song by a woman to top the [[Rolling Stone Top 100|''Rolling Stone'' Top 100]] chart.<ref>{{Cite magazine |date=August 12, 2019 |title=RS Charts: Ariana Grande and Social House's 'Boyfriend' is Number One on Top 100 |url=https://www.rollingstone.com/music/music-news/rs-charts-top-100-ariana-grande-social-house-drake-870557/ |access-date=October 10, 2024 |magazine=[[Rolling Stone]] |archive-date=September 13, 2019 |archive-url=https://web.archive.org/web/20190913224019/https://www.rollingstone.com/music/music-news/rs-charts-top-100-ariana-grande-social-house-drake-870557/ |url-status=live}}</ref> Grande co-wrote singer [[Normani]]'s debut solo single "[[Motivation (Normani song)|Motivation]]", which was released on August 16, 2019.<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-feature-normani-next-single-869177/ |title=Normani Reveals Ariana Grande Wrote on Her New Single |last=Holmes |first=Charles |magazine=[[Rolling Stone]] |date=August 8, 2019 |access-date=August 9, 2019 |archive-date=December 11, 2019 |archive-url=https://web.archive.org/web/20191211202222/https://www.rollingstone.com/music/music-news/ariana-grande-feature-normani-next-single-869177/ |url-status=live}}</ref> Grande won three awards at the [[2019 MTV Video Music Awards]], including the Artist of the Year award. She was nominated for 12 awards in total, including Video of the Year for "Thank U, Next".<ref>{{cite web |last=Nordyke |first=Kimberly |url=https://www.hollywoodreporter.com/lists/mtv-vmas-2019-winners-list-updating-1229669/item/best-direction-1229724 |title=MTV Video Music Awards: Taylor Swift, Jonas Brothers, Cardi B Among Winners |date=August 26, 2019 |access-date=August 26, 2019 |magazine=The Hollywood Reporter |archive-date=August 27, 2019 |archive-url=https://web.archive.org/web/20190827052809/https://www.hollywoodreporter.com/lists/mtv-vmas-2019-winners-list-updating-1229669/item/best-direction-1229724 |url-status=live}}</ref>
Grande was featured on the remix of American singer and rapper [[Lizzo]]'s song "[[Good as Hell]]", which was released on October 25, 2019.<ref>{{Cite web |last=Legaspi |first=Althea |date=October 25, 2019 |title=Hear Lizzo and Ariana Grande's Romping New Remix of 'Good As Hell' |url=https://www.rollingstone.com/music/music-news/lizzo-ariana-grande-good-as-hell-remix-903647/ |access-date=April 2, 2024 |magazine=[[Rolling Stone]] |archive-date=June 8, 2023 |archive-url=https://web.archive.org/web/20230608041413/https://www.rollingstone.com/music/music-news/lizzo-ariana-grande-good-as-hell-remix-903647/ |url-status=live}}</ref> By the end of the year, ''[[Billboard (magazine)|Billboard]]'' named Grande the most accomplished female artist to debut in the 2010s, while ''[[NME]]'' named her one of the defining music artists of the decade. She also became the most-streamed female artist of the decade on music streaming service Spotify.<ref name="billboard.com"/><ref>{{cite web |url=https://www.nme.com/features/nmes-10-artists-who-defined-the-decade-the-2010s-2583451 |title=''NME''<nowiki/>'s 10 Artists Who Defined The Decade: The 2010s |last=Mylrea |first=Hannah |magazine=[[NME]] |access-date=December 4, 2019 |date=December 3, 2019 |archive-date=March 18, 2020 |archive-url=https://web.archive.org/web/20200318234648/https://www.nme.com/features/nmes-10-artists-who-defined-the-decade-the-2010s-2583451 |url-status=live}}</ref><ref>{{cite web |url=https://www.nme.com/news/music/spotify-reveals-most-streamed-artists-and-songs-of-the-decade-2583604 |title=Spotify reveals most-streamed artists and songs of the decade |last=Skinner |first=Tom |website=[[NME]] |access-date=December 4, 2019 |date=December 3, 2019 |archive-date=December 5, 2019 |archive-url=https://web.archive.org/web/20191205002322/https://www.nme.com/news/music/spotify-reveals-most-streamed-artists-and-songs-of-the-decade-2583604 |url-status=live}}</ref> Also, ''[[Forbes]]'' ranked her amongst the [[Forbes Celebrity 100|highest-paid celebrities]] in 2019, placing at number 62 on the list,<ref>{{cite web |url=https://www.forbes.com/celebrities/ |title=The World's Highest-Paid Entertainers 2019 |work=Forbes |access-date=April 15, 2020 |archive-date=June 28, 2004 |archive-url=https://web.archive.org/web/20040628043820/https://www.forbes.com/celebrities/#34b6f7425947 |url-status=live}}</ref> while ''[[Billboard (magazine)|Billboard]]'' ranked her as 2019's highest-paid solo musician.<ref>{{cite magazine |last=Christman |first=Ed |title=''Billboard''<nowiki/>'s U.S. Money Makers: The Top Paid Musicians of 2019 |url=https://www.billboard.com/articles/business/9434831/billboards-money-makers-the-highest-paid-musicians-of-2019 |access-date=August 3, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=August 3, 2021 |archive-url=https://web.archive.org/web/20210803064346/https://www.billboard.com/articles/business/9434831/billboards-money-makers-the-highest-paid-musicians-of-2019 |url-status=live}}</ref> According to the [[International Federation of the Phonographic Industry]] (IFPI), ''Thank U, Next'' was the eighth-best-selling album of 2019 globally, having sold over one million copies worldwide.<ref>{{cite magazine |date=March 19, 2020 |title=Arashi Best-Of Tops Taylor Swift for IFPI's Best-Selling Album of 2019 |url=http://www.billboard.com/articles/news/international/9338380/ifpi-best-selling-albums-list-2019 |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 19, 2020 |archive-url=https://web.archive.org/web/20200319162904/http://www.billboard.com/articles/news/international/9338380/ifpi-best-selling-albums-list-2019 |url-status=live}}</ref> It also ranked as the second-best-performing album on the ''Billboard'' 200 year-end chart of 2019.<ref>{{Cite magazine |date= |title=Year End Charts — ''Billboard'' 200 Albums: 2019 |url=https://www.billboard.com/charts/year-end/2019/top-billboard-200-albums/ |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 26, 2022 |archive-url=https://web.archive.org/web/20220426130344/https://www.billboard.com/charts/year-end/2019/top-billboard-200-albums/ |url-status=live}}</ref>
=== 2020–2023: ''Positions'' ===
{{Main|Positions (album)|l1=''Positions'' (album)}}
In January 2020, Grande received multiple nominations at the 2020 [[iHeartRadio Music Awards]], including [[IHeartRadio Music Award for Female Artist of the Year|Female Artist of the Year]].<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/billie-eilish-ariana-grande-shawn-mendes-2020-iheartradio-music-awards-nominees-935011/ |title=Billie Eilish, Ariana Grande, Shawn Mendes Lead iHeartRadio Music Awards Nominees |last=Blistering |first=Jon |magazine=[[Rolling Stone]] |access-date=January 8, 2020 |date=January 8, 2020 |archive-date=January 11, 2020 |archive-url=https://web.archive.org/web/20200111084621/https://www.rollingstone.com/music/music-news/billie-eilish-ariana-grande-shawn-mendes-2020-iheartradio-music-awards-nominees-935011/ |url-status=live}}</ref> At the [[62nd Annual Grammy Awards]], Grande performed a medley of "[[Imagine (Ariana Grande song)|Imagine]]", "[[My Favorite Things (song)|My Favorite Things]]", "7 Rings", and "Thank U, Next".<ref>{{Cite magazine |last=Spanos |first=Brittany |date=January 26, 2020 |title=Ariana Grande Performs 'Thank U, Next' Medley at the 2020 Grammy Awards |url=https://www.rollingstone.com/music/music-news/grammys-2020-ariana-grande-performance-thank-u-next-942130/ |access-date=October 10, 2024 |magazine=[[Rolling Stone]] |archive-date=January 27, 2020 |archive-url=https://web.archive.org/web/20200127053029/https://www.rollingstone.com/music/music-news/grammys-2020-ariana-grande-performance-thank-u-next-942130/ |url-status=live}}</ref> Her performance was ranked by various publications among the best of the ceremony.<ref>* {{Cite news |last=Ryan |first=Patrick |date=January 26, 2020 |title=Brutally honest reviews and rankings of every Grammys 2020 performance |url=https://www.usatoday.com/story/entertainment/music/2020/01/26/grammys-2020-brutally-honest-reviews-every-performance-ranked/4585087002/ |access-date=October 10, 2024 |work=[[USA Today]] |archive-date=August 21, 2023 |archive-url=https://web.archive.org/web/20230821235142/https://www.usatoday.com/story/entertainment/music/2020/01/26/grammys-2020-brutally-honest-reviews-every-performance-ranked/4585087002/ |url-status=live}}
* {{Cite news |last1=Yahr |first1=Emily |last2=Izadi |first2=Elahe |last3=Andrews |first3=Travis |date=January 27, 2020 |title=Grammy Awards 2020: The performances ranked, from best to worst |url=https://www.washingtonpost.com/arts-entertainment/2020/01/26/grammy-awards-2020-performances-ranked-best-worst/ |access-date=October 10, 2024 |newspaper=[[The Washington Post]]}}
* {{Cite magazine |last=Specter |first=Emma |date=January 27, 2020 |title=The 8 Best Performances From the 2020 Grammys |url=https://www.vogue.com/article/best-performances-grammy-awards-2020/ |access-date=October 10, 2024 |magazine=Vogue |archive-date=December 27, 2024 |archive-url=https://web.archive.org/web/20241227022243/https://www.vogue.com/article/best-performances-grammy-awards-2020 |url-status=live}}
* {{Cite news |last=Fenwick |first=George |date=January 27, 2020 |title=Grammys 2020: All the performances, ranked from worst to best |url=https://www.standard.co.uk/showbiz/celebrity-news/grammys-2020-performances-ranked-lizzo-tyler-the-creator-a4345711.html |access-date=October 10, 2024 |work=[[Evening Standard]] |archive-date=November 28, 2024 |archive-url=https://web.archive.org/web/20241128101558/https://www.standard.co.uk/showbiz/celebrity-news/grammys-2020-performances-ranked-lizzo-tyler-the-creator-a4345711.html |url-status=live}}
* {{Cite web |last1=Grady |first1=Constance |last2=Frank |first2=Allegra |last3=Abad-Santos |first3=Alex |date=January 27, 2020 |title=The 8 best performances from the 2020 Grammys |url=https://www.vox.com/culture/2020/1/26/21083012/2020-grammys-best-performances-lizzo-demi-lovato-video/ |access-date=October 10, 2024 |website=[[Vox (website)|Vox]] |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219040147/https://www.vox.com/culture/2020/1/26/21083012/2020-grammys-best-performances-lizzo-demi-lovato-video |url-status=live}}</ref> Grande received the third-most nominations (5), including her first nods for [[Grammy Award for Album of the Year|Album of the Year]] (''Thank U, Next'') and [[Record of the Year]] ("7 Rings").<ref>{{Cite news |last=Beaumont-Thomas |first=Ben |date=November 20, 2019 |title=Lizzo, Billie Eilish and Lil Nas X top 2020 Grammy nominations |url=https://www.theguardian.com/music/2019/nov/20/lizzo-billie-eilish-and-lil-nas-x-top-2020-grammy-nominations/ |access-date=October 10, 2024 |work=[[The Guardian]]}}</ref> She was named by ''Billboard'' and ''[[The Hollywood Reporter]]'' as one of the biggest snubs of the ceremony.<ref>{{Cite magazine |last=Grein |first=Paul |date=January 27, 2020 |title=Grammys 2020: The Biggest Snubs and Surprises |url=https://www.billboard.com/music/awards/grammys-2020-the-biggest-snubs-and-surprises-8549247/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 16, 2024 |archive-url=https://web.archive.org/web/20241216220727/https://www.billboard.com/music/awards/grammys-2020-the-biggest-snubs-and-surprises-8549247/ |url-status=live}}</ref><ref>{{Cite magazine |last=Lewis |first=Hilary |date=January 26, 2020 |title=Grammys Snubs: Ariana Grande and H.E.R. Shut Out |url=https://www.hollywoodreporter.com/news/music-news/grammys-2020-snubs-include-more-just-ariana-grande-1273550/ |access-date=October 10, 2024 |magazine=The Hollywood Reporter |archive-date=November 30, 2024 |archive-url=https://web.archive.org/web/20241130094208/https://www.hollywoodreporter.com/news/music-news/grammys-2020-snubs-include-more-just-ariana-grande-1273550/ |url-status=live}}</ref> Grande and Justin Bieber released a collaboration song titled "[[Stuck with U]]" on May 8, 2020; net proceeds from the sales of the song were donated to the First Responders Children's Foundation in light of the [[COVID-19 pandemic]].<ref name="Kaufman">{{cite magazine |url=https://www.billboard.com/music/pop/justin-bieber-ariana-grande-collaboration-details-9369900/ |title=Justin Bieber & Ariana Grande Are Collaborating For a Good Cause |last=Kaufman |first=Gil |magazine=[[Billboard (magazine)|Billboard]] |access-date=May 1, 2020 |date=May 7, 2020 |archive-date=May 1, 2020 |archive-url=https://web.archive.org/web/20200501212547/https://www.billboard.com/articles/columns/pop/9369900/justin-bieber-ariana-grande-collaboration-details |url-status=live}}</ref> The song debuted at number one on the ''Billboard'' Hot 100'','' becoming Grande's third chart-topping single. Alongside Bieber, both artists tied Mariah Carey and [[Aubrey Graham|Drake]] for the most songs to debut at number one on the Hot 100; Grande became the first artist to have her first three number ones debut at the top, following "Thank U, Next" and "7 Rings".<ref>{{cite magazine |title=Ariana Grande & Justin Bieber's "Stuck With U" Debuts at No. 1 on Hot 100 |url=http://www.billboard.com/articles/business/chart-beat/9379745/ariana-grande-justin-bieber-stuck-with-u-number-one |date=May 18, 2020 |magazine=[[Billboard (magazine)|Billboard]] |access-date=May 18, 2020 |archive-date=May 19, 2020 |archive-url=https://web.archive.org/web/20200519191240/http://www.billboard.com/articles/business/chart-beat/9379745/ariana-grande-justin-bieber-stuck-with-u-number-one |url-status=live}}</ref>
Grande appeared on [[Lady Gaga]]'s "[[Rain on Me (Lady Gaga and Ariana Grande song)|Rain on Me]]", the second single from Gaga's sixth studio album ''[[Chromatica]]''.<ref>{{cite web |url=https://www.billboard.com/articles/columns/pop/9379055/lady-gaga-ariana-grande-rain-on-me-release-date |title=Lady Gaga & Ariana Grande's 'Rain on Me' Collaboration Is Coming Really Soon |last=Aniftos |first=Rania |magazine=[[Billboard (magazine)|Billboard]] |date=May 15, 2020 |access-date=May 16, 2020 |archive-date=May 15, 2020 |archive-url=https://web.archive.org/web/20200515235931/https://www.billboard.com/articles/columns/pop/9379055/lady-gaga-ariana-grande-rain-on-me-release-date }}</ref> The song also debuted at number one on the ''Billboard'' Hot 100, becoming Grande's fourth number-one single and helping her break the record for the most number-one debuts on that chart.<ref name="Billboard">{{cite magazine |title=Lady Gaga & Ariana Grande's 'Rain on Me' Debuts at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/articles/business/chart-beat/9394719/rain-on-me-debuts-atop-hot-100-lady-gaga-ariana-grande |magazine=[[Billboard (magazine)|Billboard]] |date=June 2020 |access-date=June 1, 2020 |archive-date=June 3, 2020 |archive-url=https://web.archive.org/web/20200603055218/https://www.billboard.com/articles/business/chart-beat/9394719/rain-on-me-debuts-atop-hot-100-lady-gaga-ariana-grande |url-status=live}}</ref> It won the [[Best Pop Duo/Group Performance]] category at the [[63rd Annual Grammy Awards]].<ref>{{cite news |last=Shafer |first=Ellise |title=Grammys 2021 Winners List |url=https://variety.com/2021/music/news/2021-grammys-winners-list-1234926947/ |access-date=March 14, 2021 |work=[[Variety (magazine)|Variety]] |date=March 14, 2021 |archive-date=March 16, 2021 |archive-url=https://web.archive.org/web/20210316041012/https://variety.com/2021/music/news/2021-grammys-winners-list-1234926947/ |url-status=live}}</ref> In 2020, Grande became the highest-earning woman in music on ''[[Forbes]]''{{'}}s 2020 [[Celebrity 100]] list, placing 17th overall with $72 million.<ref>{{cite web |url=https://www.forbes.com/celebrities |title=The World's Highest Paid Celebrities |last=Greenburg |first=Zack O'Malley |date=June 4, 2020 |work=Forbes |access-date=June 4, 2020 |archive-date=June 28, 2004 |archive-url=https://web.archive.org/web/20040628043820/https://www.forbes.com/celebrities |url-status=live}}</ref> At the [[2020 MTV Video Music Awards]], she was nominated for nine awards for both "Stuck with U" (with Bieber) and "Rain on Me" (with Gaga). For the latter, Grande received her third consecutive nomination for [[MTV Video Music Award for Video of the Year|Video of the Year]]. She won four awards, including [[MTV Video Music Award for Song of the Year|Song of the Year]] for "Rain on Me".<ref name="auto">{{cite news |url=http://www.mtv.com/news/3169506/vmas-winners-list-2020/ |title=2020 MTV VMA Winners: see the full list |first=Patrick |last=Hosken |date=August 30, 2020 |access-date=August 30, 2020 |publisher=[[MTV News]] |archive-date=August 31, 2020 |archive-url=https://web.archive.org/web/20200831025120/http://www.mtv.com/news/3169506/vmas-winners-list-2020/ }} {{Webarchive|url=https://web.archive.org/web/20200831025120/http://www.mtv.com/news/3169506/vmas-winners-list-2020/ |date=August 31, 2020 }}</ref><ref>{{Cite magazine |last=Warner |first=Denise |date=August 30, 2020 |title=Here Are All the Winners From the 2020 MTV VMAs |url=https://www.billboard.com/music/awards/mtv-vmas-winners-list-2020-9442281/ |access-date=April 1, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 13, 2022 |archive-url=https://web.archive.org/web/20221013064642/https://www.billboard.com/music/awards/mtv-vmas-winners-list-2020-9442281/ |url-status=live}}</ref>
Grande's sixth studio album, ''[[Positions (album)|Positions]]'', was released on October 30, 2020.<ref>{{cite web |url=https://www.npr.org/2020/10/30/926671488/ariana-grande-releases-new-album-positions-her-most-explicit-to-date |title=Ariana Grande Releases New Album 'Positions,' Her Most Explicit To Date |date=October 30, 2020 |last=Harris |first=Latesha |access-date=October 31, 2020 |publisher=[[NPR]] |archive-date=October 30, 2020 |archive-url=https://web.archive.org/web/20201030170043/https://www.npr.org/2020/10/30/926671488/ariana-grande-releases-new-album-positions-her-most-explicit-to-date |url-status=live}}</ref> It debuted at number one on the [[Billboard 200|''Billboard'' 200]] with first-week sales of 174,000 units, becoming Grande's fifth number-one album.<ref name=":2">{{cite magazine |url=https://www.billboard.com/articles/business/chart-beat/9480311/ariana-grande-positions-tops-billboard-200/ |title=Ariana Grande Claims Fifth No. 1 Album on Billboard 200 Chart With 'Positions' |magazine=[[Billboard (magazine)|Billboard]] |first=Keith |last=Caulfield |date=November 8, 2020 |access-date=November 9, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108202106/https://www.billboard.com/articles/business/chart-beat/9480311/ariana-grande-positions-tops-billboard-200/ |url-status=live}}</ref> Her third chart-topping album in two years and three months, it marked the fastest accumulation of three number-oe albums by a woman at that time.<ref name=":2"/> Following its vinyl LPs release in April 2021, ''Positions'' achieved the largest vinyl sales week (32,000) by a female artist since [[MRC Data]]'s inauguration in 1991, at that time.<ref>{{cite magazine |title=Taylor Swift's 'Evermore' Breaks Modern-Era Record for Biggest Vinyl Album Sales Week |url=https://www.billboard.com/articles/news/9580407/taylor-swift-evermore-record-breaking-vinyl-album-sales-week |url-status=live |archive-url=https://web.archive.org/web/20210531190705/https://www.billboard.com/articles/news/9580407/taylor-swift-evermore-record-breaking-vinyl-album-sales-week/ |archive-date=May 31, 2021 |access-date=June 1, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> The [[Positions (song)|eponymous lead single]] was released on October 23.<ref>{{cite web |url=https://www.vulture.com/2020/10/ariana-grande-teases-release-of-new-single-positions.html |title=Get Into 'Position' for Ariana Grande's New Single |last=Sinha |first=Charu |website=[[Vulture (websitee)|Vulture]] |date=October 21, 2020 |access-date=October 22, 2020 |archive-date=October 21, 2020 |archive-url=https://web.archive.org/web/20201021100828/https://www.vulture.com/2020/10/ariana-grande-teases-release-of-new-single-positions.html |url-status=live}}</ref> It debuted atop the ''[[Billboard (magazine)|Billboard]]'' [[Hot 100]], becoming Grande's fifth chart-topping single and breaking numerous records. Grande became the first artist to have five number-one debuts on the Hot 100 and the first to have their first five number-ones debut at the top. "Positions" became her third number-one single in 2020 following "Stuck with U" and "Rain on Me", making Grande the first artist since Drake to have three number-one singles in a single calendar year and the first female artist to do so since [[Rihanna]] and Katy Perry in 2010.<ref name="billboardpositions">{{cite magazine |url=https://www.billboard.com/articles/business/chart-beat/9477041/ariana-positions-luke-combs-hot-100-number-one |title=Ariana Grande's 'Positions' Debuts at No. 1 on Hot 100, Luke Combs' 'Forever After All' Launches at No. 2 |last=Trust |first=Gary |magazine=[[Billboard (magazine)|Billboard]] |date=November 2, 2020 |access-date=November 2, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108154842/https://www.billboard.com/articles/business/chart-beat/9477041/ariana-positions-luke-combs-hot-100-number-one |url-status=live}}</ref> It topped the [[Pop Airplay]] chart for seven weeks, surpassing "7 Rings" (six weeks) as Grande's longest-running number-one on the chart.<ref name="popairplaytoptwo">{{cite magazine |url=https://www.billboard.com/articles/business/chart-beat/9522731/ariana-grande-34-35-tops-pop-airplay-chart |title=Ariana Grande Replaces Herself Atop Pop Airplay Chart as '34+35' Dethrones 'Positions' |magazine=[[Billboard (magazine)|Billboard]] |last=Trust |first=Gary |date=February 8, 2021 |access-date=October 10, 2024 |archive-date=October 19, 2021 |archive-url=https://web.archive.org/web/20211019232819/https://www.billboard.com/articles/business/chart-beat/9522731/ariana-grande-34-35-tops-pop-airplay-chart |url-status=live}}</ref>
Alongside the release of ''Positions'', the track "[[34+35]]" served as the second single off the album. Debuting at number eight, it became Grande's 18th top-ten single.<ref name="bil-1">{{cite magazine |last=Trust |first=Gary |date=November 9, 2020 |title=24kGoldn & Iann Dior's 'Mood' Swings Back to No. 1 on Hot 100; Ariana Grande, Bad Bunny & Jhay Cortez Debut in Top 10 |url=https://www.billboard.com/articles/business/chart-beat/9480738/24kgoldn-iann-dior-mood-number-one-third-week/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 11, 2020 |archive-date=November 15, 2020 |archive-url=https://web.archive.org/web/20201115150228/https://www.billboard.com/articles/business/chart-beat/9480738/24kgoldn-iann-dior-mood-number-one-third-week/ |url-status=live}}</ref> Grande released a "34+35" remix featuring American rappers [[Doja Cat]] and [[Megan Thee Stallion]] on January 15, 2021. The remix helped the song reach a new peak at number two, the highest-charting song credited to three or more female soloists on the Hot 100 since [[Christina Aguilera]], [[Mýa]], [[Pink (singer)|Pink]] and [[Lil' Kim]]'s "Lady Marmalade" in 2001.<ref>{{cite magazine |last=Trust |first=Gary |date=January 25, 2021 |title=Olivia Rodrigo's 'Drivers License' No. 1 on Hot 100 for 2nd Week, Ariana Grande's '34+35' Bounds to No. 2 |url=https://www.billboard.com/articles/business/chart-beat/9515956/olivia-rodrigo-drivers-license-number-one-second-week-hot-100/ |access-date=January 25, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 25, 2021 |archive-url=https://web.archive.org/web/20210125213933/https://www.billboard.com/articles/business/chart-beat/9515956/olivia-rodrigo-drivers-license-number-one-second-week-hot-100/ |url-status=live}}</ref> The remix was one of five bonus tracks included on the deluxe edition of ''Positions'', released on February 19, 2021.<ref>{{Cite web |last=Close |first=Paris |date=February 19, 2021 |title=Hear 5 New Songs From Ariana Grande's 'Positions' Deluxe Album |url=https://www.iheart.com/content/2021-02-19-hear-5-new-songs-from-ariana-grandes-positions-deluxe-album/ |access-date=April 2, 2025 |publisher=[[iHeart]] |archive-date=April 25, 2025 |archive-url=https://web.archive.org/web/20250425052616/https://www.iheart.com/content/2021-02-19-hear-5-new-songs-from-ariana-grandes-positions-deluxe-album/ |url-status=live}}</ref> On the Pop Airplay chart issue dated February 13, "34+35" replaced Grande's own "Positions" at number one, making her the first artist to replace herself at the summit as the only act credited on both tracks.<ref name="popairplaytoptwo"/> On the following chart issue, Grande occupied the top two of the chart with "34+35" and "Positions", becoming the first artist to simultaneously occupy the top two with two solo tracks.<ref name="popairplaytoptwo"/><ref name="popairplayfeb2021">{{Cite magazine |title=Pop Airplay: Week of February 20, 2021) |url=https://www.billboard.com/charts/pop-songs/2021-02-20 |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 3, 2021 |archive-url=https://web.archive.org/web/20210303092657/https://www.billboard.com/charts/pop-songs/2021-02-20 |url-status=live}}</ref> "34+35" remained at number one for three consecutive weeks;<ref>{{Cite magazine |title=''Billboard'' Pop Airplay Chart: Week of February 27, 2021 |url=https://www.billboard.com/charts/pop-songs/2021-02-27 |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 16, 2021 |archive-url=https://web.archive.org/web/20210316004218/https://www.billboard.com/charts/pop-songs/2021-02-27 |url-status=live}}</ref> it also topped the [[Rhythmic (chart)|Rhythmic]] airplay chart, marking Grande's third leader.<ref>{{Cite magazine |date=March 9, 2021 |title=Ariana Grande Rhythmic Airplay Chart History |url=https://www.billboard.com/artist/ariana-grande/chart-history/tfc/ |url-status=live |access-date=March 9, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 1, 2021 |archive-url=https://web.archive.org/web/20210301200146/https://www.billboard.com/music/ariana-grande/chart-history/TFC}}</ref> In March, the song "[[POV (song)|POV]]" was sent to radio as the album's third single. The song reached number 27 on the Hot 100 and the top ten on mainstream radio, making Grande the first artist to have three concurrent songs in the top ten on Pop Airplay; it later peaked at number three.<ref>{{cite magazine |last=Trust |first=Gary |date=May 10, 2021 |title=3 Top 10 'Positions': Ariana Grande Makes History on Pop Airplay Chart |url=https://www.billboard.com/pro/ariana-grande-makes-history-pop-airplay-chart-three-top-10-songs/ |access-date=February 11, 2023 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=February 11, 2023 |archive-url=https://web.archive.org/web/20230211072629/https://www.billboard.com/pro/ariana-grande-makes-history-pop-airplay-chart-three-top-10-songs/ |url-status=live}}</ref>
Grande was named the most-played artist on [[iHeartRadio]]'s stations in 2021, reaching 2.6 billion in audience.<ref>{{cite magazine |last1=Aswad |first1=Jem |title=Dua Lipa's 'Levitating,' Ariana Grande Top iHeartRadio's Most-Played Lists of 2021 |url=https://variety.com/2021/music/news/dua-lipa-levitating-ariana-grande-iheartradio-most-played-2021-1235120854/ |magazine=Variety |access-date=November 30, 2021 |date=November 29, 2021 |archive-date=November 29, 2021 |archive-url=https://web.archive.org/web/20211129214619/https://variety.com/2021/music/news/dua-lipa-levitating-ariana-grande-iheartradio-most-played-2021-1235120854/amp/ |url-status=live}}</ref> ''Positions'' ranked at number eight on the 2021 year-end ''Billboard'' 200 chart.<ref>{{Cite magazine |date= |title=Year-End Charts — ''Billboard'' 200 Albums: 2021 |url=https://www.billboard.com/charts/year-end/2021/top-billboard-200-albums/ |url-access=subscription |access-date=October 11, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2021 |archive-url=https://web.archive.org/web/20211203104042/https://www.billboard.com/charts/year-end/2021/top-billboard-200-albums/ |url-status=live}}</ref> On November 13, 2020, Grande made a surprise appearance on the [[Adult Swim]] Festival, performing music artist [[Thundercat (musician)|Thundercat]]'s song "Them Changes" alongside him, which Grande had previously covered.<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-them-changes-thundercat-adult-swim-festival-1090593/ |title=See Ariana Grande Perform 'Them Changes' With Thundercat at Adult Swim Festival |last=Kreps |first=Daniel |magazine=[[Rolling Stone]] |date=November 13, 2020 |access-date=December 3, 2020 |archive-date=May 17, 2021 |archive-url=https://web.archive.org/web/20210517235648/https://www.rollingstone.com/music/music-news/ariana-grande-them-changes-thundercat-adult-swim-festival-1090593/ |url-status=live}}</ref> Grande and [[Jennifer Hudson]] also featured on a remix of [[Mariah Carey]]'s 2010 Christmas song "[[Oh Santa!]]". The song was released on December 4, 2020, as part of ''[[Mariah Carey's Magical Christmas Special]]''.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/holiday/9493952/mariah-carey-ariana-grande-jennifer-hudson-oh-santa |title=Mariah Carey, Ariana Grande & Jennifer Hudson Have Blessed Us With 'Oh Santa!' |last=Aniftos |first=Rania |magazine=[[Billboard (magazine)|Billboard]] |date=December 3, 2020 |access-date=December 3, 2020 |archive-date=April 21, 2021 |archive-url=https://web.archive.org/web/20210421063358/https://www.billboard.com/articles/news/holiday/9493952/mariah-carey-ariana-grande-jennifer-hudson-oh-santa |url-status=live}}</ref> Grande released the concert film for her [[Sweetener World Tour]], ''[[Excuse Me, I Love You]],'' on December 21, 2020, exclusively on [[Netflix]].<ref>{{Cite magazine |last=Blistein |first=Jon |date=December 9, 2020 |title=Ariana Grande Announces 'Sweetener' Concert Film 'Excuse Me, I Love You' |url=https://www.rollingstone.com/music/music-news/ariana-grande-sweetener-concert-film-excuse-me-i-love-you-1101246/ |access-date=April 2, 2024 |magazine=[[Rolling Stone]] |archive-date=April 2, 2024 |archive-url=https://web.archive.org/web/20240402002736/https://www.rollingstone.com/music/music-news/ariana-grande-sweetener-concert-film-excuse-me-i-love-you-1101246/ |url-status=live}}</ref>
In April 2021, Grande was featured on a remix of [[the Weeknd]]'s "[[Save Your Tears]]".<ref>{{cite magazine |last=Mamo |first=Heran |date=April 23, 2021 |title=The Weeknd Drops 'Save Your Tears' Remix With Ariana Grande: Stream It Now |url=https://www.billboard.com/music/pop/the-weeknd-ariana-grande-save-your-tears-remix-stream-9561503/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=April 23, 2021 |archive-date=April 23, 2021 |archive-url=https://web.archive.org/web/20210423040929/https://www.billboard.com/articles/columns/pop/9561503/the-weeknd-ariana-grande-save-your-tears-remix-stream/ |url-status=live}}</ref> The remix reached number one on the ''Billboard'' Hot 100 and [[Canadian Hot 100]], becoming both artists' sixth number-one single on both charts.<ref>{{cite magazine |date=May 10, 2021 |title=Ariana Grande (Chart History): Canadian Hot 100 |url=https://www.billboard.com/artist/ariana-grande/chart-history/can/ |access-date=January 15, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 1, 2021 |archive-url=https://web.archive.org/web/20210301072014/https://www.billboard.com/music/ariana-grande/chart-history/CAN |url-status=live}}</ref> It also topped the ''Billboard'' Global 200, marking Grande's second number-one single on the chart; it made her the first woman to earn multiple leaders on the chart.<ref>{{cite magazine |last=McIntyre |first=Hugh |date=May 4, 2021 |title=Ariana Grande Joins BTS As The Only Musicians To Hit No. 1 On Billboard's Global Chart More Than Once |url=https://www.forbes.com/sites/hughmcintyre/2021/05/04/ariana-grande-joins-bts-as-the-only-musicians-to-hit-no-1-on-billboards-global-chart-more-than-once/ |access-date=September 6, 2024 |magazine=Forbes |archive-date=May 5, 2021 |archive-url=https://web.archive.org/web/20210505152917/https://www.forbes.com/sites/hughmcintyre/2021/05/04/ariana-grande-joins-bts-as-the-only-musicians-to-hit-no-1-on-billboards-global-chart-more-than-once/ |url-status=live}}</ref> She joined [[Paul McCartney]] as the only artists to earn three number-one duets on the Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |date=May 3, 2021 |title=The Weeknd & Ariana Grande's 'Save Your Tears' Soars to No. 1 on Billboard Hot 100 |url=https://www.billboard.com/articles/news/9566597/the-weeknd-ariana-grande-save-your-tears-number-one-hot-100/ |access-date=May 3, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 9, 2021 |archive-url=https://web.archive.org/web/20211009233826/https://www.billboard.com/articles/news/9566597/the-weeknd-ariana-grande-save-your-tears-number-one-hot-100 |url-status=live}}</ref> With 69 weeks, the remix is among [[List of Billboard Hot 100 chart achievements and milestones#Most total weeks on the Hot 100|longest-charting songs]] on the Hot 100, and Grande's longest-charting song in the United States.<ref>{{Cite magazine |last=Zellner |first=Xander |date=October 17, 2022 |title=Glass Animals' 'Heat Waves' Is Now the Longest Charting Hot 100 Song of All Time |url=https://www.billboard.com/music/chart-beat/glass-animals-heat-waves-is-now-longest-charting-hot-100-song-1235157060/ |access-date=August 26, 2023 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 18, 2022 |archive-url=https://web.archive.org/web/20221018000513/https://www.billboard.com/music/chart-beat/glass-animals-heat-waves-is-now-longest-charting-hot-100-song-1235157060/ |url-status=live}}</ref> It ranked as the second best-performing song of the year on the ''Billboard'' [[Billboard Year-End Hot 100 singles of 2021|year-end Hot 100]], [[Billboard Year-End Global 200 singles of 2021|Global 200, and Global Excl. US charts]] of 2021.<ref>{{cite magazine |last1=Trust |first1=Gary |last2=Caulfield |first2=Keith |date=December 2, 2021 |title=The Year In Charts 2021: Dua Lipa's 'Levitating' Is the No. 1 Billboard Hot 100 Song of the Year |url=https://www.billboard.com/music/chart-beat/dua-lipa-levitating-2021-hot-100-top-song-year-in-charts-1235004941/ |access-date=January 15, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2021 |archive-url=https://web.archive.org/web/20211203190631/https://www.billboard.com/music/chart-beat/dua-lipa-levitating-2021-hot-100-top-song-year-in-charts-1235004941/ |url-status=live}}</ref><ref>{{Cite magazine |date=December 2, 2021 |title=''Billboard'' Global 200 – Year-End 2021 |url=https://www.billboard.com/charts/year-end/2021/billboard-global-200/ |access-date=September 6, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2021 |archive-url=https://web.archive.org/web/20211203103102/https://www.billboard.com/charts/year-end/2021/billboard-global-200/ |url-status=live}}</ref><ref>{{Cite magazine |last=Frankenberg |first=Eric |date=December 2, 2021 |title=The Year in Global Charts 2021: Dua Lipa, BTS & Olivia Rodrigo Lead Inaugural Year-End Rankings |url=https://www.billboard.com/music/chart-beat/global-charts-2021-year-end-ranking-1235005077/ |access-date=September 6, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 12, 2022 |archive-url=https://web.archive.org/web/20220112181325/https://www.billboard.com/music/chart-beat/global-charts-2021-year-end-ranking-1235005077/ |url-status=live}}</ref> Grande and the Weeknd performed "Save Your Tears" together at the [[2021 iHeartRadio Music Awards]].<ref>{{cite web |last=Bloom |first=Madison |date=May 27, 2021 |title=Watch the Weeknd and Ariana Grande Perform 'Save Your Tears' at 2021 iHeartRadio Music Awards |url=https://pitchfork.com/news/watch-the-weeknd-and-ariana-grande-perform-save-your-tears-at-2021-iheartradio-music-awards/ |access-date=July 8, 2021 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=July 9, 2021 |archive-url=https://web.archive.org/web/20210709192806/https://pitchfork.com/news/watch-the-weeknd-and-ariana-grande-perform-save-your-tears-at-2021-iheartradio-music-awards/ |url-status=live}}</ref>
In June 2021, Grande featured on the song "I Don't Do Drugs" from Doja Cat's third studio album ''[[Planet Her]]''.<ref>{{cite magazine |last=Legaspi |first=Althea |date=June 9, 2021 |title=Doja Cat Enlists Ariana Grande, the Weeknd for New 'Planet Her' Album |url=https://www.rollingstone.com/music/music-news/doja-cat-ariana-grande-the-weeknd-planet-her-1181716/ |access-date=July 8, 2021 |magazine=[[Rolling Stone]] |archive-date=July 22, 2021 |archive-url=https://web.archive.org/web/20210722121929/https://www.rollingstone.com/music/music-news/doja-cat-ariana-grande-the-weeknd-planet-her-1181716/ |url-status=live}}</ref> Her contribution as a songwriter and featured artist on the song earned Grande a nomination for [[Grammy Award for Album of the Year|Album of the Year]] at the [[64th Annual Grammy Awards]]. In September 2021, she joined as a coach of the [[The Voice (American TV series) season 21|twenty-first season]] of ''[[The Voice (American TV series)|The Voice]]''; Grande became the highest-paid coach in the show's history, earning a reported $25 million for that season.<ref>{{cite web |last=Swaroop |first=Ananya |date=April 1, 2021 |title=Ariana Grande Is the Highest-Paid Coach in 'Voice' History—Here's Her Salary & Net Worth |url=https://www.yahoo.com/now/ariana-grande-highest-paid-coach-230007598.html |url-status=live |archive-url=https://web.archive.org/web/20211110145043/https://www.yahoo.com/now/ariana-grande-highest-paid-coach-230007598.html |archive-date=November 10, 2021 |access-date=January 19, 2022 |website=[[Yahoo!]]}}</ref> The season concluded in December 2021; Grande did not return for the next season.<ref>{{Cite magazine |last=Donaldson |first=Laura |date=September 19, 2022 |title='The Voice' 2022: Why Did Ariana Grande and Kelly Clarkson Leave NBC Show? |url=https://www.newsweek.com/voice-ariana-grande-kelly-clarkson-why-leave-not-left-what-happened-judges-coaches-1743667/ |access-date=September 17, 2024 |magazine=[[Newsweek]] |archive-date=November 30, 2024 |archive-url=https://web.archive.org/web/20241130100949/https://www.newsweek.com/voice-ariana-grande-kelly-clarkson-why-leave-not-left-what-happened-judges-coaches-1743667 |url-status=live}}</ref> Later in December, she appeared in [[Adam McKay]]'s film ''[[Don't Look Up]]'', alongside [[Leonardo DiCaprio]], [[Jennifer Lawrence]], and [[Meryl Streep]]. With streams of more than 152 million hours in a week, it broke the record for the biggest viewership week in [[Netflix]] history, at the time.<ref>{{cite magazine |last1=Yossman |first1=K. J. |title=Adam McKay's 'Don't Look Up' Smashes Netflix Viewing Records With Over 150 Million Hours Viewed |url=https://variety.com/2022/film/news/dont-look-up-netflix-weekly-viewing-records-1235147910/ |access-date=January 8, 2022 |magazine=Variety |date=January 6, 2022 |archive-date=January 7, 2022 |archive-url=https://web.archive.org/web/20220107000509/https://variety.com/2022/film/news/dont-look-up-netflix-weekly-viewing-records-1235147910/ |url-status=live}}</ref> To promote the film, Grande released the song "[[Just Look Up]]", in collaboration with rapper [[Kid Cudi]], on December 3, 2021.<ref>{{cite magazine |url=https://www.nme.com/news/music/ariana-grande-kid-cudi-collaboration-just-look-up-clip-listen-3098626%3fa |title=Hear Ariana Grande and Kid Cudi's new collaboration, 'Just Look Up' |last=Skinner |first=Tom |magazine=[[NME]] |date=December 3, 2021 |access-date=December 14, 2021 |archive-date=April 4, 2023 |archive-url=https://web.archive.org/web/20230404193403/https://www.nme.com/news/music/ariana-grande-kid-cudi-collaboration-just-look-up-clip-listen-3098626?a |url-status=live}}</ref> At the [[27th Critics' Choice Awards]], Grande received nominations in the categories [[Critics' Choice Movie Award for Best Song|Best Song]] and [[Critics' Choice Movie Award for Best Acting Ensemble|Best Acting Ensemble]], as a part of the cast.<ref>{{cite magazine |last=Nordyke |first=Kimberly |date=March 13, 2022 |title=Critics Choice Awards: Winners List |url=https://www.hollywoodreporter.com/movies/movie-news/critics-choice-awards-winners-list-full-1235110430/ |access-date=January 9, 2024 |magazine=[[The Hollywood Reporter]] |archive-date=January 19, 2023 |archive-url=https://web.archive.org/web/20230119112750/https://www.hollywoodreporter.com/movies/movie-news/critics-choice-awards-winners-list-full-1235110430/ |url-status=live}}</ref> She also received a nomination at the [[28th Screen Actors Guild Awards]] for [[Screen Actors Guild Award for Outstanding Performance by a Cast in a Motion Picture|Outstanding Performance by a Cast in a Motion Picture]].<ref>{{cite magazine |last=Nordyke |first=Kimberly |date=February 27, 2022 |title=SAG Awards: Winners List |url=https://www.hollywoodreporter.com/movies/movie-news/sag-awards-winners-2022-complete-list-1235100358/ |url-status=live |archive-url=https://web.archive.org/web/20220228001511/https://www.hollywoodreporter.com/movies/movie-news/sag-awards-winners-2022-complete-list-1235100358/ |archive-date=February 28, 2022 |access-date=January 9, 2024 |magazine=[[The Hollywood Reporter]]}}</ref>
On February 24, 2023, following months-long renewed interest in and virality of the Weeknd's 2016 song "Die for You", [[Die for You (The Weeknd song)#Ariana Grande remix|a remix]] of the song with Grande was released. It marked their fourth collaboration.<ref>{{cite web |last=Strauss |first=Matthew |date=February 24, 2023 |title=The Weeknd Enlists Ariana Grande for New "Die for You (Remix)" |url=https://pitchfork.com/news/the-weeknd-enlists-ariana-grande-for-new-die-for-you-remix-listen/ |access-date=June 21, 2023 |website=Pitchfork |archive-date=August 19, 2023 |archive-url=https://web.archive.org/web/20230819222159/https://pitchfork.com/news/the-weeknd-enlists-ariana-grande-for-new-die-for-you-remix-listen/ |url-status=live}}</ref> The remix topped the ''Billboard'' Hot 100 chart, becoming both artists' seventh number-one hit. Grande became the artist with the most number-one duets (four) on the chart, surpassing McCartney.<ref>{{cite magazine |last=Trust |first=Gary |date=March 6, 2023 |title=The Weeknd & Ariana Grande's 'Die for You' Leaps to No. 1 on Billboard Hot 100 |url=https://www.billboard.com/music/chart-beat/the-weeknd-ariana-grande-die-for-you-number-one-billboard-hot-100-1235280422/ |access-date=June 21, 2023 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 6, 2023 |archive-url=https://web.archive.org/web/20230306180602/https://www.billboard.com/music/chart-beat/the-weeknd-ariana-grande-die-for-you-number-one-billboard-hot-100-1235280422/ |url-status=live}}</ref> According to the [[International Federation of the Phonographic Industry]] (IFPI), it was the [[List of best-selling singles#Best-selling singles by year worldwide|fourth best-selling song of 2023]] globally.<ref>{{Cite magazine |last=Brandle |first=Lars |date=February 26, 2024 |title=Miley Cyrus' 'Flowers' Wins IFPI Global Single Award For 2023 |url=https://www.billboard.com/music/awards/miley-cyrus-flowers-ifpi-global-single-award-2023-1235614759/ |access-date=February 26, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=February 26, 2024 |archive-url=https://web.archive.org/web/20240226153802/https://www.billboard.com/music/awards/miley-cyrus-flowers-ifpi-global-single-award-2023-1235614759/ |url-status=live}}</ref> On August 25, 2023, Grande released a reissue of her debut studio album, ''[[Yours Truly (Ariana Grande album)#Yours Truly (Tenth Anniversary Edition)|Yours Truly (Tenth Anniversary Edition)]]''.<ref>{{cite web |last=Bloom |first=Madison |title=Ariana Grande Releasing ''Yours Truly'' 10th Anniversary Reissue Friday |date=August 19, 2023 |website=Pitchfork |url=https://pitchfork.com/news/ariana-grande-releasing-yours-truly-10th-anniversary-reissue-friday/ |access-date=August 26, 2023 |archive-date=August 25, 2023 |archive-url=https://web.archive.org/web/20230825112052/https://pitchfork.com/news/ariana-grande-releasing-yours-truly-10th-anniversary-reissue-friday/ |url-status=live}}</ref><ref>{{cite magazine |last=Kreps |first=Daniel |title=Ariana Grande Details Week's Worth of 'Yours Truly' 10th Anniversary Plans |date=August 19, 2023 |magazine=[[Rolling Stone]] |url=https://www.rollingstone.com/music/music-news/ariana-grande-yours-truly-10th-anniversary-1234809258/ |access-date=August 26, 2023 |archive-date=August 24, 2023 |archive-url=https://web.archive.org/web/20230824212444/https://www.rollingstone.com/music/music-news/ariana-grande-yours-truly-10th-anniversary-1234809258/ |url-status=live}}</ref> On December 9, 2023, Grande and Jennifer Hudson made a surprise appearance onstage to sing the "Oh Santa!" remix at Mariah Carey's show at the [[Madison Square Garden]], of her [[Merry Christmas One and All!]] tour.<ref>{{cite magazine |last=Russell |first=Shania |date=December 10, 2023 |title=Mariah Carey invites her 'Christmas angels' Ariana Grande and Jennifer Hudson onstage for 'Oh Santa' |url=https://ew.com/watch-mariah-carey-ariana-grande-jennifer-hudson-sing-oh-santa-8413972 |access-date=January 9, 2024 |magazine=[[Entertainment Weekly]] |archive-date=January 9, 2024 |archive-url=https://web.archive.org/web/20240109145933/https://ew.com/watch-mariah-carey-ariana-grande-jennifer-hudson-sing-oh-santa-8413972 |url-status=live}}</ref>
=== 2024–present: ''Eternal Sunshine'', ''Wicked'', and focus on acting ===
[[File:Ariana Grande Wicked Interview 2024 03.jpg|thumb|upright|left|Grande in 2024]]
Grande's seventh studio album, titled ''[[Eternal Sunshine (album)|Eternal Sunshine]]'', was released on March 8, 2024. It was preceded by its lead single, "[[Yes, And?]]", released on January 12.<ref>{{cite magazine |last1=Spanos |first1=Brittany |title=Ariana Grande Strikes A Pose With House Single 'Yes, And?' |url=https://www.rollingstone.com/music/music-news/ariana-grande-yes-and-song-release-1234945134/ |access-date=January 12, 2024 |magazine=[[Rolling Stone]] |archive-date=January 12, 2024 |archive-url=https://web.archive.org/web/20240112051751/https://www.rollingstone.com/music/music-news/ariana-grande-yes-and-song-release-1234945134/ |url-status=live}}</ref> The song debuted at number one on the ''Billboard'' Hot 100,<ref>{{cite magazine |last=Trust |first=Gary |date=January 22, 2024 |title=Ariana Grande's 'Yes, And?' Debuts at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-hot-100-number-one-debut-2-1235586226/ |url-status=live |archive-url=https://web.archive.org/web/20240122182312/https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-hot-100-number-one-debut-2-1235586226/ |archive-date=January 22, 2024 |access-date=January 22, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> topped the [[Billboard Global 200|''Billboard'' Global 200]] and Global Excl. US charts for two weeks,<ref>
* {{cite magazine |url=https://www.billboard.com/music/chart-beat/ariana-grande-yes-global-charts-number-one-debut-1235586270/ |title=Ariana Grande's 'Yes, And?' Launches at No. 1 on Billboard Global Charts |last=Trust |first=Gary |date=January 22, 2024 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 31, 2024 |url-status=live |archive-date=January 22, 2024 |archive-url=https://web.archive.org/web/20240122200525/https://www.billboard.com/music/chart-beat/ariana-grande-yes-global-charts-number-one-debut-1235586270/}}
* {{Cite magazine |last=Trust |first=Gary |date=January 29, 2024 |title=Ariana Grande's 'Yes, And?' Adds Second Week at No. 1 on ''Billboard'' Global Charts |url=https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-global-charts-number-one-second-week-1235591406/ |access-date=January 31, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 30, 2024 |archive-url=https://web.archive.org/web/20240130022504/https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-global-charts-number-one-second-week-1235591406/ |url-status=live}}</ref> and was followed by a remix featuring [[Mariah Carey]] on February 16.<ref>{{cite magazine |last=Lipshutz |first=Jason |date=February 16, 2024 |title=Friday Music Guide: New Music From Ariana Grande & Mariah Carey, Vampire Weekend, Dua Lipa and More |url=https://www.billboard.com/music/pop/friday-music-guide-ariana-grande-mariah-carey-vampire-weekend-dua-lipa-1235609648/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=February 25, 2024 |archive-url=https://web.archive.org/web/20240225003448/https://www.billboard.com/music/pop/friday-music-guide-ariana-grande-mariah-carey-vampire-weekend-dua-lipa-1235609648/ |url-status=live}}</ref> The second single, "[[We Can't Be Friends (Wait for Your Love)]]", was released in tandem with the album.<ref>{{Cite web |last=Gonzalez |first=Alex |date=March 8, 2024 |title=Ariana Grande Comes To A Heartbreaking Conclusion On Her New Single, 'We Can't Be Friends (Wait For Your Love)' |url=https://uproxx.com/pop/ariana-grande-we-cant-be-friends-wait-for-your-love/ |archive-url=https://web.archive.org/web/20240308130941/https://uproxx.com/pop/ariana-grande-we-cant-be-friends-wait-for-your-love/ |archive-date=March 8, 2024 |access-date=March 8, 2024 |website=[[Uproxx]]}}</ref> Grande's first album in over three years,<ref>{{Cite magazine |last=Mier |first=Tomás |date=March 8, 2024 |title=Ariana Grande Releases 'Eternal Sunshine', First Album in Over 3 Years |url=https://www.rollingstone.com/music/music-news/ariana-grande-eternal-sunshine-release-1234983201/ |url-access=subscription |access-date=March 8, 2024 |magazine=[[Rolling Stone]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308060209/https://www.rollingstone.com/music/music-news/ariana-grande-eternal-sunshine-release-1234983201/ |url-status=live}}</ref> ''Eternal Sunshine'' marked her first major foray into [[Dance music|dance]] and [[House music|house]] music.<ref>{{cite magazine |last=Spanos |first=Brittany |date=March 8, 2024 |title=Ariana Grande is Gorgeously Exposed on 'Eternal Sunshine' |url=https://www.rollingstone.com/music/music-album-reviews/ariana-grande-eternal-sunshine-review-1234983313/ |url-access=subscription |access-date=March 8, 2024 |magazine=[[Rolling Stone]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308092533/https://www.rollingstone.com/music/music-album-reviews/ariana-grande-eternal-sunshine-review-1234983313/ |url-status=live}}</ref><ref>{{Cite magazine |last=Denis |first=Kyle |date=March 8, 2024 |title=Ariana Grande's 'Eternal Sunshine': All 13 Tracks Ranked |url=https://www.billboard.com/lists/ariana-grande-eternal-sunshine-songs-ranked/ |access-date=March 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308125523/https://www.billboard.com/lists/ariana-grande-eternal-sunshine-songs-ranked/ |url-status=live}}</ref> Met with universal acclaim, critics dubbed it one of her most mature and sophisticated records yet.<ref>
* {{cite web |url=https://www.nme.com/reviews/album/ariana-grande-eternal-sunshine-lyrics-tracklist-3598038 |title=Ariana Grande – 'Eternal Sunshine' review: a compelling mood piece |website=[[NME]] |last=Levine |first=Nick |date=March 8, 2024 |access-date=March 8, 2024 |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308092649/https://www.nme.com/reviews/album/ariana-grande-eternal-sunshine-lyrics-tracklist-3598038 |url-status=live}}
* {{Cite web |last=Harrison |first=Emma |date=March 11, 2024 |title=Ariana Grande – Eternal Sunshine |url=https://www.clashmusic.com/reviews/ariana-grande-eternal-sunshine/ |access-date=March 12, 2024 |magazine=[[Clash (magazine)|Clash]] |archive-date=March 12, 2024 |archive-url=https://web.archive.org/web/20240312084232/https://www.clashmusic.com/reviews/ariana-grande-eternal-sunshine/ |url-status=live}}
* {{Cite news |last=Snapes |first=Laura |date=March 8, 2024 |title=Ariana Grande: Eternal Sunshine review – perceptive post-divorce album is nearly spotless |url=https://www.theguardian.com/music/2024/mar/08/ariana-grande-eternal-sunshine-album-review |url-status=live |archive-url=https://web.archive.org/web/20240308092534/https://www.theguardian.com/music/2024/mar/08/ariana-grande-eternal-sunshine-album-review |archive-date=March 8, 2024 |access-date=March 8, 2024 |newspaper=[[The Guardian]] |issn=0261-3077}}
* {{Cite news |last=Zoladz |first=Lindsay |date=March 8, 2024 |title=Ariana Grande Spins Heartbreak Into Gold on 'Eternal Sunshine' |url=https://www.nytimes.com/2024/03/08/arts/music/ariana-grande-eternal-sunshine-review.html |access-date=March 8, 2024 |newspaper=[[The New York Times]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308170557/https://www.nytimes.com/2024/03/08/arts/music/ariana-grande-eternal-sunshine-review.html |url-status=live}}
* {{cite web |last=Tafoya |first=Harry |date=March 11, 2024 |title=Ariana Grande: eternal sunshine Album Review |url=https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/ |access-date=March 11, 2024 |website=[[Pitchfork (website)|Pitchfork]] |url-status=live |archive-date=March 11, 2024 |archive-url=https://web.archive.org/web/20240311041548/https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/}}</ref> Both the album and its second single debuted atop the ''Billboard'' 200 and the Hot 100 respectively,<ref name="wcbfES">{{Cite web |last=Garcia |first=Thania |date=March 18, 2024 |title=Ariana Grande Scores Sixth No. 1 Album and Launches 'We Can't Be Friends (Wait for Your Love)' to Top of Hot 100 |url=https://variety.com/2024/music/news/ariana-grande-eternal-sunshine-number-one-billboard-songs-albums-charts-1235944996/ |archive-url=https://web.archive.org/web/20240318201604/https://variety.com/2024/music/news/ariana-grande-eternal-sunshine-number-one-billboard-songs-albums-charts-1235944996/ |archive-date=March 18, 2024 |access-date=March 20, 2024 |website=[[Variety (magazine)|Variety]] |url-status=live}}</ref> achieving Grande's third-largest sales week (227,000 units) and making her the woman with the [[List of Billboard Hot 100 chart achievements and milestones#Most number-one debuts|most Hot 100 number-one debuts]] (7).<ref name="wcbfn1"/><ref>{{Cite magazine |last=Caulfield |first=Keith |date=March 17, 2024 |title=Ariana Grande Scores Sixth No. 1 Album on ''Billboard'' 200 With 'Eternal Sunshine' |url=https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-number-one-billboard-200-albums-chart-1235635290/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=July 15, 2024 |archive-url=https://web.archive.org/web/20240715181055/https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-number-one-billboard-200-albums-chart-1235635290/ |url-status=live}}</ref> Elsewhere, the album debuted at number one in thirteen countries, including Australia,<ref>{{cite magazine |last=Brandle |first=Lars |date=March 15, 2024 |title=Ariana Grande Shines at No. 1 In Australia With 'Eternal Sunshine' |url=https://www.billboard.com/music/chart-beat/ariana-grande-no-1-australia-eternal-sunshine-1235634094/ |url-status=live |archive-url=https://web.archive.org/web/20240319113853/https://www.billboard.com/music/chart-beat/ariana-grande-no-1-australia-eternal-sunshine-1235634094/ |archive-date=March 19, 2024 |access-date=March 19, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Canada,<ref>{{cite magazine |date=March 20, 2024 |title=Canadian Albums Chart (Week of March 23, 2024) |url=https://www.billboard.com/charts/canadian-albums/2024-03-23 |archive-url=https://web.archive.org/web/20240319205617/https://www.billboard.com/charts/canadian-albums/2024-03-23/ |archive-date=March 19, 2024 |access-date=March 20, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and the UK.<ref>{{Cite magazine |last=Brandle |first=Lars |date=March 18, 2024 |title=Ariana Grande's 'Eternal Sunshine' Glows at No. 1 In U.K. |url=https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-no-1-uk-1235634172/ |access-date=July 25, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 19, 2025 |archive-url=https://web.archive.org/web/20250119204456/https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-no-1-uk-1235634172/ |url-status=live}}</ref> With ''Eternal Sunshine'' and ''Thank U, Next'', Grande became the first woman to have two albums produce multiple number-one single debuts in the US.<ref name="wcbfES"/> It also marked her first instance of reaching the top of both the ''Billboard'' [[Billboard charts#Other charts|Hot 100 Songwriters and Hot 100 Producers]] charts.<ref>{{cite magazine |first=Xander |last=Zellner |title=Ariana Grande Rules Hot 100 Songwriters & Producers Charts for First Time |url=https://www.billboard.com/music/chart-beat/ariana-grande-hot-100-songwriters-producers-charts-first-time-1235637168/ |magazine=[[Billboard (magazine)|Billboard]] |date=March 20, 2024 |access-date=March 21, 2024 |archive-date=March 20, 2024 |archive-url=https://web.archive.org/web/20240320222341/https://www.billboard.com/music/chart-beat/ariana-grande-hot-100-songwriters-producers-charts-first-time-1235637168/ |url-status=live}}</ref> Topping the [[Pop Airplay]] chart for two weeks,<ref>{{Cite web |last=Cantor |first=Brian |date=May 26, 2024 |title=Ariana Grande's "We Can't Be Friends" Spends 2nd Week As Pop Radio's #1 Song |url=https://headlineplanet.com/home/2024/05/26/ariana-grandes-we-cant-be-friends-spends-2nd-week-as-pop-radios-1-song/ |access-date=October 10, 2024 |website=Headline Planet |archive-date=September 16, 2024 |archive-url=https://web.archive.org/web/20240916101138/https://headlineplanet.com/home/2024/05/26/ariana-grandes-we-cant-be-friends-spends-2nd-week-as-pop-radios-1-song/ |url-status=live}}</ref> "We Can't Be Friends (Wait for Your Love)" marked Grande's tenth number-one.<ref>{{Cite magazine |last=Trust |first=Gary |date=May 17, 2024 |title=Ariana Grande's 'We Can't Be Friends (Wait for Your Love)' Hits No. 1 on Pop Airplay Chart |url=https://www.billboard.com/music/chart-beat/ariana-grande-we-cant-be-friends-wait-for-your-love-number-one-pop-airplay-chart-1235686229/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 12, 2024 |archive-url=https://web.archive.org/web/20241212075736/https://www.billboard.com/music/chart-beat/ariana-grande-we-cant-be-friends-wait-for-your-love-number-one-pop-airplay-chart-1235686229/ |url-status=live}}</ref>
On May 6, 2024, Grande performed at the [[Met Gala]] and was joined on stage by [[Cynthia Erivo]] to close out her performance.<ref name="voguemet">{{cite magazine |url=https://www.vogue.com/article/ariana-grande-cynthia-erivo-performance-met-gala-2024 |title=Ariana Grande Closed Out the 2024 Met Gala With an Epic Performance—And a Special Guest Appearance From Cynthia Erivo |date=May 7, 2024 |magazine=[[Vogue (magazine)|Vogue]] |access-date=May 7, 2024 |archive-date=May 7, 2024 |archive-url=https://web.archive.org/web/20240507071546/https://www.vogue.com/article/ariana-grande-cynthia-erivo-performance-met-gala-2024 |url-status=live}}</ref> "[[The Boy Is Mine (Ariana Grande song)|The Boy Is Mine]]", which reached the top 20 on the Hot 100,<ref>{{cite magazine |last=Zellner |first=Xander |date=March 18, 2024 |title=Ariana Grande Charts 12 Songs on Hot 100 From New Album 'Eternal Sunshine' |url=https://www.billboard.com/music/chart-beat/ariana-grande-12-songs-hot-100-eternal-sunshine-1235636091/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 27, 2024 |archive-url=https://web.archive.org/web/20240327211415/https://www.billboard.com/music/chart-beat/ariana-grande-12-songs-hot-100-eternal-sunshine-1235636091/ |url-status=live}}</ref> was issued as the third ''Eternal Sunshine'' single in June;<ref>* {{Cite magazine |last=Dailey |first=Hannah |date=June 7, 2024 |title=Watch Brandy & Monica Make Surprise Cameos in Ariana Grande's 'The Boy Is Mine' Music Video |url=https://www.billboard.com/music/music-news/ariana-grande-boy-is-mine-video-brandy-monica-cameos-1235703500/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=September 13, 2024 |archive-url=https://web.archive.org/web/20240913222419/https://www.billboard.com/music/music-news/ariana-grande-boy-is-mine-video-brandy-monica-cameos-1235703500/ |url-status=live}}
* {{Cite magazine |title=YOUR RADIO ADD RECAPS |url=https://hitsdailydouble.com/pop_mart%26id%3D341561%26title%3DYOUR-RADIO-ADD-RECAPS |archive-url=https://web.archive.org/web/20240612000716/https://hitsdailydouble.com/pop_mart%26id%3D341561%26title%3DYOUR-RADIO-ADD-RECAPS |archive-date=June 12, 2024 |access-date=October 10, 2024 |magazine=[[Hits (magazine)|HITS Daily Double]] |url-status=live}}</ref> a remix featuring [[Brandy Norwood|Brandy]] and [[Monica (singer)|Monica]] followed later that month.<ref>{{cite web |url=https://www.nme.com/news/music/listen-to-ariana-grandes-the-boy-is-mine-remix-with-brandy-and-monica-3767507 |title=Listen to Ariana Grande's 'The Boy Is Mine' remix with Brandy and Monica |website=[[NME]] |last=Pilley |first=Max |date=June 21, 2024 |access-date=June 22, 2024 |archive-date=September 17, 2024 |archive-url=https://web.archive.org/web/20240917214826/https://www.nme.com/news/music/listen-to-ariana-grandes-the-boy-is-mine-remix-with-brandy-and-monica-3767507 |url-status=live}}</ref> On August 22, 2024, Grande released a reissue of her second studio album, ''My Everything'', for the tenth anniversary of the record.<ref>{{Cite magazine |last=Dailey |first=Hannah |date=August 22, 2024 |title=Ariana Grande Drops 'My Everything' 10th Anniversary Vinyl & Deluxe |url=https://www.billboard.com/music/music-news/ariana-grande-my-everything-10th-anniversary-vinyl-deluxe-1235758624/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 22, 2024 |archive-date=December 20, 2024 |archive-url=https://web.archive.org/web/20241220072709/https://www.billboard.com/music/music-news/ariana-grande-my-everything-10th-anniversary-vinyl-deluxe-1235758624/ |url-status=live}}</ref> Two extended editions of ''Eternal Sunshine'' containing the pre-released single remixes, guest vocals from [[Troye Sivan]], and live versions of several tracks, were [[Surprise album|surprise released]] in March and October 2024.<ref>{{Cite magazine |last=Kaufman |first=Gil |date=March 11, 2024 |title=Ariana Grande Releases 'Sightly Deluxe' Edition of 'Eternal Sunshine' With Mariah Carey, Troye Sivan Features |url=https://www.billboard.com/music/pop/ariana-grande-slightly-deluxe-edition-eternal-sunshine-mariah-carey-troye-sivan-1235629656/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 11, 2024 |archive-url=https://web.archive.org/web/20240311145032/https://www.billboard.com/music/pop/ariana-grande-slightly-deluxe-edition-eternal-sunshine-mariah-carey-troye-sivan-1235629656/ |url-status=live}}</ref><ref>{{Cite magazine |last=Dailey |first=Hannah |date=October 1, 2024 |title=Ariana Grande Surprise Drops 'Eternal Sunshine' Deluxe Featuring 7 Live Performances & Videos |url=https://www.billboard.com/music/music-news/ariana-grande-eternal-sunshine-deluxe-live-versions-1235789640/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 7, 2024 |archive-url=https://web.archive.org/web/20241007102933/https://www.billboard.com/music/music-news/ariana-grande-eternal-sunshine-deluxe-live-versions-1235789640/ |url-status=live}}</ref> Grande appeared as the musical guest on ''[[Saturday Night Live]]'' on [[Saturday Night Live season 49#ep962|March 9, 2024]], to promote ''Eternal Sunshine''.<ref>{{Cite magazine |last=Peters |first=Mitchell |date=March 10, 2024 |title=Ariana Grande Powerfully Delivers Two New 'Eternal Sunshine' Songs on 'SNL': Watch |url=https://www.billboard.com/music/music-news/ariana-grande-snl-eternal-sunshine-songs-performance-videos-1235628925/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 24, 2024 |archive-url=https://web.archive.org/web/20240324171019/https://www.billboard.com/music/music-news/ariana-grande-snl-eternal-sunshine-songs-performance-videos-1235628925/ |url-status=live}}</ref> She featured on the remix to "[[Sympathy Is a Knife#Ariana Grande remix|Sympathy Is a Knife]]" on [[Charli XCX]]'s remix album ''[[Brat and It's Completely Different but Also Still Brat]]'', released on October 11, 2024.<ref>{{Cite web |last=Chelosky |first=Danielle |date=October 11, 2024 |title=Stream Charli XCX's New ''Brat'' Remixes Feat. Ariana Grande, Bon Iver, The 1975, & More |url=https://www.stereogum.com/2283580/charli-xcx-brat-remixes-album/music/ |access-date=October 12, 2024 |website=[[Stereogum]] |archive-date=December 11, 2024 |archive-url=https://web.archive.org/web/20241211230534/https://www.stereogum.com/2283580/charli-xcx-brat-remixes-album/music/ |url-status=live}}</ref> On the ''[[Las Culturistas]]'' podcast, Grande acknowledged that she would likely scale back her pop music output compared to earlier in her career, shifting her focus more towards acting.<ref>{{Cite magazine |last=Dailey |first=Hannah |date=November 6, 2024 |title=Ariana Grande Reveals 'Scary' Plans to Scale Back Pop Star Career & Focus More on Musical Theater |url=https://www.billboard.com/music/music-news/ariana-grande-scale-back-pop-career-focus-musical-theater-1235821508/ |access-date=November 18, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219194326/https://www.billboard.com/music/music-news/ariana-grande-scale-back-pop-career-focus-musical-theater-1235821508/ |url-status=live}}</ref> ''Eternal Sunshine'' was ranked as 2024's thirteenth-best-selling and ninth-most-streamed album globally by the [[International Federation of the Phonographic Industry]] (IFPI).<ref name="ifpi2024">{{cite web |date=February 18, 2025 |title=Taylor Swift makes music history as IFPI's Biggest-Selling Global Recording Artist of the Year for the fifth time |url=https://www.ifpi.org/taylor-swift-makes-music-history-as-ifpis-biggest-selling-global-recording-artist-of-the-year-for-the-fifth-time |access-date=April 8, 2025 |publisher=[[International Federation of the Phonographic Industry]] (IFPI) |archive-date=April 3, 2025 |archive-url=https://web.archive.org/web/20250403103458/https://www.ifpi.org/taylor-swift-makes-music-history-as-ifpis-biggest-selling-global-recording-artist-of-the-year-for-the-fifth-time/ |url-status=live}}</ref>
At the [[67th Annual Grammy Awards]], Grande was nominated for [[Grammy Award for Best Pop Vocal Album|Best Pop Vocal Album]] (''Eternal Sunshine''), [[Grammy Award for Best Pop Duo/Group Performance|Best Pop Duo/Group Performance]] ("The Boy Is Mine" remix), and [[Grammy Award for Best Dance Pop Recording|Best Dance Pop Recording]] ("Yes, And?").<ref>{{Cite news |date=February 2, 2025 |title=All the winners and nominees at the 2025 Grammy Awards |url=https://www.bbc.com/news/articles/ckg0jg4n0z4o/ |access-date=February 5, 2025 |publisher=[[BBC News]] |archive-date=February 3, 2025 |archive-url=https://web.archive.org/web/20250203185610/https://www.bbc.com/news/articles/ckg0jg4n0z4o |url-status=live}}</ref> ''[[Eternal Sunshine Deluxe: Brighter Days Ahead]]'', a reissue of ''Eternal Sunshine'', was released on March 28, 2025.<ref>{{Cite magazine |last=Aniftos |first=Rania |date=March 28, 2025 |title=Ariana Grande Welcomes 'Brighter Days Ahead' With 'Eternal Sunshine' Deluxe Album: Stream It Now |url=https://www.billboard.com/music/pop/ariana-grande-eternal-sunshine-deluxe-brighter-days-ahead-1235933370/ |access-date=March 29, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 28, 2025 |archive-url=https://web.archive.org/web/20250328130116/https://www.billboard.com/music/pop/ariana-grande-eternal-sunshine-deluxe-brighter-days-ahead-1235933370/ |url-status=live}}</ref> Grande starred as the protagonist Peaches in the accompanying short film ''[[Brighter Days Ahead]]'', which she directed and wrote with [[Christian Breslauer]]; it was released on the same day. Her directorial debut,<ref>{{Cite magazine |last=Fell |first=Nicole |date=March 28, 2025 |title=Ariana Grande Revisits Love and Loss in Magical Short Film 'Brighter Days Ahead' |url=https://www.hollywoodreporter.com/news/music-news/ariana-grande-short-film-brighter-days-ahead-1236175163/ |access-date=March 29, 2025 |magazine=The Hollywood Reporter}}</ref> the short film won the [[MTV Video Music Award for Video of the Year|Video of the Year]] award at the [[2025 MTV Video Music Awards]].<ref>{{Cite magazine |last=Nordyke |first=Kimberly |date=September 7, 2025 |title=MTV VMAs: Winners List |url=https://www.hollywoodreporter.com/lists/mtv-vmas-2025-winners-list/ |url-status=live |archive-url=https://web.archive.org/web/20250907203537/https://www.hollywoodreporter.com/lists/mtv-vmas-2025-winners-list/ |archive-date=September 7, 2025 |access-date=September 7, 2025 |magazine=The Hollywood Reporter}}</ref> With the release of the reissue, ''Eternal Sunshine'' became Grande's longest-running number one album in the US (three weeks).<ref>{{Cite news |last=Thompson |first=Stephen |date=April 8, 2025 |title=Ariana Grande's 'Eternal Sunshine' takes a wicked leap to No. 1, a year after its release |url=https://www.npr.org/2025/04/08/g-s1-59035/ariana-grande-eternal-sunshine-deluxe-no-1-charts/ |access-date=April 20, 2025 |publisher=[[NPR]] |archive-date=April 22, 2025 |archive-url=https://web.archive.org/web/20250422220948/https://www.npr.org/2025/04/08/g-s1-59035/ariana-grande-eternal-sunshine-deluxe-no-1-charts |url-status=live}}</ref> Aided by ''Brighter Days Ahead'', the album returned to the top of the charts in Australia, Canada, Ireland, and New Zealand, over a year after its release.<ref>* {{Cite magazine |last=Lynch |first=Jessica |date=April 4, 2025 |title=Grande Larceny: Ariana Steals Back the ARIA No. 1 Spot |url=https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-returns-no-1-aria-chart-1235939255/ |access-date=April 4, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 4, 2025 |archive-url=https://web.archive.org/web/20250404092033/https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-returns-no-1-aria-chart-1235939255/ |url-status=live}}
* {{Cite magazine |last=Cusson |first=Michael |date=January 2, 2013 |title=''Billboard'' Canadian Albums |url=https://www.billboard.com/charts/canadian-albums/ |access-date=April 12, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 31, 2022 |archive-url=https://web.archive.org/web/20220331124809/https://www.billboard.com/charts/canadian-albums/ |url-status=live}}
* {{cite web |date=April 3, 2025 |title=Official Irish Albums Chart (3 April 2025 - 10 April 2025) |url=https://www.officialcharts.com/charts/irish-albums-chart/20250403/ie7502/ |access-date=May 2, 2025 |publisher=[[Official Charts Company]]}}
* {{Cite web |title=Kōpae Tiketike 40 Ōkawa {{!}} Official Top 40 Albums |url=https://aotearoamusiccharts.co.nz/charts/albums |access-date=April 4, 2025 |publisher=[[Official Aotearoa Music Charts]] |archive-date=April 4, 2025 |archive-url=https://web.archive.org/web/20250404144738/https://aotearoamusiccharts.co.nz/charts/albums |url-status=live}}</ref> The bonus track "[[Twilight Zone (Ariana Grande song)|Twilight Zone]]" was released as the reissue's lead single in April 2025, reaching the top ten on the ''Billboard'' Global 200 and the UK singles chart.<ref>{{Cite magazine |last=Trust |first=Gary |date=April 7, 2025 |title=Lady Gaga & Bruno Mars' 'Die With a Smile' Tops Global 200 Chart for 15th Week |url=https://www.billboard.com/music/chart-beat/lady-gaga-bruno-mars-die-with-a-smile-global-200-number-one-15th-week-1235940912/ |access-date=May 3, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 7, 2025 |archive-url=https://web.archive.org/web/20250407190138/https://www.billboard.com/music/chart-beat/lady-gaga-bruno-mars-die-with-a-smile-global-200-number-one-15th-week-1235940912/ |url-status=live}}</ref><ref>{{Cite magazine |last=Smith |first=Thomas |date=April 4, 2025 |title=Alex Warren's 'Ordinary' Scores Third Week at No. 1 on U.K. Singles Chart |url=https://www.billboard.com/music/chart-beat/alex-warren-ordinary-third-week-number-1-uk-singles-chart-1235939354/ |access-date=May 3, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 10, 2025 |archive-url=https://web.archive.org/web/20250410200246/https://www.billboard.com/music/chart-beat/alex-warren-ordinary-third-week-number-1-uk-singles-chart-1235939354/ |url-status=live}}</ref> Later that month, Grande featured on [[Jeff Goldblum]] and the Mildred Snitzer Orchestra's jazz album ''Still Blooming'' for a rendition of the song "[[I Don't Know Why (I Just Do)]]".<ref>{{Cite magazine |last=Kelly |first=Tyler Damara |date=April 25, 2025 |title=Ariana Grande and Jeff Goldblum join forces on new single, "I Don't Know Why (I Just Do)" |url=https://www.thelineofbestfit.com/news/ariana-grande-and-jeff-goldblum-join-forces-on-new-single-i-dont-know-why-i-just-do/ |access-date=December 21, 2025 |magazine=[[The Line of Best Fit]] |archive-date=May 13, 2025 |archive-url=https://web.archive.org/web/20250513102444/https://www.thelineofbestfit.com/news/ariana-grande-and-jeff-goldblum-join-forces-on-new-single-i-dont-know-why-i-just-do |url-status=live}}</ref> She and Mariah Carey joined [[Barbra Streisand]] on "One Heart, One Voice" for Streisand's album ''[[The Secret of Life: Partners, Volume Two]]'', released on June 27, 2025.<ref>{{cite magazine |last=Lynch |first=Jessica |date=July 1, 2025 |title=Barbra Streisand Says Collab With Mariah Carey and Ariana Grande 'Felt Inevitable' |url=https://www.billboard.com/music/pop/barbra-streisand-mariah-carey-ariana-grande-collab-1236012363/ |access-date=July 17, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=July 24, 2025 |archive-url=https://web.archive.org/web/20250724014359/https://www.billboard.com/music/pop/barbra-streisand-mariah-carey-ariana-grande-collab-1236012363/ |url-status=live}}</ref> Whilst describing the three as "the holy trinity of glorious sound", Melissa Ruggieri of ''[[USA Today]]'' called the track an "otherwise generic ballad [that] showcases a trio steeped in restraint".<ref>{{Cite news |last=Ruggieri |first=Melissa |date=June 27, 2025 |title=Barbra Streisand swoons with McCartney, Dylan, Mariah on lush duets album: Review |url=https://www.usatoday.com/story/entertainment/music/2025/06/27/barbra-streisand-duets-album-review/84354045007/ |access-date=July 17, 2025 |work=[[USA Today]] |archive-date=July 24, 2025 |archive-url=https://web.archive.org/web/20250724211133/https://www.usatoday.com/story/entertainment/music/2025/06/27/barbra-streisand-duets-album-review/84354045007/ |url-status=live}}</ref>
Grande starred as [[Glinda#Wicked|Galinda Upland]] alongside [[Cynthia Erivo]] as [[Elphaba Thropp]] in the [[Wicked (film franchise)|two-part film adaptation]] of the fantasy musical ''[[Wicked (musical)|Wicked]]'', directed by [[Jon M. Chu]].<ref>{{Cite web |last=Garner |first=Glenn |date=November 3, 2024 |title=Ariana Grande Understands Fan Criticism Of Her 'Wicked' Casting: "I Get It" |url=https://deadline.com/2024/11/ariana-grande-understands-fan-criticism-wicked-casting-1236165900/ |access-date=November 4, 2024 |website=Deadline Hollywood |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219111414/https://deadline.com/2024/11/ariana-grande-understands-fan-criticism-wicked-casting-1236165900/ |url-status=live}}</ref> She was cast in November 2021 after auditioning five times for the role.<ref name="wickedcasting">{{cite magazine |last1=Shafer |first1=Ellise |last2=Donnelly |first2=Matt |title=Ariana Grande and Cynthia Erivo to Star in 'Wicked' Musical for Universal |url=https://variety.com/2021/film/news/ariana-grande-cynthia-erivo-wicked-musical-universal-1235105480/ |magazine=Variety |access-date=November 4, 2021 |date=November 4, 2021 |archive-date=June 15, 2022 |archive-url=https://web.archive.org/web/20220615170245/https://variety.com/2021/film/news/ariana-grande-cynthia-erivo-wicked-musical-universal-1235105480/ |url-status=live}}</ref> She was credited with her birth name Ariana Grande-Butera, which was her name when she first saw the stage musical at age ten.<ref>{{Cite magazine |first=Angelique |last=Jackson |date=November 4, 2024 |title=Ariana Grande Is Credited in 'Wicked' as 'Ariana Grande-Butera' Because 'That Was My Name When I Went to See the Show' at 10 Years Old |url=https://variety.com/2024/film/news/ariana-grande-wicked-credit-full-name-butera-1236198018/ |access-date=November 5, 2024 |magazine=[[Variety (magazine)|Variety]] |archive-date=July 10, 2025 |archive-url=https://web.archive.org/web/20250710013341/https://variety.com/2024/film/news/ariana-grande-wicked-credit-full-name-butera-1236198018/ |url-status=live}}</ref> Grande reported that she began taking acting and singing lessons months before she auditioned for the role of Glinda because she wanted to be cast "so badly".<ref>{{Cite web |date=June 17, 2024 |title=Ariana Grande took singing and acting lessons to prepare for Wicked audition |url=https://www.pearlanddean.com/ariana-grande-took-singing-and-acting-lessons-to-prepare-for-wicked-audition/ |access-date=March 17, 2025 |publisher=Pearl & Dean Cinemas |archive-date=May 23, 2025 |archive-url=https://web.archive.org/web/20250523142607/https://www.pearlanddean.com/ariana-grande-took-singing-and-acting-lessons-to-prepare-for-wicked-audition/ |url-status=live}}</ref> The first part, ''[[Wicked (2024 film)|Wicked]]'', was theatrically released in November 2024,<ref>{{cite web |last1=D'Alessandro |first1=Anthony |date=July 1, 2024 |title='Wicked' Shifts Earlier In November, Dates Against 'Gladiator II': Is Another 'Barbenheimer' Box Office Weekend In Store? |url=https://deadline.com/2024/07/wicked-release-date-change-moana-2-1235999048/ |access-date=October 10, 2024 |website=Deadline Hollywood |archive-date=July 1, 2024 |archive-url=https://web.archive.org/web/20240701230753/https://deadline.com/2024/07/wicked-release-date-change-moana-2-1235999048/ |url-status=live}}</ref> followed by the second part, ''[[Wicked: For Good]]'', in November 2025.<ref>{{Cite news |last=Ardrey |first=Taylor |date=November 19, 2025 |title='Wicked: For Good' debuts in theaters this week. See release date, cast, more. |url=https://www.usatoday.com/story/entertainment/movies/2025/11/19/wicked-for-good-theatrical-release-date/87337790007/ |access-date=November 21, 2025 |work=[[USA Today]] |archive-date=November 27, 2025 |archive-url=https://web.archive.org/web/20251127003735/https://www.usatoday.com/story/entertainment/movies/2025/11/19/wicked-for-good-theatrical-release-date/87337790007/ |url-status=live}}</ref> Critically acclaimed, ''Wicked'' was regarded amongst the best musical films of the 21st century and declared a pop culture phenomenon by various media.<ref>* {{cite web |date=July 2, 2025 |title=Readers Choose Their Top Movies of the 21st Century |url=https://www.nytimes.com/interactive/2025/movies/readers-movies-21st-century.html |access-date=July 2, 2025 |work=[[The New York Times]] |archive-date=July 3, 2025 |archive-url=https://web.archive.org/web/20250703010446/https://www.nytimes.com/interactive/2025/movies/readers-movies-21st-century.html |url-status=live}}
* {{Cite news |last1=Burr |first1=Ty |author-link=Ty Burr |last2=Kumar |first2=Naveen |date=February 27, 2025 |title=The 25 best movie musicals of the 21st century |url=https://www.washingtonpost.com/entertainment/movies/2025/02/27/best-musical-movies/ |access-date=April 12, 2025 |newspaper=The Washington Post |archive-date=April 5, 2025 |archive-url=https://web.archive.org/web/20250405160220/https://www.washingtonpost.com/entertainment/movies/2025/02/27/best-musical-movies/ |url-status=live}}
* {{cite web |date=December 15, 2024 |title=10 Best Fantasy Movies of the 2020s So Far, Ranked |url=https://collider.com/fantasy-movies-2020s-best-ranked/ |website=[[Collider (website)|Collider]] |access-date=July 25, 2025 |archive-date=December 17, 2024 |archive-url=https://web.archive.org/web/20241217220210/https://collider.com/fantasy-movies-2020s-best-ranked/ |url-status=live}}
* {{cite web |last=Ciriaco |first=Andrea |date=December 24, 2024 |title=The 12 Best Movie Musicals of the Last 25 Years, Ranked |url=https://collider.com/best-movie-musicals-last-25-years-ranked/ |access-date=January 31, 2025 |work=Collider |archive-date=December 28, 2024 |archive-url=https://web.archive.org/web/20241228151840/https://collider.com/best-movie-musicals-last-25-years-ranked/ |url-status=live}}
* {{cite web |date=November 26, 2024 |title=The 25 Best Musicals of the 21st Century, Ranked |url=https://collider.com/best-movie-musicals-of-the-21st-century/ |website=[[Collider (website)|Collider]]}}
* {{Cite web |last=Hemenway |first=Megan |date=February 21, 2025 |title=10 Best Fantasy Movies Of The 2020s (So Far), Ranked |url=https://screenrant.com/best-fantasy-movies-2020s-so-far-list/ |access-date=February 23, 2025 |website=Screen Rant |archive-date=July 18, 2025 |archive-url=https://web.archive.org/web/20250718172824/https://screenrant.com/best-fantasy-movies-2020s-so-far-list/ |url-status=live}}
* {{Cite web |date=March 3, 2025 |title=40 best movie musicals of all time |url=https://www.timeout.com/movies/best-movie-musicals-of-all-time |access-date=April 12, 2025 |website=Time Out |archive-date=July 28, 2025 |archive-url=https://web.archive.org/web/20250728203409/https://www.timeout.com/movies/best-movie-musicals-of-all-time |url-status=live}}
* {{Cite web |date=November 25, 2024 |title=The 22 Best Witch Movies of All Time |url=https://www.vulture.com/article/best-witch-movies.html |access-date=April 18, 2025 |website=[[Vulture (website)|Vulture]] |archive-date=July 15, 2025 |archive-url=https://web.archive.org/web/20250715023645/https://www.vulture.com/article/best-witch-movies.html |url-status=live}}</ref><ref>* {{cite magazine |date=November 27, 2024 |title=Why 'Wicked' Is What Society Needs Right Now |url=https://elle.com/uk/life-and-culture/culture/a63018974/wicked-representation |access-date=December 8, 2024 |magazine=[[Elle (magazine)|Elle]] |archive-date=December 7, 2024 |archive-url=https://web.archive.org/web/20241207060751/https://www.elle.com/uk/life-and-culture/culture/a63018974/wicked-representation/ |url-status=live}}
* {{Cite web |date=December 6, 2024 |title='Wicked' Choreographer Breaks Down Steps to Viral 'What Is This Feeling?' Dance |url=https://www.today.com/popculture/movies/what-is-this-feeling-loathing-dance-wicked-choreographer-rcna183164 |access-date=December 9, 2024 |website=[[Today (American TV program)|Today]] |archive-date=December 8, 2024 |archive-url=https://web.archive.org/web/20241208084716/https://www.today.com/popculture/movies/what-is-this-feeling-loathing-dance-wicked-choreographer-rcna183164 |url-status=live}}</ref> ''For Good'' was met with lukewarm reviews and less enthusiasm than its predecessor.<ref>* {{cite news |last1=McIntosh |first1=Steven |date=November 19, 2025 |title=Wicked sequel leaves critics less spellbound than first film |url=https://www.bbc.com/news/articles/c1m3ddkn3gdo |access-date=November 22, 2025 |publisher=[[BBC]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121173510/https://www.bbc.com/news/articles/c1m3ddkn3gdo |url-status=live}}
* {{cite magazine |last1=Murray |first1=Conor |date=November 18, 2025 |title='Wicked: For Good' Reviews Lag Behind Part One—But Still Expected To Thrive At Box Office |url=https://www.forbes.com/sites/conormurray/2025/11/18/wicked-for-good-reviews-lag-behind-part-one-but-still-expected-to-thrive-at-box-office/ |access-date=November 22, 2025 |magazine=[[Forbes]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121195136/https://www.forbes.com/sites/conormurray/2025/11/18/wicked-for-good-reviews-lag-behind-part-one-but-still-expected-to-thrive-at-box-office/ |url-status=live}}
* {{Cite news |last1=Whipp |first1=Glenn |date=November 21, 2025 |title=Why 'Wicked's' Oscar spell might be broken 'For Good' |url=https://www.latimes.com/entertainment-arts/awards/newsletter/2025-11-21/wicked-for-good-oscars-cynthia-erivo-ariana-grande |access-date=November 22, 2025 |work=[[Los Angeles Times]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121152135/https://www.latimes.com/entertainment-arts/awards/newsletter/2025-11-21/wicked-for-good-oscars-cynthia-erivo-ariana-grande |url-status=live}}
* {{cite magazine |last1=Carson |first1=Lexi |date=November 18, 2025 |title='Wicked: For Good' — What the Critics Are Saying |url=https://www.hollywoodreporter.com/movies/movie-news/wicked-for-good-reviews-what-critics-are-saying-1236430079/ |access-date=November 22, 2025 |magazine=[[The Hollywood Reporter]] |publisher=[[Penske Media Corporation]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121230046/https://www.hollywoodreporter.com/movies/movie-news/wicked-for-good-reviews-what-critics-are-saying-1236430079/ |url-status=live}}
* {{cite web |last1=Campbell |first1=Christopher |date=November 18, 2025 |title=''Wicked: For Good'' First Reviews: Darker, More Emotional, and Led by Stellar Performances |url=https://editorial.rottentomatoes.com/article/wicked-for-good-first-reviews/ |access-date=November 22, 2025 |publisher=[[Rotten Tomatoes]] |archive-date=November 23, 2025 |archive-url=https://web.archive.org/web/20251123194610/https://editorial.rottentomatoes.com/article/wicked-for-good-first-reviews/ |url-status=live}}
* {{cite web |last1=Lattanzio |first1=Ryan |last2=Thompson |first2=Anne |date=November 21, 2025 |title=Did Critics Burst the 'Wicked: For Good' Bubble? How Mixed Reviews Might Impact Its Oscar Fate |url=https://www.indiewire.com/features/podcast/wicked-for-good-reviews-mixed-oscars-1235162109/ |access-date=November 22, 2025 |website=[[IndieWire]] |publisher=[[Penske Media Corporation]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121202557/https://www.indiewire.com/features/podcast/wicked-for-good-reviews-mixed-oscars-1235162109/ |url-status=live}}</ref> Both parts were listed among the top ten films of 2024 and 2025 by the [[American Film Institute]].<ref>{{Cite magazine |last=Hammond |first=Pete |date=2025-12-04 |title=AFI Awards Movie Top 10: 'Sinners', 'Avatar: Fire And Ash', 'Jay Kelly' Among Honorees |url=https://deadline.com/2025/12/afi-awards-2025-top-movies-list-1236636128/ |url-status=live |archive-url=https://web.archive.org/web/20251204212103/https://deadline.com/2025/12/afi-awards-2025-top-movies-list-1236636128/ |archive-date=December 4, 2025 |access-date=December 4, 2025 |magazine=[[Deadline Hollywood]]}}</ref> The two parts grossed $759 million and $539 million worldwide, becoming the highest-grossing and third-highest-grossing musical adaptation films of all time, respectively.<ref>{{Cite magazine |last=Grein |first=Paul |date=February 1, 2026 |title='Wicked: For Good' Tops $525 Million in Worldwide Grosses: Full List of Top-Grossing Film Adaptations of Broadway Musicals |url=https://www.billboard.com/lists/broadway-musical-films-biggest-box-office-wicked/ |access-date=February 2, 2026 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande's performance and comedic timing received praise from critics;<ref>* {{Cite news |last=Coscarelli |first=Joe |date=December 6, 2024 |title=Is the Real 'Wicked' Movie the Press Tour? |url=https://www.nytimes.com/2024/12/06/arts/music/wicked-movie-popcast-ariana-grande.html |url-access=subscription |archive-url=https://web.archive.org/web/20241207052640/https://www.nytimes.com/2024/12/06/arts/music/wicked-movie-popcast-ariana-grande.html |archive-date=December 7, 2024 |access-date=December 7, 2024 |newspaper=[[The New York Times]] |quote=Grande and Erivo have been praised for their performances onscreen}}
* {{Cite news |last=Welsh |first=Daniel |date=November 20, 2024 |title=Critics Have Their Say On Wicked – Does The Long-Awaited Movie Live Up To The Hype? |url=https://ca.news.yahoo.com/critics-wicked-does-long-awaited-082423692.html |access-date=November 28, 2024 |work=[[HuffPost]] |via=[[Yahoo News]] |quote=While it was Ariana who received initial Oscar buzz |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219024752/https://ca.news.yahoo.com/critics-wicked-does-long-awaited-082423692.html |url-status=live}}
* {{Cite web |last=Handler |first=Rachel |date=November 27, 2024 |title=Some Unsolicited Ideas for Ariana Grande's Next Movie |url=https://www.vulture.com/article/some-unsolicited-ideas-for-ariana-grandes-next-movie.html |access-date=November 28, 2024 |website=[[Vulture (website)|Vulture]] |quote=glowing praise about Ariana Grande's performance as Glinda |archive-date=November 28, 2024 |archive-url=https://web.archive.org/web/20241128102323/https://www.vulture.com/article/some-unsolicited-ideas-for-ariana-grandes-next-movie.html |url-status=live}}</ref> she was nominated for supporting actress categories at the [[97th Academy Awards]], the [[82nd Golden Globe Awards|82nd]] and [[83rd Golden Globe Awards]], the [[30th Critics' Choice Awards|30th]] and [[31st Critics' Choice Awards]], the [[31st Screen Actors Guild Awards|31st]] and [[32nd Actor Awards]], and the [[78th British Academy Film Awards]].<ref name="WickedNoms">
* {{Cite news |last=Gonzalez |first=Shivani |date=March 2, 2025 |title=Oscars 2025 Winners: Full List |url=https://www.nytimes.com/2025/03/02/movies/oscars-winners-list.html |access-date=March 3, 2025 |newspaper=[[The New York Times]] |archive-date=March 3, 2025 |archive-url=https://web.archive.org/web/20250303005821/https://www.nytimes.com/2025/03/02/movies/oscars-winners-list.html |url-status=live}}
* {{Cite news |last=Lee |first=Benjamin |date=January 5, 2025 |title=Golden Globes 2025: the full list of winners |url=https://www.theguardian.com/film/2025/jan/05/golden-globes-winners-list/ |access-date=January 6, 2025 |newspaper=[[The Guardian]]}}
* {{Cite news |last=Ruggieri |first=Melissa |date=January 11, 2026 |title=Your complete list of Golden Globe 2026 winners |url=https://www.usatoday.com/story/entertainment/movies/2026/01/11/golden-globes-2026-winners-complete-list/88097085007/ |access-date=January 12, 2026 |work=[[USA Today]] |archive-date=January 12, 2026 |archive-url=https://web.archive.org/web/20260112060345/https://www.usatoday.com/story/entertainment/movies/2026/01/11/golden-globes-2026-winners-complete-list/88097085007/ |url-status=live}}
* {{cite magazine |last1=Nordyke |first1=Kimberly |last2=Lewis |first2=Hilary |date=February 7, 2025 |title=Critics Choice: 'Anora' Wins Best Picture; 'Emilia Pérez', 'Wicked' and 'The Substance' Take 3 Awards Each |url=https://www.hollywoodreporter.com/movies/movie-news/2025-critics-choice-awards-winners-list-1236128672/ |access-date=February 11, 2025 |magazine=[[The Hollywood Reporter]] |archive-date=February 16, 2025 |archive-url=https://web.archive.org/web/20250216031134/https://www.hollywoodreporter.com/movies/movie-news/2025-critics-choice-awards-winners-list-1236128672/ |url-status=live}}
* {{cite magazine |last=Nordyke |first=Kimberly |date=January 4, 2026 |title=Critics Choice Awards: Full Winners List |url=https://www.hollywoodreporter.com/lists/critics-choice-awards-2026-winners-list-full/best-actor-188/ |access-date=January 5, 2026 |magazine=The Hollywood Reporter}}
* {{Cite news |last=''Guardian'' film |date=February 16, 2025 |title=Baftas 2025: the full list of winners |url=https://www.theguardian.com/film/2025/feb/16/baftas-2025-the-full-list-of-winners-live/ |access-date=February 17, 2025 |work=[[The Guardian]]}}
* {{Cite magazine |last1=Moreau |first1=Jordan |last2=Lang |first2=Brent |last3=Earl |first3=William |date=February 23, 2025 |title=SAG Awards 2025 Full Winners List: 'Conclave', 'Only Murders in the Building' and 'Shōgun' Take Home Top Honors |url=https://variety.com/2025/film/news/sag-awards-winners-2025-1236313200/ |access-date=February 24, 2025 |magazine=Variety |archive-date=April 20, 2025 |archive-url=https://web.archive.org/web/20250420045405/https://variety.com/2025/film/news/sag-awards-winners-2025-1236313200/ |url-status=live}}
* {{cite magazine |url=https://variety.com/2026/film/awards/sag-actor-awards-winners-sinners-studio-pitt-1236672938/ |title=SAG's Actor Awards Winners: 'Sinners' Wins Top Prize, 'The Studio' and 'The Pitt' Lead for TV |last1=Lang |first1=Brent |last2=Moreau |first2=Jordan |magazine=[[Variety (magazine)|Variety]] |date=March 1, 2026 |access-date=March 1, 2026}}</ref>
The [[Wicked: The Soundtrack|films' soundtracks]] were co-billed to Grande, who performed several songs from the musical and an original track titled "[[The Girl in the Bubble]]", written by [[Stephen Schwartz]] for the [[Wicked: For Good – The Soundtrack|''Wicked: For Good'' soundtrack]].<ref>{{Cite magazine |last=Comiter |first=Jordana |date=November 22, 2025 |title=''Wicked: For Good''{{'}}s 2 New Songs: Everything to Know About the Original Tracks Sung by Cynthia Erivo and Ariana Grande |url=https://people.com/wicked-for-good-new-songs-what-to-know-11853864 |access-date=November 22, 2025 |magazine=[[People (magazine)|People]]}}
*{{cite magazine |last=Cremona |first=Patrick |title=Wicked movie soundtrack: All the songs featured in Part One |url=https://www.radiotimes.com/movies/wicked-movie-soundtrack-part-1/ |magazine=[[Radio Times]] |access-date=December 1, 2024 |date=December 1, 2024 |archive-date=December 3, 2024 |archive-url=https://web.archive.org/web/20241203233557/https://www.radiotimes.com/movies/wicked-movie-soundtrack-part-1/ |url-status=live}}
*{{Cite magazine |last=Cremona |first=Patrick |date=November 17, 2025 |title=''Wicked: For Good'' soundtrack – all the songs in Part Two including original compositions |url=https://www.radiotimes.com/movies/wicked-for-good-soundtrack/ |access-date=November 21, 2025 |magazine=Radio Times |archive-date=November 18, 2025 |archive-url=https://web.archive.org/web/20251118213655/https://www.radiotimes.com/movies/wicked-for-good-soundtrack/ |url-status=live}}</ref> Both albums received positive reviews and debuted at number two on the ''Billboard'' 200 with 139,000 and 122,000 units, tying for the highest debut for a soundtrack to a [[stage-to-film adaptation]].<ref>{{Cite magazine |last=Willman |first=Chris |date=November 23, 2024 |title='Wicked: The Soundtrack' Album Review: Stephen Schwartz's World-Beating Song Score Gets Its Due, and So Do the Divas Who Deliver It |url=https://variety.com/2024/music/album-reviews/wicked-soundtrack-album-review-stephen-schwartz-songs-score-ariana-grande-cynthia-erivo-1236219164/ |access-date=November 24, 2024 |magazine=[[Variety (magazine)|Variety]] |archive-date=November 23, 2024 |archive-url=https://web.archive.org/web/20241123235133/https://variety.com/2024/music/album-reviews/wicked-soundtrack-album-review-stephen-schwartz-songs-score-ariana-grande-cynthia-erivo-1236219164/ |url-status=live}}</ref><ref>{{cite magazine |last=Evans |first=Greg |title='Wicked' Soundtrack Debuts At No. 2 On Billboard 200 Chart, Making History For Broadway-To-Film Adaptations |url=https://deadline.com/2024/12/wicked-soundtrack-billboard-chart-1236191273/ |magazine=[[Deadline Hollywood]] |access-date=December 2, 2024 |date=December 2, 2024 |archive-date=December 3, 2024 |archive-url=https://web.archive.org/web/20241203013357/https://deadline.com/2024/12/wicked-soundtrack-billboard-chart-1236191273/ |url-status=live}}
*{{Cite magazine |last=Caulfield |first=Keith |date=December 2, 2025 |title='Wicked: For Good' Flies Into Top 10 on 7 Billboard Charts |url=https://www.billboard.com/music/chart-beat/wicked-for-good-soundtrack-top-10-seven-billboard-charts-1236126945/ |access-date=December 3, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2025 |archive-url=https://web.archive.org/web/20251203002228/https://www.billboard.com/music/chart-beat/wicked-for-good-soundtrack-top-10-seven-billboard-charts-1236126945/ |url-status=live}}</ref> Grande and her co-star Erivo's rendition of "[[Defying Gravity (song)|Defying Gravity]]" won [[Grammy Award for Best Pop Duo/Group Performance|Best Pop Duo/Group Performance]] at the [[68th Annual Grammy Awards]].<ref name="grammys2026">{{Cite web |url=https://pitchfork.com/news/ariana-grande-cynthia-erivo-win-best-pop-duo-group-performance-2026-grammys/ |title=Ariana Grande and Cynthia Erivo Win Best Pop Duo/Group Performance at 2026 Grammys |date=February 1, 2026 |access-date=February 2, 2026 |website=Pitchfork |last=Green |first=Walden |first2=Alex |last2=Suskind}}</ref> To promote the ''Wicked'' films, Grande hosted ''Saturday Night Live'' on [[Saturday Night Live season 50#ep971|October 12, 2024]] and [[Saturday Night Live season 51#ep997|December 20, 2025]].<ref>{{Cite magazine |last=Longeretta |first=Emily |date=March 10, 2024 |title='SNL': Ariana Grande Previews 'Wicked' Riff After Singing Medley of Hits by Taylor Swift, Jennifer Lopez and More With Bowen Yang |url=https://variety.com/2024/tv/news/snl-ariana-grande-wicked-riff-bowen-yang-skit-video-1235936464/ |access-date=October 10, 2024 |magazine=Variety |archive-date=December 17, 2024 |archive-url=https://web.archive.org/web/20241217132335/https://variety.com/2024/tv/news/snl-ariana-grande-wicked-riff-bowen-yang-skit-video-1235936464/ |url-status=live}}</ref><ref>{{Cite news |last=Vasquez |first=Zach |date=December 21, 2025 |title=Saturday Night Live: Ariana Grande returns to host a blockbuster episode |url=https://www.theguardian.com/tv-and-radio/2025/dec/21/saturday-night-live-ariana-grande-cher-bowen-yang/ |access-date=December 22, 2025 |work=The Guardian}}</ref> Her 2024 episode drew the show's highest ratings since May 2021, at the time, and became its most-watched episode on [[Peacock (streaming service)|Peacock]] and across social media;<ref>{{Cite magazine |last=Shanfeld |first=Ethan |date=October 16, 2024 |title=With Ariana Grande, 'SNL' Scores Most-Watched Episode Since Elon Musk Hosted in 2021 |url=https://variety.com/2024/music/news/ariana-grande-snl-episode-highest-ratings-elon-musk-1236180125/ |access-date=October 18, 2024 |magazine=Variety}}</ref> the 2025 episode was that year and [[Saturday Night Live season 51|season 51]]'s highest-rated and ''SNL''{{'}}s most-watched holiday episode since 2020.<ref>{{Cite magazine |last=Hailu |first=Selome |date=December 24, 2025 |title=Bowen Yang's 'SNL' Exit Is Most-Watched Episode in a Year |url=https://variety.com/2025/tv/news/bowen-yang-snl-exit-ratings-1236617144/ |access-date=December 27, 2025 |magazine=Variety}}</ref> She and Erivo opened the [[97th Academy Awards]] with a medley of "[[Over the Rainbow]]", "[[Home (The Wiz song)|Home]]", and "Defying Gravity".<ref>{{Cite magazine |last=Romano |first=Nick |date=March 2, 2025 |title=''Wicked'' stars Ariana Grande and Cynthia Erivo open 2025 Oscars with gravity-defying ''Wizard of Oz'' medley |url=https://ew.com/ariana-grande-cynthia-erivo-oscars-2025-wizard-of-oz-medley-11689202/ |access-date=March 3, 2025 |magazine=[[Entertainment Weekly]]}}</ref> In November 2025, Grande appeared in the special ''[[Wicked: One Wonderful Night]]'', performing music from the ''Wicked'' films alongside the cast;<ref>{{Cite magazine |last=Campione |first=Katie |date=October 22, 2025 |title='Wicked: One Wonderful Night' First-Look Photos Tease Swankified NBC Broadcast Special Featuring Cynthia Erivo, Ariana Grande & More |url=https://deadline.com/2025/10/wicked-one-wonderful-night-first-look-photos-cynthia-ariana-1236594175/ |access-date=November 19, 2025 |magazine=[[Deadline Hollywood]]}}</ref> a live album of the special was released in tandem with the broadcast.<ref>{{Cite magazine |last=Brandle |first=Lars |date=November 11, 2025 |title=Like Magic, 'Wicked: One Wonderful Night (Live)' Has Arrived: Stream It Now |url=https://www.billboard.com/music/pop/wicked-one-wonderful-night-live-stream-1236107430/ |access-date=November 19, 2025 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
She will embark on [[the Eternal Sunshine Tour]], her first concert tour since 2019, with 41 shows across North America and England, between June and September 2026.<ref name="ESTour1">{{Cite magazine |last=Garcia |first=Thania |date=August 28, 2025 |title=Ariana Grande Announces 2026 'Eternal Sunshine' Tour Dates |url=https://variety.com/2025/music/news/ariana-grande-2026-tour-dates-1236499995/ |access-date=August 28, 2025 |magazine=Variety}}</ref><ref>{{Cite magazine |last=Dailey |first=Hannah |date=September 16, 2025 |title=Ariana Grande Unveils Final Round of 2026 Eternal Sunshine Tour Dates, Adds 5 London Shows |url=https://www.billboard.com/music/pop/ariana-grande-final-eternal-sunshine-2026-tour-dates-london-1236067300/ |url-status=live |archive-url=https://web.archive.org/web/20250916174436/https://www.billboard.com/music/pop/ariana-grande-final-eternal-sunshine-2026-tour-dates-london-1236067300/ |archive-date=September 16, 2025 |access-date=September 16, 2025 |magazine=[[Billboard (magazine)|Billboard]] |issn=0006-2510 |oclc=732913734}}</ref> Grande's upcoming film projects include ''[[Focker-in-Law]]'' (2026)<ref>{{Cite web |last=Zhan |first=Jennifer |date=June 21, 2025 |title=Another Day, Another Introduction Gone Wrong With ''Meet the Fockers 4'' |url=https://www.vulture.com/article/meet-the-parents-4-cast-release-date-details.html |access-date=July 17, 2025 |website=[[Vulture (website)|Vulture]]}}</ref> and an animated film adaptation of [[Dr. Seuss]]'s 1990 book ''[[Oh, the Places You'll Go!]]'' (2028).<ref>{{Cite magazine |last=Grobar |first=Matt |date=July 15, 2025 |title=Ariana Grande & Josh Gad Join Warner Bros Pictures Animation's 'Oh, The Places You'll Go!' |url=https://deadline.com/2025/07/oh-the-places-youll-go-movie-casts-ariana-grande-josh-gad-1236458241/ |access-date=July 17, 2025 |magazine=Deadline Hollywood}}</ref> She will star in the thirteenth season of the horror anthology series ''[[American Horror Story]]'', slated for release in September 2026.<ref>{{Cite web |last=Omotade |first=Lade |date=April 10, 2026 |title=Epic 13-Part Horror Series Drops First Look at New Fantasy Sequel |url=https://collider.com/ryan-murphy-fantasy-series-american-horror-story-season-13-sarah-paulson-jessica-lange-first-images-release-window-september-2026/ |access-date=April 13, 2025 |website=[[Collider (website)|Collider]]}}</ref> In the summer of 2027, Grande will make her [[West End theatre#London's non-commercial theatres|London stage]] debut opposite her ''Wicked'' co-star [[Jonathan Bailey]] in [[Marianne Elliott]]'s [[Barbican Centre|Barbican Theatre]] production of ''[[Sunday in the Park with George]]''.<ref name=":4">{{Cite web |last=Shafer |first=Ellise |date=January 14, 2026 |title=Ariana Grande and Jonathan Bailey to Star in ''Sunday in the Park With George'' Revival in London |url=https://variety.com/2026/theater/global/ariana-grande-jonathan-bailey-sunday-in-the-park-with-george-revival-1236630839/ |access-date=January 14, 2025 |website=Variety |language=en-US}}</ref>
== Artistry ==
=== Musical style ===
Grande's music is generally [[Pop music|pop]] and [[Contemporary R&B|R&B]] with elements of [[Electronic dance music|EDM]], [[hip hop]],<ref>{{cite web |first=Amanda |last=Dobbins |url=https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |title=Ariana Grande 101: Is She Really the New Mariah |work=Vulture |date=September 4, 2013 |access-date=August 23, 2018 |archive-url=https://web.archive.org/web/20140214001723/https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |archive-date=February 14, 2014}}</ref><ref>{{cite web |url=https://www.vice.com/en/article/ariana-grandes-dangerous-woman-isnt-dangerous-or-womanly-so-what/ |title=Ariana Grande's 'Dangerous Woman' Isn't Dangerous Or Womanly... So What? |work=Noisey |date=May 23, 2016 |access-date=February 23, 2019 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213250/https://noisey.vice.com/en_au/article/rzedd4/ariana-grandes-dangerous-woman-isnt-dangerous-or-womanly-so-what |url-status=live}}</ref> and [[Trap music (hip hop)|trap]],<ref name="billboard4">{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-sweetener-uplifting-review-8470799/ |title=6 Reasons Ariana Grande's 'Sweetener' Is Her Most Uplifting Album Yet |magazine=[[Billboard (magazine)|Billboard]] |access-date=February 23, 2019 |archive-date=October 20, 2021 |archive-url=https://web.archive.org/web/20211020212945/https://www.billboard.com/articles/columns/pop/8470799/ariana-grande-sweetener-uplifting-review |url-status=live}}</ref> the latter first appearing prominently on her ''[[Christmas & Chill]]'' extended play. While consistently maintaining pop and R&B tones, she has increasingly incorporated trap into her music as her career has progressed,<ref name="RStrap-pop">{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838/ |title=Ariana Grande's 'Sweetener' Proves That Trap Is the New Pop |magazine=[[Rolling Stone]] |date=August 17, 2018 |access-date=January 27, 2020 |archive-date=December 6, 2019 |archive-url=https://web.archive.org/web/20191206102529/https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838/ |url-status=live}}</ref> thanks to her work with [[record producer]] Tommy Brown.<ref>{{cite magazine |last=Saponara |first=Michael |url=https://www.billboard.com/music/pop/tommy-brown-interview-ariana-grande-thank-u-next-album-8500741/ |title=Producer Tommy Brown Breaks Down Every Song He Produced on Ariana Grande's 'Thank U, Next' Album |magazine=[[Billboard (magazine)|Billboard]] |date=March 7, 2019 |access-date=January 26, 2020 |archive-date=September 11, 2019 |archive-url=https://web.archive.org/web/20190911055841/https://www.billboard.com/articles/columns/hip-hop/8500741/tommy-brown-interview-ariana-grande-thank-u-next-album |url-status=live}}</ref> She has collaborated with Brown on every album thus far and stated that "one of the things I love most about working with Tommy is that none of the beats he plays me ever sound the same."<ref>{{cite news |last=Tanzer |first=Myles |url=https://www.wsj.com/articles/ariana-grandes-new-album-positions-tommy-brown-interview-11604060104 |title=How Ariana Grande's New Album, 'Positions,' Was Made During Covid-19 |newspaper=The Wall Street Journal |date=October 30, 2020 |access-date=November 12, 2020 |archive-date=November 12, 2020 |archive-url=https://web.archive.org/web/20201112005043/https://www.wsj.com/articles/ariana-grandes-new-album-positions-tommy-brown-interview-11604060104 |url-status=live}}</ref> Grande learned how to [[sound engineer]] and produce her own vocals because she "love[s] being hands on" with every project, revealing that rapper [[Mac Miller]] first taught her how to use the [[digital audio workstation]] [[Pro Tools]].<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/qa-ariana-grande-on-yours-truly-and-judging-miley-cyrus-190517/ |title=Grande on 'Yours Truly' and Miley Cyrus |magazine=[[Rolling Stone]] |date=September 11, 2013 |access-date=November 11, 2020 |archive-date=November 27, 2020 |archive-url=https://web.archive.org/web/20201127070808/https://www.rollingstone.com/music/music-news/qa-ariana-grande-on-yours-truly-and-judging-miley-cyrus-190517/ |url-status=live}}</ref> Collaborator [[Justin Tranter]] remarked that he felt inspired seeing how involved Grande is in creating her music "from the writing to the vision to the storytelling and to even engineering and comping her own vocals."<ref>{{cite web |url=https://www.npr.org/2019/02/09/691376280/thank-u-text-ariana-grandes-collaborators-break-down-the-artist-s-latest-album |title='Thank U' Text: Ariana Grande's Collaborators Break Down The Artist's Latest Album |publisher=[[NPR]] |date=February 9, 2019 |access-date=November 12, 2020 |archive-date=November 16, 2020 |archive-url=https://web.archive.org/web/20201116053408/https://www.npr.org/2019/02/09/691376280/thank-u-text-ariana-grandes-collaborators-break-down-the-artist-s-latest-album |url-status=live}}</ref> She has co-written songs addressing a wide variety of themes, such as love, sex, wealth, breakups, independence, empowerment, self-love and moving on from the past.<ref name="billboard6">{{cite magazine |first=Rania |last=Aniftos |url=https://www.billboard.com/articles/news/8497210/ariana-grande-thank-u-next-most-heartbreaking-lyrics |title=Ariana Grande's 'Thank U, Next' Album: 5 Most Heartbreaking Lyrics |magazine=[[Billboard (magazine)|Billboard]] |date=February 8, 2019 |access-date=January 26, 2020 |archive-date=July 17, 2019 |archive-url=https://web.archive.org/web/20190717053442/https://www.billboard.com/articles/news/8497210/ariana-grande-thank-u-next-most-heartbreaking-lyrics |url-status=live}}</ref>
Grande's debut album ''Yours Truly'' was complimented for recreating the R&B "vibe and feel of the 90s" with the help of songwriter and producer [[Babyface (musician)|Babyface]].<ref>{{cite web |url=https://www.allmusic.com/album/my-everything-mw0002698499 |title=My Everything – Ariana Grande |last=Erlewine |first=Stephen Thomas |website=[[AllMusic]] |date=August 25, 2014 |access-date=September 1, 2014 |archive-date=February 24, 2022 |archive-url=https://web.archive.org/web/20220224200234/https://www.allmusic.com/album/my-everything-mw0002698499 |url-status=live}}</ref> Her follow-up record, ''My Everything'', explored EDM and [[electropop]] genres.<ref name="RSMyETReview">{{cite magazine |url=https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 |title=Ariana Grande My Everything |last=Sheffield |first=Rob |date=August 26, 2014 |magazine=[[Rolling Stone]] |access-date=August 28, 2014 |archive-date=June 17, 2018 |archive-url=https://web.archive.org/web/20180617093135/https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 }}</ref> Grande expanded the pop and R&B sound on her third album, ''Dangerous Woman'', which was praised by the ''[[Los Angeles Times]]'' for integrating elements of different styles, such as [[reggae]]-pop ("Side to Side"), dance-pop ("Be Alright"), and [[guitar]]-trap fusion ("Sometimes").<ref>{{cite web |last=Wood |first=Mikael |url=https://www.latimes.com/entertainment/music/la-et-ms-ariana-grande-dangerous-woman-review-20160517-snap-story.html |title=Review: Ariana Grande leaves the princess image behind with ''Dangerous Woman'' |work=[[Los Angeles Times]] |date=May 18, 2016 |access-date=April 20, 2020 |archive-date=February 23, 2017 |archive-url=https://web.archive.org/web/20170223153551/http://www.latimes.com/entertainment/music/la-et-ms-ariana-grande-dangerous-woman-review-20160517-snap-story.html |url-status=live}}</ref> Trap-pop was more heavily featured on her fourth and fifth studio albums, ''Sweetener'' and ''Thank U, Next''.<ref name="RStrap-pop"/> Elias Leight of ''[[Rolling Stone]]'' opined that Grande "set her sights on conquering trap, savage basslines and jittery swarms of drum programming" and "embrace[d] the sound of hard-bitten Southern hip-hop" on ''Sweetener'', exploring [[funk]] music with themes of love and prosperity.<ref name="RSnew-pop">{{cite magazine |last=Leight |first=Elias |date=August 17, 2018 |title=Ariana Grande's ''Sweetener'' Proves That Trap Is the New Pop |url=https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838 |magazine=[[Rolling Stone]] |access-date=August 18, 2018 |archive-date=October 4, 2018 |archive-url=https://web.archive.org/web/20181004042008/https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838/ |url-status=live}}</ref><ref name="billboard5"/> Craig Jenkins of ''[[New York (magazine)|Vulture]]'' noted that she embraced trap and hip hop with undertones of R&B on ''Thank U, Next'',<ref>{{cite web |last=Jenkins |first=Craig |url=https://www.vulture.com/2019/02/ariana-grande-thank-u-next-album-review.html |title=Thank U, Next Is a Phoenix Moment for Ariana Grande |work=[[Vulture (blog)|Vulture]] |date=February 8, 2019 |access-date=February 22, 2019 |archive-date=December 29, 2019 |archive-url=https://web.archive.org/web/20191229154414/https://www.vulture.com/2019/02/ariana-grande-thank-u-next-album-review.html |url-status=live}}</ref> with lyrics about breakups, empowerment, and self-love.<ref name="billboard5"/> Her sixth album, ''Positions'', further emphasized the R&B and trap-pop sound of its two predecessors, with lyrics discussing sex and romance.<ref name="slant">{{cite web |last=Camp |first=Alexa |date=October 30, 2020 |title=Review: Ariana Grande's Positions Too Often Defaults to a Familiar Pose |url=https://www.slantmagazine.com/music/review-ariana-grande-positions-too-often-defaults-to-a-familiar-pose/ |url-status=live |archive-url=https://web.archive.org/web/20201030081531/https://www.slantmagazine.com/music/review-ariana-grande-positions-too-often-defaults-to-a-familiar-pose/ |archive-date=October 30, 2020 |access-date=October 30, 2020 |website=[[Slant Magazine]]}}</ref><ref name="Consequence">{{cite web |last=Siroky |first=Mary |date=October 30, 2020 |title=Ariana Grande's Positions Is a 2020 Pop Fairytale: Review |url=https://consequence.net/2020/10/album-review-ariana-grande-positions/ |url-status=live |archive-url=https://web.archive.org/web/20201101020934/https://consequence.net/2020/10/album-review-ariana-grande-positions/ |archive-date=November 1, 2020 |access-date=October 30, 2020 |website=[[Consequence of Sound]]}}</ref>
=== Influences ===
{{multiple image
| footer = Grande credits [[Mariah Carey]] (''left'') and [[Whitney Houston]] (''right'') as her major vocal influences.
| image1 = Mariah Carey13 Edwards Dec 1998.jpg
| width1 = 155
| alt1 = Mariah Carey
| image2 = Whitney Houston Welcome Home Heroes 1 cropped.jpg
| width2 = 155
| alt2 = Whitney Houston
| align = right
}}
Grande grew up listening mainly to [[urban pop]] and [[1990s music]].<ref name="TheBillboard">{{cite news |last=Lipshutz |first=Jason |date=March 28, 2013 |title=Ariana Grande Talks Breakout Hit 'The Way': Watch New Music Video |url=https://www.billboard.com/music/music-news/ariana-grande-talks-breakout-hit-the-way-watch-new-music-video-1554921/ |url-status=live |archive-url=https://web.archive.org/web/20190626213147/https://www.billboard.com/articles/columns/pop-shop/1554921/ariana-grande-talks-breakout-hit-the-way-watch-new-music-video |archive-date=June 26, 2019 |access-date=March 28, 2013}}</ref> She credited [[Gloria Estefan]] with inspiring her to pursue a music career after Estefan saw and complimented Grande's performance on a cruise ship when she was eight years old.<ref>{{cite web |date=January 26, 2013 |title=Nickelodeon Kids |url=http://nick-kids.net/post/74685927172/when-i-was-eight-years-old-i-was-on-a-cruise-ship |archive-url=https://web.archive.org/web/20141001071524/http://nick-kids.net/post/74685927172/when-i-was-eight-years-old-i-was-on-a-cruise-ship |archive-date=October 1, 2014 |access-date=January 26, 2013 |publisher=Nickelodeon Kids}}</ref> [[Mariah Carey]] and [[Whitney Houston]] are her primary vocal influences: "I love Mariah Carey. She is literally my favorite human being on the planet. And of course Whitney [Houston] as well. As far as vocal influences go, Whitney and Mariah pretty much cover it."<ref>{{cite news |url=http://www.rap-up.com/2014/03/07/ariana-grande-covers-whitney-houston-at-the-white-house/#more-181197 |title=Ariana Grande Covers Whitney Houston at the White House |newspaper=Rap-Up |access-date=August 9, 2014 |archive-date=June 29, 2019 |archive-url=https://web.archive.org/web/20190629135139/https://www.rap-up.com/2014/03/07/ariana-grande-covers-whitney-houston-at-the-white-house/#more-181197 |url-status=live}}</ref> Grande was also influenced vocally by [[Destiny's Child]], [[Celine Dion]], [[Christina Aguilera]], and [[Madonna]].<ref>{{cite web |url=https://www.teenvogue.com/story/ariana-grande-opens-mac-miller-life-music |title=Ariana Grande Opens Up About Mac Miller's Life and Music |website=Teen Vogue |date=May 14, 2020 |access-date=May 14, 2020 |archive-date=June 10, 2020 |archive-url=https://web.archive.org/web/20200610204020/https://www.teenvogue.com/story/ariana-grande-opens-mac-miller-life-music |url-status=live}}</ref><ref>{{cite tweet |user=arianagrande |number=27637810617913344 |title=My biggest musical influences are Imogen Heap, Christina Aguilera, MJ and Rihanna |date=January 19, 2011 |access-date=June 19, 2024}}</ref> She reflected on her childhood by posting videos of herself singing songs from Dion's 1997 album ''[[Let's Talk About Love]]'' on her social media.<ref>{{cite web |url=https://www.elle.com/culture/celebrities/a25664687/ariana-grande-toddler-sing-celine-dion-video/ |title=Watch Ariana Grande Absolutely Nail A Celine Dion Song As A Toddler |last=Rhue |first=Holly |work=[[Elle (magazine)|Elle]] |date=December 23, 2018 |access-date=November 17, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108104657/https://www.elle.com/culture/celebrities/a25664687/ariana-grande-toddler-sing-celine-dion-video/ |url-status=live}}</ref> Grande credits Madonna with "pav[ing] the way for me and also every other female artist" and admitted to being "obsessed with [[Madonna albums discography|her entire discography]]".<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-anxiety-bbc-751525/ |archive-url=https://web.archive.org/web/20201204055609/https://www.rollingstone.com/music/music-news/ariana-grande-anxiety-bbc-751525/ |archive-date=December 4, 2020 |url-access=subscription |title=Watch Ariana Grande Talk Anxiety, Perform 'Sweetener' Songs on BBC Special |magazine=[[Rolling Stone]] |first=Daniel |last=Kreps |date=November 2, 2018 |access-date=July 26, 2023}}</ref><ref>{{cite web |url=https://apnews.com/article/ddd0ce3ae98e4317afbbfeb07685a97c |archive-url=https://web.archive.org/web/20220814204321/https://apnews.com/article/ddd0ce3ae98e4317afbbfeb07685a97c |archive-date=August 14, 2022 |title=Madonna inspires Ariana Grande |work=[[Associated Press News]] |date=March 2, 2017 |access-date=July 26, 2023}}</ref>
Musically, Grande admires [[India Arie]] because her "music makes me feel like everything is going to be okay", loves [[Brandy Norwood]]'s songs because "her [[riff]]s are incredibly on point", and praised [[Imogen Heap]]'s "intricate" song structure.<ref name="billboard5"/> Heap in particular Grande has said is her favorite musician, songwriter, and producer of all time.<ref name="k750">{{cite magazine |title=Ariana Grande on Landing 'Wicked': "Everything's Going to Be Okay Forever Now" |magazine=[[W (magazine)|W]] |date=January 3, 2025 |url=https://www.wmagazine.com/culture/ariana-grande-wicked-cover-interview-2024 |access-date=February 25, 2025}}</ref><ref name="h805">{{cite magazine |last=Williams |first=Sophie |title=Imogen Heap on Viral 'Headlock' Success, AI and Ariana Grande: 'There's a New Type of Energy This Time' |magazine=[[Billboard (magazine)|Billboard]] |date=January 29, 2025 |url=https://www.billboard.com/music/pop/imogen-heap-headlock-success-ai-and-ariana-grande-1235886471/ |access-date=February 25, 2025}}</ref> Grande also named [[Judy Garland]] as a childhood influence, admiring her ability to tell "a story when she sings".<ref name="billboard5">{{cite magazine |url=https://www.billboard.com/music/music-news/gimme-five-ariana-grandes-most-inspirational-female-singers-5748215/ |title=Gimme Five: Ariana Grande's Most Inspirational Female Singers |magazine=[[Billboard (magazine)|Billboard]] |date=October 9, 2013 |access-date=July 28, 2014 |archive-date=July 14, 2014 |archive-url=https://web.archive.org/web/20140714114319/http://www.billboard.com/articles/columns/pop-shop/5748215/gimme-five-ariana-grandes-most-inspirational-female-singers? |url-status=live}}</ref> Ahead of the release of her debut album, Grande says its sound was inspired by Heap, Carey, [[Fergie (singer)|Fergie]], and Houston.<ref>{{Cite web |last=Corner |first=Lewis |date=April 18, 2013 |title=Ariana Grande: 'Fergie's Clumsy always gives me inspiration' |url=https://www.digitalspy.com/music/a474265/ariana-grande-fergies-clumsy-always-gives-me-inspiration/ |access-date=May 1, 2025 |publisher=[[Digital Spy]]}}</ref> Music producer and collaborator [[Savan Kotecha]] stated that he and Grande were influenced by [[Lauryn Hill]] when creating her fourth album [[Sweetener (album)|''Sweetener'']] and its lead single "[[No Tears Left to Cry]]".<ref>{{cite magazine |date=February 18, 2019 |title=How Ariana Grande Scored Two Number One Albums in Just Six Months |url=https://www.rollingstone.com/music/music-features/ariana-grande-thank-u-next-savan-kotecha-interview-791280/ |access-date=July 8, 2022 |magazine=[[Rolling Stone]] |archive-date=March 31, 2019 |archive-url=https://web.archive.org/web/20190331104143/https://www.rollingstone.com/music/music-features/ariana-grande-thank-u-next-savan-kotecha-interview-791280/ |url-status=live}}</ref> Kotecha told [[Variety (magazine)|''Variety'']], "we were listening to Lauryn Hill about chord changes and why we stick to four chords all the time".<ref>{{cite web |last=LeDonne |first=Rob |date=August 23, 2018 |title=Songwriter Savan Kotecha on the Making of Ariana Grande's Sweetener |url=https://www.vulture.com/2018/08/how-ariana-grandes-sweetener-came-together.html |access-date=July 8, 2022 |website=Vulture |archive-date=October 1, 2020 |archive-url=https://web.archive.org/web/20201001142925/https://www.vulture.com/2018/08/how-ariana-grandes-sweetener-came-together.html |url-status=live}}</ref>
Grande expressed admiration for rappers' unconventional music release strategy. She told ''[[Billboard (magazine)|Billboard]]'', "My dream has always been to be—obviously not a rapper, but, like, to put out music in the way that a rapper does. I feel like there are certain standards that pop women are held to that men aren't ... It's just like, 'Bruh, I just want to ... drop [music] the way these boys do."<ref name="rollingstone1">{{cite magazine |title=Ariana Grande Wants to Release Music Like a Rapper |url=https://www.rollingstone.com/music/music-news/ariana-grande-new-release-strategy-thank-u-next-763458/ |url-status=live |archive-url=https://web.archive.org/web/20191223232431/https://www.rollingstone.com/music/music-news/ariana-grande-new-release-strategy-thank-u-next-763458/ |archive-date=December 23, 2019 |access-date=February 23, 2019 |magazine=[[Rolling Stone]]}}</ref> It inspired her to release "Thank U, Next" without any prior announcement, which ''[[The Ringer (website)|The Ringer]]'' called "more of a [[Drake (musician)|Drake]] move than an Ariana Grande move".<ref>{{cite web |url=https://www.theringer.com/music/2018/12/5/18126526/year-in-singles-ariana-grande-thank-u-next-drake-in-my-feelings |title=Thank U, Next: How Ariana Grande and Drake Accelerated the Pop Music Life Cycle |date=December 5, 2018 |work=The Ringer |first=Lindsay |last=Zoladz |access-date=November 18, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108104755/https://www.theringer.com/music/2018/12/5/18126526/year-in-singles-ariana-grande-thank-u-next-drake-in-my-feelings |url-status=live}}</ref>
=== Voice ===
Grande has been described as a [[soprano]],<ref>{{cite web |url=https://www.vox.com/2014/8/19/6030479/ariana-grande-who-is-pop-star-vmas |title=9 Questions You're Too Embarrassed To Ask About Ariana Grande |date=July 8, 2015 |website=Vox |first=Kelsey |last=McKinney |access-date=February 2, 2018 |archive-date=February 3, 2018 |archive-url=https://web.archive.org/web/20180203180909/https://www.vox.com/platform/amp/2014/8/19/6030479/ariana-grande-who-is-pop-star-vmas |url-status=live}}</ref><ref>{{cite news |url=https://www.theguardian.com/music/2017/may/21/ariana-grande-review-pop-flops-genting-arena-birmingham-dangerous-woman |title=Ariana Grande review – pop it till it flops |newspaper=[[The Guardian]] |date=May 21, 2017 |access-date=February 12, 2018 |first=Kitty |last=Empire |archive-date=September 27, 2017 |archive-url=https://web.archive.org/web/20170927112039/https://www.theguardian.com/music/2017/may/21/ariana-grande-review-pop-flops-genting-arena-birmingham-dangerous-woman |url-status=live}}</ref><ref>{{cite news |url=https://www.telegraph.co.uk/culture/music/live-music-reviews/11644279/Ariana-Grande-O2-review-spectacle-but-no-soul.html |title=Ariana Grande, O2, review: 'spectacle but no soul' |work=[[The Daily Telegraph]] |date=June 2, 2015 |access-date=February 12, 2018 |first=Alice |last=Vincent |archive-date=February 13, 2018 |archive-url=https://web.archive.org/web/20180213021939/http://www.telegraph.co.uk/culture/music/live-music-reviews/11644279/Ariana-Grande-O2-review-spectacle-but-no-soul.html |url-status=live}}</ref> possessing a four-octave [[vocal range]]<ref name="Savage"/><ref>{{cite web |url=https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |title=Ariana Grande 101: Is She Really the New Mariah? |website=Vulture |date=September 4, 2013 |access-date=March 11, 2015 |archive-date=February 14, 2014 |archive-url=https://web.archive.org/web/20140214001723/https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |url-status=live}}</ref> and a [[whistle register]].<ref>{{cite web |url=http://www.vh1.com/news/51492/ariana-grande-yours-truly |title=Ariana Grande: Five Things To Know About The Little Girl Behind That Big Voice |publisher=VH1 |date=September 6, 2013 |access-date=October 11, 2017 |archive-date=August 22, 2015 |archive-url=https://web.archive.org/web/20150822101609/http://www.vh1.com/news/51492/ariana-grande-yours-truly/ }}</ref> With the release of ''Yours Truly'', critics compared Grande's wide vocal range and music to those of Mariah Carey.<ref name="Entertainmentweekly">{{cite magazine |url=http://music-mix.ew.com/2013/07/22/ariana-grande-new-single-baby-i |title=Ariana Grande's new single 'Baby I': Hear it here |magazine=Entertainment Weekly |access-date=February 18, 2014 |archive-date=October 6, 2014 |archive-url=https://web.archive.org/web/20141006110542/http://music-mix.ew.com/2013/07/22/ariana-grande-new-single-baby-i/ |url-status=live}}</ref><ref name="StopComparing">{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-mariah-carey-comparisons-6229461/ |title=It's Time to Stop Comparing Ariana Grande to Mariah Carey |last=Horowitz |first=Steven J. |magazine=[[Billboard (magazine)|Billboard]] |date=August 27, 2014 |access-date=September 1, 2014 |archive-date=April 6, 2018 |archive-url=https://web.archive.org/web/20180406125138/https://www.billboard.com/articles/columns/pop-shop/6229461/ariana-grande-mariah-carey-comparisons |url-status=live}}</ref> Julianne Escobedo Shepherd of ''Billboard'' wrote that both Carey and Grande have "the talent to let their vocals do the talking ... that's not where the similarities end. ... Grande is subverting it with cute, comfortable, and on-trend dresses with a feminine slant."<ref name="Shepherd">{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-fashion-style-my-everything-6229387/ |title=Ariana Grande's Fashion Focus: Breaking Down Her Many Confident Looks |last=Shepherd |first=Julianne Escobedo |magazine=[[Billboard (magazine)|Billboard]] |date=August 26, 2014 |access-date=September 2, 2014 |archive-date=August 31, 2014 |archive-url=https://web.archive.org/web/20140831033945/http://www.billboard.com/articles/columns/pop-shop/6229387/ariana-grande-fashion-style-my-everything |url-status=live}}</ref>
Mark Savage of BBC News named Grande "one of pop's most intriguing and gifted singers" and complimented her "unrivalled vocal control".<ref name="Savage"/> In ''The New York Times'', [[Jon Pareles]] noted that Grande's voice "can be silky, breathy or cutting, swooping through long melismas or jabbing out short R&B phrases; it's always supple and airborne, never forced."<ref>{{cite news |last=Pareles |first=Jon |url=https://www.nytimes.com/2018/08/29/arts/music/ariana-grande-sweetener-review.html |title=Ariana Grande Sails Above Sorrow on ''Sweetener'' |newspaper=The New York Times |date=August 29, 2018 |access-date=August 30, 2018 |archive-date=August 29, 2018 |archive-url=https://web.archive.org/web/20180829230135/https://www.nytimes.com/2018/08/29/arts/music/ariana-grande-sweetener-review.html |url-status=live}}</ref> Composer and playwright [[Jason Robert Brown]] wrote in a 2016 ''Time'' magazine article, "[N]o matter how much you are underestimated ... you are going to open your mouth and that unbelievable sound is going to come out. That [...] instrument [...] allows you to shut down every objection and every obstacle."<ref name="Time100">{{cite magazine |last=Brown |first=Jason Robert |author-link=Jason Robert Brown |url=http://time.com/4299766/ariana-grande-2016-time-100 |title=The World's Most Influential People: Ariana Grande |magazine=[[Time (magazine)|Time]] |date=April 21, 2016 |access-date=April 21, 2016 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184549/https://time.com/4299766/ariana-grande-2016-time-100/ |url-status=live}}</ref>
Grande's [[enunciation]] has drawn some criticism,<ref>{{Cite web |last=DeVille |first=Chris |date=October 29, 2020 |title=Premature Evaluation: Ariana Grande Positions |url=https://www.stereogum.com/2104172/ariana-grande-positions-review/reviews/premature-evaluation/ |archive-url=https://web.archive.org/web/20240420110026/https://www.stereogum.com/2104172/ariana-grande-positions-review/reviews/premature-evaluation/ |archive-date=April 20, 2024 |access-date=May 5, 2025 |website=[[Stereogum]] |quote=She also seems to have cleaned up the slurred enunciation that was once the subject of wisecracks}}</ref> particularly on her earlier recordings.<ref>{{Cite news |last=Cragg |first=Michael |date=February 8, 2019 |title=Ariana Grande: Thank U, Next review – a break-up album of wit and wonder |url=https://www.theguardian.com/music/2019/feb/08/ariana-grande-thank-u-next-review |archive-url=https://web.archive.org/web/20241202233051/https://www.theguardian.com/music/2019/feb/08/ariana-grande-thank-u-next-review |archive-date=December 2, 2024 |access-date=May 5, 2025 |newspaper=[[The Guardian]]}}</ref><ref>{{Cite news |last=Hunt |first=Elle |date=December 26, 2018 |title=Ariana Grande: a beacon of resilience in her worst and biggest year |url=https://www.theguardian.com/music/2018/dec/26/ariana-grande-resilience |archive-url=https://web.archive.org/web/20241203200622/https://www.theguardian.com/music/2018/dec/26/ariana-grande-resilience |archive-date=December 3, 2024 |access-date=May 5, 2025 |newspaper=[[The Guardian]]}}</ref><ref name=":3">{{Cite magazine |last=Williams |first=Sophie |date=January 12, 2024 |title=Ariana Grande's 'Yes, And?' is a bitingly catchy and self-aware comeback |url=https://www.nme.com/features/music-features/ariana-grande-new-single-yes-and-lyrics-video-review-3569651 |archive-url=https://web.archive.org/web/20250205093815/https://www.nme.com/features/music-features/ariana-grande-new-single-yes-and-lyrics-video-review-3569651 |archive-date=February 5, 2025 |access-date=May 5, 2025 |magazine=[[NME]] |quote=For an artist that has previously been criticised for poor enunciation}}</ref> Grande herself has acknowledged this on multiple occasions, admitting in 2015 that pronunciation was something she hoped to improve.<ref>{{Cite news |last=Keeley |first=Matt |date=May 5, 2022 |title='Cat in an Elevator?': Benedict Cumberbatch Baffled by Ariana Grande Lyrics |url=https://www.newsweek.com/cat-elevator-benedict-cumberbatch-baffled-ariana-grande-lyrics-1704042 |archive-url=https://web.archive.org/web/20230825041525/https://www.newsweek.com/cat-elevator-benedict-cumberbatch-baffled-ariana-grande-lyrics-1704042 |archive-date=August 25, 2023 |access-date=May 5, 2025 |work=[[Newsweek]]}}</ref> However, several critics noted a marked improvement on ''Eternal Sunshine'',<ref name=":3"/><ref>{{Cite news |last=Tafoya |first=Harry |date=March 11, 2024 |title=eternal sunshine |url=https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/ |archive-url=https://web.archive.org/web/20250313003149/https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/ |archive-date=March 13, 2025 |access-date=May 5, 2025 |website=[[Pitchfork (website)|Pitchfork]]}}</ref> with some attributing the clearer diction to her extensive vocal training for ''Wicked''.<ref>{{Cite news |last=Bryant |first=Danica |date=2024 |title=Ariana Grande Finds Eternal Sunshine |url=https://umusic.co.nz/umusic/ariana-grande-finds-eternal-sunshine/ |archive-url=https://web.archive.org/web/20250214050334/https://umusic.co.nz/umusic/ariana-grande-finds-eternal-sunshine/ |archive-date=February 14, 2025 |access-date=May 5, 2025 |publisher=[[Universal Music New Zealand]]}}</ref><ref>{{Cite news |last=Olivieri |first=Kevin |date=March 19, 2024 |title=Ariana Grande Comes Back with Her Best Album Yet |url=https://themontclarion.org/entertainment/ariana-grande-comes-back-with-her-best-album-yet/ |archive-url=https://web.archive.org/web/20250427113945/https://themontclarion.org/entertainment/ariana-grande-comes-back-with-her-best-album-yet/ |archive-date=April 27, 2025 |access-date=May 5, 2025 |work=[[Montclair State University|The Montclarion]]}}</ref>
== Public image ==
[[File:Ariana Grande - Madame Tussauds Bangkok (cropped).jpg|thumb|upright|Waxwork of Grande at [[Madame Tussauds]], Bangkok]]
Grande cited [[Audrey Hepburn]] as a major style influence in her early career; however, she later found emulating Hepburn's style "a little boring".<ref name="Grazia">{{cite news |url=https://graziadaily.co.uk/fashion/news/ariana-grande-look-back-things-wore-yesterday-cringe/ |title=Ariana Grande: 'I Look Back At Things I Wore Yesterday And Cringe' |first=Louby |last=McLoughlin |work=[[Grazia]] |date=August 20, 2014 |access-date=August 20, 2014 |archive-date=May 7, 2019 |archive-url=https://web.archive.org/web/20190507120435/https://graziadaily.co.uk/fashion/news/ariana-grande-look-back-things-wore-yesterday-cringe/ |url-status=live}}</ref> She also drew inspiration from actresses of the 1950s and 1960s, such as [[Ann-Margret]], [[Nancy Sinatra]], and [[Marilyn Monroe]].<ref name="Grazia"/> Grande's modest look early in her career was described as "age appropriate" in comparison to contemporary artists who grew up in the public eye.<ref name="Shepherd"/> Jim Farber of New York's ''[[New York Daily News]]'' wrote in 2014 that Grande received less attention "for how little she wears or how graphically she moves than for how she sings."<ref name="NYDNsingSex">{{cite web |url=https://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-sex-appeal-article-1.1902829 |title=Ariana Grande owes her stardom to singing, not sex appeal |first=Jim |last=Farber |newspaper=[[New York Daily News]] |url-status=live |date=August 14, 2014 |access-date=March 19, 2024 |archive-date=October 5, 2014 |archive-url=https://web.archive.org/web/20141005224931/http://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-sex-appeal-article-1.1902829}}</ref> That year, she abandoned her earlier style in favor of short skirts and [[crop tops]] with [[knee-high boot]]s in live performances and red carpet events.<ref>{{cite web |url=http://style.mtv.com/2014/04/23/ariana-grande-nancy-sinatra |title=Ariana Grande Is Totally Having a Nancy Sinatra Moment |last=Morton |first=Caitlin |publisher=[[MTV]] |date=April 23, 2014 |access-date=September 2, 2014 |archive-url=https://web.archive.org/web/20140903120634/http://style.mtv.com/2014/04/23/ariana-grande-nancy-sinatra/ |archive-date=September 3, 2014}}</ref> She also began regularly wearing cat and bunny ears and, subsequently, oversized jackets and hoodies through the late 2010s—the latter articles became largely associated with her persona.<ref>{{cite magazine |last=Piwowarski |first=Allison |date=February 3, 2021 |title=What's Up With The Cat Ears? |url=https://www.bustle.com/articles/41944-whats-up-with-ariana-grandes-cat-ears-an-exploration-of-her-history-as-a-fan-of |url-status=live |archive-url=https://web.archive.org/web/20210207080834/https://www.bustle.com/articles/41944-whats-up-with-ariana-grandes-cat-ears-an-exploration-of-her-history-as-a-fan-of |archive-date=February 7, 2021 |access-date=February 3, 2021 |magazine=Bustle}}</ref><ref>{{cite magazine |last=Jackson |first=Vannessa |date=February 3, 2021 |title=What Does Ariana Grande's Bunny Mask Mean |url=https://www.bustle.com/articles/148764-what-does-ariana-grandes-bunny-mask-mean-the-dangerous-woman-cover-art-is-mysterious |url-status=live |archive-url=https://web.archive.org/web/20201222082425/https://www.bustle.com/articles/148764-what-does-ariana-grandes-bunny-mask-mean-the-dangerous-woman-cover-art-is-mysterious |archive-date=December 22, 2020 |access-date=February 3, 2021 |magazine=Bustle}}</ref> Grande later stated that owing to her mental health struggles at the time, she regularly wore variations of the oversized sweatshirt-boots outfit as she preferred to "hide away in something really cozy" and "did not have the mental energy to consider clothing".<ref>{{cite magazine |last=Mohammed |first=Leyla |date=January 28, 2026 |title=People Are Heartbroken After Discovering The Real Reason Ariana Grande Always Used To Wear Oversized Sweatshirts And Thigh-High Boots |url=https://www.buzzfeed.com/leylamohammed/why-ariana-grande-wore-oversized-sweatshirts-high-boots |url-status=live |access-date=January 30, 2026 |publisher=[[BuzzFeed]]}}</ref> Grande's style is often imitated by social media influencers and celebrities.<ref>{{cite magazine |last=Anfitos |first=Rania |url=https://www.billboard.com/music/music-news/celebrity-doppelgangers-tiktok-8550677/ |title=These 8 Celebrity Doppelgangers on TikTok Will Have You Seeing Double |magazine=[[Billboard (magazine)|Billboard]] |date=February 2, 2020 |access-date=April 1, 2021 |archive-date=July 15, 2021 |archive-url=https://web.archive.org/web/20210715173059/https://www.billboard.com/amp/articles/news/8550677/celebrity-doppelgangers-tiktok |url-status=live}}</ref><ref name=StopCopy>{{cite web |url=https://www.capitalfm.com/news/madison-beer-ariana-grande-copying-claims/ |title=Madison Beer Asks People To Stop The 'Hurtful' Ariana Grande 'Copying' Claims |publisher=[[Capital (radio network)|Capital FM]] |date=November 19, 2020 |access-date=April 1, 2021 |archive-date=June 12, 2021 |archive-url=https://web.archive.org/web/20210612232815/https://www.capitalfm.com/news/madison-beer-ariana-grande-copying-claims/ |url-status=live}}</ref> After years of dyeing her hair red for her role as Cat Valentine on Nickelodeon, Grande wore extensions as her hair recovered from damage.<ref name="Fader2018">{{cite web |last=Tanzer |first=Myles |url=http://www.thefader.com/2018/05/30/ariana-grande-cover-story |title=Ariana Grande |magazine=[[The Fader]] |date=May 30, 2018 |access-date=May 31, 2018 |archive-date=January 29, 2020 |archive-url=https://web.archive.org/web/20200129023634/http://www.thefader.com/2018/05/30/ariana-grande-cover-story |url-status=live}}</ref> Anne T. Donahue of [[MTV News]] noted that her "iconic" high ponytail has received more attention than her fashion choices.<ref>{{cite news |last=Donahue |first=Anne T. |url=http://www.mtv.com/news/2869190/do-not-be-distracted-by-ariana-grandes-ponytail |title=Do Not Be Distracted by Ariana Grande's Ponytail |publisher=MTV News |date=April 18, 2016 |access-date=April 18, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213326/http://www.mtv.com/news/2869190/do-not-be-distracted-by-ariana-grandes-ponytail/ }} {{Webarchive|url=https://web.archive.org/web/20190319213326/http://www.mtv.com/news/2869190/do-not-be-distracted-by-ariana-grandes-ponytail/ |date=March 19, 2019 }}</ref>
Although Grande drew criticism for alleged impolite interactions with reporters and fans in 2014,<ref>{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-controversies-6620402/ |title=Ariana Grande's Donut Video & 5 More Controversies |magazine=[[Billboard (magazine)|Billboard]] |date=July 8, 2015 |access-date=April 20, 2020 |archive-date=April 30, 2020 |archive-url=https://web.archive.org/web/20200430073405/https://www.billboard.com/articles/columns/pop-shop/6620402/ariana-grande-controversies |url-status=live}}</ref> she dismissed the reports as "weird, inaccurate depictions".<ref name=CoolDiva/> ''Rolling Stone'' wrote: "Some may cry 'diva', but it's also Grande just taking a stand to not allow others to control her image."<ref>{{cite magazine |last=Castillo |first=Arielle |url=https://www.rollingstone.com/music/pictures/ariana-grande-five-great-scandals-20160518/ariana-vs-the-press-2014-20160518 |title=Ariana Grande: Five Great 'Scandals' – Ariana vs. the Press, 2014 |magazine=[[Rolling Stone]] |date=May 18, 2016 |access-date=August 24, 2017 |archive-date=October 25, 2017 |archive-url=https://web.archive.org/web/20171025190012/https://www.rollingstone.com/music/pictures/ariana-grande-five-great-scandals-20160518/ariana-vs-the-press-2014-20160518 }}</ref> In July 2015, Grande sparked controversy after being seen on surveillance video in a doughnut shop licking doughnuts that were on display and saying "I hate Americans. I hate America. This is disgusting", referring to a tray of doughnuts.<ref>{{cite magazine |last=Lipshutz |first=Jason |url=https://www.billboard.com/music/pop/demi-lovato-ariana-grande-mlb-all-star-game-concert-6620351/ |title=Demi Lovato to Replace Ariana Grande at MLB All-Star Game Concert |magazine=[[Billboard (magazine)|Billboard]] |date=July 8, 2015 |access-date=April 20, 2020 |archive-date=January 31, 2020 |archive-url=https://web.archive.org/web/20200131031812/https://www.billboard.com/articles/columns/pop-shop/6620351/demi-lovato-ariana-grande-mlb-all-star-game-concert |url-status=live}}; and {{cite news |last=Yahr |first=Emily |url=https://www.washingtonpost.com/blogs/style-blog/wp/2015/07/08/ariana-grandes-doughnut-scandal-is-an-important-reminder-the-cameras-are-always-watching |title=Ariana Grande's doughnut scandal is an important reminder: The cameras are always watching |newspaper=The Washington Post |date=July 8, 2015 |access-date=August 24, 2017 |archive-date=July 12, 2015 |archive-url=https://web.archive.org/web/20150712164002/http://www.washingtonpost.com/blogs/style-blog/wp/2015/07/08/ariana-grandes-doughnut-scandal-is-an-important-reminder-the-cameras-are-always-watching/ |url-status=live}}</ref> She subsequently apologized, saying that she is "extremely proud to be an American" and that her comments rather referred to [[obesity in the United States]].<ref>{{cite news |last=Ramisetti |first=Kirthana |url=http://www.nydailynews.com/entertainment/gossip/ariana-grande-cancels-mlb-concert-video-backlash-article-1.2285483 |title=Ariana Grande apologizes for 'I hate America' comments in video: 'I am extremely proud to be an American' |newspaper=New York Daily News |date=July 8, 2015 |access-date=July 8, 2015 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213303/https://www.nydailynews.com/entertainment/gossip/ariana-grande-cancels-mlb-concert-video-backlash-article-1.2285483 |url-status=live}}</ref> She later released a video apology for "behaving poorly".<ref>{{cite magazine |last=Strecker |first=Erin |url=https://www.billboard.com/music/pop/ariana-grande-apology-video-america-6627181/ |title=Ariana Grande Shares Apology Video: 'I'm Going to Learn From My Mistakes' |magazine=[[Billboard (magazine)|Billboard]] |date=July 9, 2015 |access-date=April 20, 2020 |archive-date=April 30, 2020 |archive-url=https://web.archive.org/web/20200430073617/https://www.billboard.com/articles/columns/pop-shop/6627181/ariana-grande-apology-video-america |url-status=live}}</ref> The incident was parodied by ''[[The Muppets (TV series)|The Muppets]]''.<ref>{{cite web |last=Gomez |first=Patrick |url=http://www.people.com/article/muppets-swedish-chef-ariana-grande-donut-video |archive-url=https://web.archive.org/web/20160514100428/http://www.people.com/article/muppets-swedish-chef-ariana-grande-donut-video |archive-date=2016-05-14 |title=''The Muppets''<nowiki/>' Swedish Chef Licks Doughnuts à la Ariana Grande |magazine=[[People (People)|People]] |date=October 11, 2015 |access-date=March 19, 2024}}</ref> Grande herself poked fun at the incident while hosting ''Saturday Night Live'' in 2016, saying, "A lot of kid stars end up doing drugs, or in jail, or pregnant, or get caught licking a doughnut they didn't pay for."<ref name="Savage"/><ref>{{cite magazine |url=https://www.billboard.com/articles/columns/pop/7246933/ariana-grande-scandal-snl-monologue-watch |title=Ariana Grande Sings About Wanting an Adult Scandal in 'SNL' Monologue |magazine=[[Billboard (magazine)|Billboard]] |date=March 13, 2016 |access-date=April 20, 2020 |archive-date=August 19, 2020 |archive-url=https://web.archive.org/web/20200819165649/https://www.billboard.com/articles/columns/pop/7246933/ariana-grande-scandal-snl-monologue-watch }}</ref> In 2020, she admitted to refraining from interviews for a while out of fear of being labeled a "diva" and that her words would be misconstrued.<ref>{{cite web |last=Ahlgrim |first=Callie |title=Ariana Grande says being called a diva forced her to 'quiet down a little bit' and stop doing interviews |url=https://www.insider.com/ariana-grande-diva-sexism-interviews-apple-music-zane-lowe-2020-5 |access-date=July 6, 2020 |publisher=Insider Inc. |date=February 9, 2019 |archive-date=May 25, 2024 |archive-url=https://web.archive.org/web/20240525093742/https://www.businessinsider.com/ariana-grande-diva-sexism-interviews-apple-music-zane-lowe-2020-5 |url-status=live}}</ref>
With a large following on social media, Grande is one of the most influential celebrities on the internet.<ref>{{cite web |last=Jensen |first=Erin |title=Harry and Meghan, Ariana Grande on Time's list of most influential people on the internet |url=https://usatoday.com/story/entertainment/celebrities/2019/07/16/ariana-grande-duchess-meghan-among-most-influential-internet/1743191001/ |access-date=August 9, 2022 |website=Today |archive-date=May 24, 2022 |archive-url=https://web.archive.org/web/20220524011639/https://www.usatoday.com/story/entertainment/celebrities/2019/07/16/ariana-grande-duchess-meghan-among-most-influential-internet/1743191001/ |url-status=live}}</ref><ref name="amassed">{{cite magazine |last=Duboff |first=Josh |date=March 9, 2017 |title=How Ariana Grande Amassed Her 100 Million Instagram Followers |url=https://www.vanityfair.com/style/2017/03/ariana-grande-instagram-analysis-social-studies |access-date=March 16, 2017 |magazine=[[Vanity Fair (magazine)|Vanity Fair]] |archive-date=August 8, 2020 |archive-url=https://web.archive.org/web/20200808052845/https://www.vanityfair.com/style/2017/03/ariana-grande-instagram-analysis-social-studies |url-status=live}}</ref> {{As of|2025|{{CURRENTMONTHNAME}}}}, her YouTube channel has over 57 million subscribers, making her the [[List of most-subscribed YouTube channels|third-most-subscribed female solo act and fourth-most-subscribed woman]] on the platform.<ref name="ytsubs">{{Cite web |title=YouTube Records: All-Time Most Subscribed Official Artist Channel |url=https://www.youtube.com/trends/records/?record=most-subscribed-artists/ |access-date=September 17, 2024 |publisher=[[YouTube|YouTube Culture and Trends]]}}</ref> Her channel has received over 31 billion views; eight of Grande's music videos have over one billion views on YouTube,<ref>{{cite web |title=Ariana Grande |url=https://www.youtube.com/user/osnapitzari/about |access-date=September 18, 2025 |via=YouTube}}{{cbignore}}</ref><ref name="focus1bn">{{Cite magazine |last=Dailey |first=Hannah |date=March 13, 2024 |title=Ariana Grande's 'Focus' Music Video Surpasses 1 Billion Views on YouTube |url=https://www.billboard.com/music/music-news/ariana-grande-focus-music-video-one-billion-views-you-tube-1235632113/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> of which two have surpassed two billion views,<ref name="bangbang2bn">{{Cite web |date=July 3, 2024 |title="Bang Bang" into the record books: Jessie/Ari/Nicki collab hits new YouTube milestone |url=https://www.ks95.com/bang-bang-into-the-record-books-jessie-ari-nicki-collab-hits-new-youtube-milestone/ |access-date=October 9, 2024 |publisher=[[KSTP-FM]]}}</ref> with her highest-viewed video having over 2.4 billion views.<ref>{{Cite AV media |url=https://youtube.com/watch/SXiSVQZLje8/ |title=Ariana Grande ft. Nicki Minaj – Side to Side (Official Video) |date=August 30, 2016 |last=Grande |first=Ariana |type=Music video |access-date=October 9, 2024 |via=YouTube}}</ref> Her Spotify profile has over 110 million followers,<ref>{{cite web |title=Ariana Grande |url=https://open.spotify.com/artist/66CXWjxzNUsdJxJ2JdwvnR |access-date=September 17, 2025 |via=Spotify}}</ref> making her the [[List of most-streamed artists on Spotify#Most followers|seventh-most-followed artist and third-most-followed woman]].<ref name=":0"/> She is the [[List of most-followed Instagram accounts|sixth-most-followed individual on Instagram]],<ref>{{Cite magazine |date=September 23, 2024 |title=The 10 most followed Instagram accounts in the world in 2024 |url=https://www.forbesindia.com/article/explainers/most-followed-instagram-accounts-world/85649/1 |access-date=October 19, 2024 |magazine=[[Forbes India]]}}</ref> and was the first woman to surpass 150 million and 200 million followers on the platform.<ref>{{Cite magazine |last=Eldor |first=Karin |date=March 31, 2019 |title=Ariana Grande Is The New Queen Of Instagram: What Can We Learn From Her Strategy? |url=https://www.forbes.com/sites/karineldor/2019/03/31/ariana-grande-is-the-new-queen-of-instagram-what-can-we-learn-from-her-strategy/ |access-date=October 9, 2024 |magazine=Forbes}}</ref><ref>{{Cite magazine |last=Harmata |first=Claudia |date=August 31, 2020 |title=Ariana Grande Becomes First Woman to Reach 200 Million Followers on Instagram |url=https://people.com/music/ariana-grande-first-woman-to-reach-200-million-followers-instagram/ |access-date=October 9, 2024 |magazine=[[People (magazine)|People]]}}</ref> She was the most-followed woman on the platform from February 2019 to January 2022.<ref>{{Cite news |last=Ng |first=Kate |date=January 13, 2022 |title=Kylie Jenner is the first woman to reach 300m Instagram followers |url=https://www.independent.co.uk/life-style/kylie-jenner-300-million-instagram-followers-b1992320.html |access-date=October 19, 2024 |newspaper=[[The Independent]]}}</ref><ref>{{Cite news |last=Yan |first=Lim Ruey |date=September 2, 2020 |title=Singer Ariana Grande is the most followed woman on Instagram |url=https://www.straitstimes.com/lifestyle/entertainment/singer-ariana-grande-is-the-most-followed-woman-on-instagram |access-date=October 19, 2024 |newspaper=[[The Straits Times]]}}</ref> In December 2021, Grande deleted her Twitter account, which was one of the most-followed accounts on the platform.<ref>{{Cite magazine |last=Wynne |first=Kelly |date=December 24, 2021 |title=Ariana Grande Deletes Twitter Account, Shares Christmas Wishes on Instagram |url=https://people.com/music/ariana-grande-deletes-twitter-account-shares-christmas-wishes-on-instagram/ |access-date=October 19, 2024 |magazine=[[People (magazine)|People]]}}</ref><ref>{{Cite magazine |last=Mulshine |first=Molly |date=April 26, 2022 |title=How Twitter Became Celebrities' Least Favorite Social Platform |url=https://www.newsweek.com/twitter-celebrities-least-favorite-social-platform-elon-musk-buy-1701104 |access-date=October 19, 2024 |magazine=[[Newsweek]]}}</ref> She explained that she "always wanted to say things to [her] fans that were meant for just [her] fans [...] sometimes it would travel in a way that it wasn't intended to [...] where people who don't speak our language would kind of become involved in a weird, strange way. I think I was just so sensitive [and] it started taking toll on my relationship to work. I wanted to prioritize being an artist and having a healthy relationship to my fans and to art".<ref name="elletwitter">{{Cite magazine |last=Bailey |first=Alyssa |date=July 9, 2024 |title=Ariana Grande on Why She Quit Twitter and Chooses Not to Respond to Comments About Her |url=https://www.elle.com/culture/celebrities/a61546061/ariana-grande-shut-up-evan-interview/ |access-date=October 19, 2024 |magazine=[[Elle (magazine)|Elle]]}}</ref>
Often regarded as a [[pop icon]] and [[wikt:triple threat|triple threat]] entertainer,<ref>{{cite web |date=October 27, 2021 |title=How Ariana Grande Went From Nickelodeon Star to Pop Icon |url=https://www.yahoo.com/lifestyle/ariana-grande-went-nickelodeon-star-145446469.html |access-date=October 31, 2021 |publisher=[[Yahoo]] |archive-date=November 1, 2021 |archive-url=https://web.archive.org/web/20211101162940/https://www.yahoo.com/amphtml/lifestyle/ariana-grande-went-nickelodeon-star-145446469.html |url-status=live}}</ref><ref>{{cite magazine |date=March 29, 2022 |title=Women's History Month: Triple Threat Female Artists Who Sing, Write, and Act (Part 2) |url=https://americansongwriter.com/womens-history-month-triple-threat-female-artists-who-sing-write-and-act-part-2/ |access-date=June 25, 2022 |magazine=[[American Songwriter]] |archive-date=June 25, 2022 |archive-url=https://web.archive.org/web/20220625192844/https://americansongwriter.com/womens-history-month-triple-threat-female-artists-who-sing-write-and-act-part-2/ |url-status=live}}</ref> [[wax figure]]s of Grande are found at [[Madame Tussauds]] museums in various cities around the world, including [[New York City]],<ref>{{cite news |title=At Madame Tussauds New York, attend the "Met Gala" with "Katy Perry," "Lady Gaga," "Justin Bieber" and more |url=https://www.wrmf.com/at-madame-tussauds-new-york-attend-the-met-gala-with-katy-perry-lady-gaga-justin-bieber-and-more/ |access-date=December 3, 2022 |work=97.9 WRMF |date=June 23, 2022 |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023632/https://www.wrmf.com/at-madame-tussauds-new-york-attend-the-met-gala-with-katy-perry-lady-gaga-justin-bieber-and-more/ |url-status=live}}</ref> [[Orlando, Florida]],<ref>{{cite magazine |last1=Aniftos |first1=Rania |title=Ariana Grande Gets Madame Tussauds Wax Figure in Orlando |url=https://www.billboard.com/music/pop/ariana-grande-madame-tussauds-wax-figure-orlando-1235042845/ |access-date=December 3, 2022 |magazine=[[Billboard (magazine)|Billboard]] |date=March 10, 2022 |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023626/https://www.billboard.com/music/pop/ariana-grande-madame-tussauds-wax-figure-orlando-1235042845/ |url-status=live}}</ref> [[Amsterdam]],<ref>{{cite news |last1=Westland |first1=Evie |title=Ariana Grande in Madame Tussauds Amsterdam |url=https://www.metronieuws.nl/in-het-nieuws/binnenland/2017/04/ariana-grande-in-madame-tussauds-amsterdam/ |access-date=December 3, 2022 |work=Metronieuws.nl |date=April 6, 2017 |language=nl |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023628/https://www.metronieuws.nl/in-het-nieuws/binnenland/2017/04/ariana-grande-in-madame-tussauds-amsterdam/ |url-status=live}}</ref> [[Bangkok]],<ref>{{cite news |title=Ariana melts hearts in wax |url=https://www.nationthailand.com/life/30357430 |access-date=December 3, 2022 |work=The Nation Thailand |date=October 29, 2018 |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023642/https://www.nationthailand.com/life/30357430 |url-status=live}}</ref> [[Sydney]],<ref>{{cite web |title=Ariana Grande's Madame Tussauds Wax Figure Brutally Mocked |date=December 13, 2023 |url=https://www.newsweek.com/ariana-grande-madame-tussauds-wax-figure-sydney-1851981 |work=Newsweek |access-date=December 14, 2023 |archive-date=December 14, 2023 |archive-url=https://web.archive.org/web/20231214043606/https://www.newsweek.com/ariana-grande-madame-tussauds-wax-figure-sydney-1851981 |url-status=live}}</ref> [[Berlin]],<ref>{{cite web |title=Ariana Grande bekommt Wachsfigur bei Madame Tussauds |date=May 7, 2021 |url=https://www.bz-berlin.de/archiv-artikel/ariana-grande-bekommt-neue-wachsfigur-bei-madame-tussauds |publisher=BZ-Berlin |access-date=December 14, 2023 |archive-date=December 14, 2023 |archive-url=https://web.archive.org/web/20231214170153/https://www.bz-berlin.de/archiv-artikel/ariana-grande-bekommt-neue-wachsfigur-bei-madame-tussauds |url-status=live}}</ref> [[London]],<ref>{{cite web |title=Ariana Grande |url=https://www.madametussauds.com/london/whats-inside/zones/impossible-festival/ariana-grande/ |publisher=Madame Tussauds London |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406182938/https://www.madametussauds.com/london/whats-inside/zones/impossible-festival/ariana-grande/ |url-status=live}}</ref> [[Vienna]],<ref>{{cite web |title=Ariana Grande |url=https://www.madametussauds.com/wien/themenbereiche/musik/ariana-grande/ |publisher=Madame Tussauds Vienna |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406155916/https://www.madametussauds.com/wien/themenbereiche/musik/ariana-grande/ |url-status=live}}</ref> [[Hollywood, Los Angeles|Hollywood]],<ref>{{cite magazine |title=Ariana Grande Wax Figure at Madame Tussauds Hollywood |url=https://www.billboard.com/music/pop/ariana-grande-wax-figure-madame-tussauds-hollywood-9568495/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=April 6, 2024 |archive-date=October 4, 2023 |archive-url=https://web.archive.org/web/20231004062410/https://www.billboard.com/music/pop/ariana-grande-wax-figure-madame-tussauds-hollywood-9568495/ |url-status=live}}</ref> [[Hong Kong]],<ref>{{cite web |title=Sing with Ariana Grande at Madame Tussauds Hong Kong |url=https://www.madametussauds.com/hong-kong/en/information/latest-news/attention-to-all-arianators-calling-you-to-sing-with-your-idol-this-summer/ |publisher=Madame Tussauds Hong Hong |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406162920/https://www.madametussauds.com/hong-kong/en/information/latest-news/attention-to-all-arianators-calling-you-to-sing-with-your-idol-this-summer/ |url-status=live}}</ref> and [[Blackpool]].<ref>{{cite web |title=Ariana Grande at Madame Tussauds Blackpool |url=https://www.madametussauds.com/blackpool/information/latest-news/ariana-makes-a-grande-appearance/ |publisher=Madame Tussauds Blacpool |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406160643/https://www.madametussauds.com/blackpool/information/latest-news/ariana-makes-a-grande-appearance/ |url-status=live}}</ref>
== Recognition ==
{{Main|List of awards and nominations received by Ariana Grande}}
[[File:Ariana Grande (32426961944) (cropped).jpg|thumb|upright|Grande performing on the [[Dangerous Woman Tour]]|alt=Grande in 2017]]
In 2016 and 2019, Grande was named one of ''Time''{{'}}s [[Time 100|100 most influential people in the world]].<ref name="Time100"/><ref name="Time100-2019">{{cite magazine |last=Sivan |first=Troye |author-link=Troye Sivan |date=April 17, 2019 |title=The World's Most Influential People: Ariana Grande |url=https://time.com/collection/100-most-influential-people-2019/5567873/ariana-grande/ |magazine=[[Time (magazine)|Time]] |access-date=April 17, 2019 |archive-date=March 21, 2020 |archive-url=https://web.archive.org/web/20200321114131/https://time.com/collection/100-most-influential-people-2019/5567873/ariana-grande/}}</ref> In 2017, Celia Almeida of the ''[[Miami New Times]]'' wrote that of all the biggest pop stars of the past 20 years, Grande made the most convincing transition "from ingénue to an independent female artist".<ref>{{cite web |last=Almeida |first=Celia |date=April 11, 2017 |title=Ariana Grande Is Not Your Sex Kitten |url=http://www.miaminewtimes.com/music/ariana-grande-dangerous-woman-tour-at-american-airlines-arena-april-14-9268375 |work=[[Miami New Times]] |access-date=April 12, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213253/https://www.miaminewtimes.com/music/ariana-grande-dangerous-woman-tour-at-american-airlines-arena-april-14-9268375 |url-status=live}}</ref> [[Bloomberg News]] named her the "first pop diva of the streaming generation" in 2020.<ref>{{cite news |last=Shaw |first=Lucas |date=December 11, 2020 |title=Ariana Grande Is the Biggest Pop Star in the World |url=https://www.bloomberg.com/graphics/pop-star-ranking/2020-december/ariana-grande-is-the-biggest-pop-star-in-the-world.html |publisher=[[Bloomberg News]] |access-date=December 14, 2020 |archive-date=December 11, 2020 |archive-url=https://web.archive.org/web/20201211222456/https://www.bloomberg.com/graphics/pop-star-ranking/2020-december/ariana-grande-is-the-biggest-pop-star-in-the-world.html |url-status=live}}</ref> Regarded as a [[pop icon]], Grande was nicknamed "[[Princess of Pop]]" by ''[[Guinness World Records]]''.<ref>{{Cite web |date=February 2, 2021 |title=Ariana Grande shatters her 20th Guinness World Records title following success of hit single 'Positions' |url=https://www.guinnessworldrecords.com/news/2021/2/ariana-grande-shatters-20th-guinness-world-records-title-following-success-of-hit-647433 |url-status=live |archive-url=https://web.archive.org/web/20210202165717/https://www.guinnessworldrecords.com/news/2021/2/ariana-grande-shatters-20th-guinness-world-records-title-following-success-of-hit-647433 |archive-date=February 2, 2021 |access-date=July 29, 2023 |website=[[Guinness World Records]]}}</ref> Due to her 2014 song "Santa Tell Me" becoming a 21st-century Christmas standard and having a lasting impact, Grande was dubbed the "Princess of Christmas".<ref>{{Cite magazine |date=December 22, 2021 |title=Camila Cabello Heats the White House With 'I'll Be Home For Christmas' Performance: Watch |url=https://www.billboard.com/music/latin/camila-cabello-white-house-christmas-performance-1235013252/ |access-date=November 20, 2022 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{Cite magazine |last=Bell |first=Sadie |date=November 28, 2023 |title=Ariana Grande Celebrates 'Santa Tell Me' Anniversary by Sharing Behind-the-Scenes Footage: 'Tis the Season!' |url=https://people.com/ariana-grande-celebrates-santa-tell-me-anniversary-tiktok-8407591 |access-date=December 17, 2023 |magazine=[[People (magazine)|People]]}}</ref>
Grande was also included in ''[[Pitchfork (website)|Pitchfork]]'s'' list of "The 200 Most Important Artists of Pitchfork's First 25 Years" for "emerging with music that pushed her artistry further as it asserted a magical trifecta of hope, joy, and a powerhouse voice".<ref>{{cite web |date=October 4, 2021 |title=The 200 Most Important Artists of Pitchfork's First 25 Years |url=https://pitchfork.com/features/lists-and-guides/most-important-artists/ |website=[[Pitchfork (website)|Pitchfork]] |access-date=October 4, 2021 |archive-date=July 30, 2022 |archive-url=https://web.archive.org/web/20220730052606/https://pitchfork.com/features/lists-and-guides/most-important-artists/ |url-status=live}}</ref> Her song "Thank U, Next" was ranked number 137 in ''Rolling Stone''{{'s}} 2021 revision of their [[500 Greatest Songs of All Time]],<ref>{{cite magazine |date=September 15, 2021 |title=The 500 Greatest Songs of All Time |url=https://www.rollingstone.com/music/music-lists/best-songs-of-all-time-1224767/ariana-grande-thank-u-next-5-1225201/ |url-status=live |archive-url=https://web.archive.org/web/20210915162053/https://www.rollingstone.com/music/music-lists/best-songs-of-all-time-1224767/ |archive-date=September 15, 2021 |access-date=October 5, 2021 |magazine=[[Rolling Stone]]}}</ref> while its parent album was ranked number 61 in their "250 Greatest Albums of the 21st Century".<ref>{{Cite magazine |date=January 10, 2025 |title=The 250 Greatest Albums of the 21st Century So Far |url=https://www.rollingstone.com/music/music-lists/best-albums-21st-century-1235177256/ariana-grande-thank-u-next-6-1235185233/ |access-date=January 11, 2025 |magazine=[[Rolling Stone]]}}</ref> In 2023, the magazine ranked Grande among the 200 Greatest Singers of All Time, at number 43.<ref name="200-greatest">{{cite magazine |url=https://www.rollingstone.com/music/music-lists/best-singers-all-time-1234642307/ariana-grande-8-1234643145/ |date=January 1, 2023 |title=The 200 Greatest Singers of All Time |access-date=September 7, 2023 |magazine=[[Rolling Stone]] |archive-date=July 19, 2023 |archive-url=https://web.archive.org/web/20230719045545/https://www.rollingstone.com/music/music-lists/best-singers-all-time-1234642307/ariana-grande-8-1234643145/ |url-status=live}}</ref> ''[[The Hollywood Reporter]]'' named her as one of its "Platinum Power Players" in music in 2024.<ref>{{Cite magazine |last=Fekadu |first=Mesfin |date=September 6, 2024 |title=Music's Platinum Players: From Beyoncé to Chappell Roan, Meet the 25 Stars Who Are Setting the Culture Afire |url=https://www.hollywoodreporter.com/lists/music-power-players-2024/ariana-grande/ |access-date=October 11, 2024 |magazine=[[The Hollywood Reporter]]}}</ref> In May that year, [[Katy Perry]] declared Grande to be "the best singer of our generation".<ref name="Ledbetter_5/23/20242">{{cite web |last=Ledbetter |first=Carly |date=May 23, 2024 |title=Katy Perry Praises The 'Best Singer Of Our Generation' |url=https://www.huffpost.com/entry/katy-perry-ariana-grande-voice-generation_n_664f440ae4b042129b89ca7b |access-date=May 24, 2024 |newspaper=[[HuffPost]]}}</ref> ''Billboard'' ranked Grande at number nine on its 2024 "[[Billboard's Greatest Pop Stars of the 21st Century|Greatest Pop Stars of the 21st Century]]" list,<ref>{{cite magazine |last=Daw |first=Stephen |date=October 17, 2024 |title=''Billboard''{{'}}s Greatest Pop Stats of the 21st Century: No. 9 — Ariana Grande |url=https://www.billboard.com/music/pop/ariana-grande-greatest-pop-stars-21st-century-1235804073/ |access-date=October 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and at number eight on its 2025 list of the "Top 100 Women Artists of the 21st Century".<ref>{{cite magazine |first1=Trevor |last1=Anderson |first2=Jim |last2=Asker |first3=Pamela |last3=Bustios |first4=Keith |last4=Caulfield |first5=Eric |last5=Frankenberg |first6=Kevin |last6=Rutherford |first7=Gary |last7=Trust |first8=Xander |last8=Zellner |date=March 19, 2025 |title=''Billboard''<nowiki/>'s Top 100 Women Artists of the 21st Century Chart: Nos. 100-1 |url=https://www.billboard.com/lists/top-women-artists-21st-century-chart/no-8-ariana-grande/ |access-date=March 19, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-url=https://web.archive.org/web/20250319183615/https://www.billboard.com/lists/top-women-artists-21st-century-chart/ |url-status=live |archive-date=March 19, 2025}}</ref> The magazine ranked her album ''Thank U, Next'' at number 144 out of 200 on its "Top 200 ''Billboard'' 200 Albums of the 21st Century" in 2025.<ref>{{Cite magazine |date=January 9, 2025 |title=Top ''Billboard'' 200 Albums of the 21st Century |url=https://www.billboard.com/charts/top-billboard-200-albums-of-the-21st-century/ |access-date=December 27, 2025 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
Recording artists who have cited Grande as an influence or inspiration include <!-- Artists' names are arranged in alphabetical order; [[WP:NEUTRAL]].--> [[Billie Eilish]],<ref>{{cite web |title=Ariana sei Dank – Billie Eilish hat wieder Lust auf Musik |url=https://www.zeit.de/zustimmung?url=https%3A%2F%2Fwww.zeit.de%2Fnews%2F2019-08%2F19%2Fariana-sei-dank-billie-eilish-hat-wieder-lust-auf-musik |work=Die Zeit |access-date=August 19, 2019 |archive-date=January 8, 2022 |archive-url=https://web.archive.org/web/20220108160623/https://www.zeit.de/zustimmung?url=https%3A%2F%2Fwww.zeit.de%2Fnews%2F2019-08%2F19%2Fariana-sei-dank-billie-eilish-hat-wieder-lust-auf-musik }}</ref> [[Breanna Yde]],<ref>{{cite web |title=YDE Talks About Her New EP 'Send Help', Taking Inspiration From Olivia Rodrigo, Ariana Grande, Miley Cyrus & More |date=September 9, 2022 |url=https://www.yahoo.com/entertainment/yde-talks-her-ep-send-222227240.html |publisher=[[Yahoo!]] |access-date=January 22, 2023}}</ref> [[Bryson Tiller]],<ref>{{cite web |title=Bryson Tiller Announces A 'Special' Christmas Project Inspired By Justin Bieber And Ariana Grande |date=November 10, 2021 |url=https://uproxx.com/music/bryson-tiller-announces-a-different-chrtistmas/ |website=[[Uproxx]] |access-date=January 22, 2023}}</ref> [[Chappell Roan]],<ref>{{Cite magazine |last=Dailey |first=Hannah |date=August 29, 2024 |title=Chappell Roan Praises Ariana Grande's 'Eternal Sunshine', Reveals She's 'So Excited' for 'Wicked' |url=https://www.billboard.com/music/music-news/chappell-roan-praises-ariana-grande-wicked-1235763528/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> [[Charlie Puth]],<ref>{{cite web |title=Charlie Puth: Inspiration durch Ariana Grande |date=May 10, 2018 |url=https://www.rtl.de/cms/charlie-puth-inspiration-durch-ariana-grande-4160617.html |publisher=[[RTL Group]] |access-date=January 22, 2023 |archive-date=January 22, 2023 |archive-url=https://web.archive.org/web/20230122122244/https://www.rtl.de/cms/charlie-puth-inspiration-durch-ariana-grande-4160617.html }}</ref> [[Giselle (singer)|Giselle]] of [[Aespa]],<ref>{{cite magazine |title='The First Time': Aespa Talks Inspiration From Fashion, Harry Styles, Grimes, Ariana Grande |date=December 2, 2021 |url=https://www.rollingstone.com/music/music-news/the-first-time-aespa-1266093/ |magazine=[[Rolling Stone]] |access-date=January 22, 2023}}</ref> [[Grace VanderWaal]],<ref>{{cite magazine |title=Grace VanderWaal Fangirls Over Ariana Grande, Talks Tour With Imagine Dragons on BBMA Red Carpet: Watch |date=May 21, 2018 |url=https://www.billboard.com/music/awards/grace-vanderwaal-interview-ariana-grande-imagine-dragons-tour-8457114/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 22, 2023}}</ref> [[Jungkook]] of [[BTS]],<ref>{{cite web |title=BTS' Jungkook says watching Ariana Grande perform live "really stayed" with him |date=May 18, 2021 |url=https://www.nme.com/news/music/bts-jungkook-ariana-grande-inspired-him-to-grow-2942958 |work=[[NME]] |access-date=May 18, 2021 |archive-date=May 18, 2021 |archive-url=https://web.archive.org/web/20210518074850/https://www.nme.com/news/music/bts-jungkook-ariana-grande-inspired-him-to-grow-2942958 |url-status=live}}</ref> [[Lana Del Rey]],<ref>{{cite magazine |title=Lana Del Rey stans Ariana Grande |date=October 16, 2019 |url=https://www.wmagazine.com/story/lana-del-rey-compliments-ariana-grande-stans/ |magazine=[[W (magazine)|W]] |access-date=January 30, 2023}}</ref> [[Madison Beer]],<ref name="StopCopy"/> [[Maggie Lindemann]],<ref>{{cite web |title=Interview: Maggie Lindemann Is Out To Inspire The Next Generation Of Women |date=January 20, 2017 |url=https://www.iheart.com/content/2017-01-20-interview-maggie-lindemann-is-out-to-inspire-the-next-generation-of-women/ |publisher=[[iHeartRadio]] |access-date=January 22, 2023}}</ref> [[Meghan Trainor]],<ref>{{cite magazine |title=Meghan Trainor Is All About that Bass, T-Pain, and Drunk Texting |date=September 10, 2014 |url=https://www.out.com/entertainment/music/2014/09/10/meghan-trainor-all-about-bass-t-pain-drunk-texting |magazine=Out |access-date=September 10, 2014 |archive-date=April 2, 2019 |archive-url=https://web.archive.org/web/20190402233520/https://www.out.com/entertainment/music/2014/09/10/meghan-trainor-all-about-bass-t-pain-drunk-texting |url-status=live}}</ref> [[Melanie Martinez]],<ref>{{cite magazine |title=Melanie Martinez on 'Cry Baby,' Not Wanting to Be a Role Model & What She Learned From 'The Voice' |url=https://www.billboard.com/media/videos/melanie-martinez-cry-baby-role-model-the-voice-6685879/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=April 4, 2015 |archive-date=April 12, 2022 |archive-url=https://web.archive.org/web/20220412205245/https://www.billboard.com/media/videos/melanie-martinez-cry-baby-role-model-the-voice-6685879/ |url-status=live}}</ref> [[Michelle Zauner]] of [[Japanese Breakfast]],<ref>{{cite web |title=Japanese Breakfast's Michelle Zauner On Her Wild Year And Winning The 2021 Uproxx Music Critics Poll |date=December 16, 2021 |url=https://uproxx.com/indie/japanese-breakfast-interview-2021-critics-poll/ |website=[[Uproxx]] |access-date=January 22, 2023}}</ref> [[Sufjan Stevens]],<ref>{{cite magazine |title=Sufjan Stevens on Making Pop Music in a Crisis |date=September 24, 2020 |url=https://www.vanityfair.com/style/2020/09/sufjan-stevens-the-ascension-interview |magazine=[[Vanity Fair (magazine)|Vanity Fair]] |access-date=September 24, 2020 |archive-date=October 20, 2020 |archive-url=https://web.archive.org/web/20201020182127/https://www.vanityfair.com/style/2020/09/sufjan-stevens-the-ascension-interview |url-status=live}}</ref> [[Tate McRae]],<ref>{{cite web |url=https://youtube.com/watch?v=F-Dq7717bWw |title=Tate McRae Celebrates Going #1 With Greedy |publisher=Ask Anything Chat |via=[[YouTube]] |date=December 10, 2023 |access-date=December 10, 2023 |archive-date=December 10, 2023 |archive-url=https://web.archive.org/web/20231210214512/https://www.youtube.com/watch?v=F-Dq7717bWw |url-status=live}}</ref> [[Troye Sivan]],<ref>{{cite magazine |title=Troye Sivan Said Ariana Grande Is 'Breaking the Rules' in His Essay for Her Time 100 Honor |date=April 17, 2019 |url=https://www.teenvogue.com/story/troye-sivan-ariana-grande-essay-time-100 |magazine=Teen Vogue |access-date=September 17, 2019 |archive-date=May 11, 2019 |archive-url=https://web.archive.org/web/20190511095906/https://www.teenvogue.com/story/troye-sivan-ariana-grande-essay-time-100 |url-status=live}}</ref> and [[Zara Larsson]].<ref>{{cite web |url=https://nation.com.pk/26-Mar-2017/zara-larsson-inspired-by-beyonce |title=Zara Larsson inspired by Beyonce |date=March 25, 2017 |website=The Nation |access-date=January 22, 2023 |archive-date=December 7, 2020 |archive-url=https://web.archive.org/web/20201207060636/https://nation.com.pk/26-Mar-2017/zara-larsson-inspired-by-beyonce |url-status=live}}</ref>
== Achievements ==
{{Main|List of awards and nominations received by Ariana Grande}}
Grande has sold over 90 million records worldwide,<ref>{{Cite magazine |last1=Verhoeven |first1=Beatrice |date=December 4, 2024 |title='Wicked' Star Ariana Grande to Receive Rising Star Award at Palm Springs International Film Festival |url=https://www.hollywoodreporter.com/movies/movie-news/wicked-ariana-grande-rising-star-award-palm-springs-international-film-festival-1236076275/ |magazine=[[The Hollywood Reporter]] |access-date=September 20, 2025 |archive-date=December 8, 2024 |archive-url=https://web.archive.org/web/20241208015916/https://www.hollywoodreporter.com/movies/movie-news/wicked-ariana-grande-rising-star-award-palm-springs-international-film-festival-1236076275/ |url-status=live}}</ref> making her one of the [[List of best-selling music artists|best-selling music artists]] of all time. All of Grande's studio albums have been certified platinum or higher by the [[Recording Industry Association of America]] (RIAA) and have spent at least one year charting on the [[Billboard 200|''Billboard'' 200]] chart. Her highest-certified album by the RIAA is ''[[My Everything (Ariana Grande album)|My Everything]]'', at quadruple platinum,<ref>{{cite web |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&se=Ariana+Grande |title=Ariana Grande |publisher=Recording Industry Association of America |access-date=September 17, 2024}}</ref> whilst her longest-charting album, ''Thank U, Next'', has spent 185 non-consecutive weeks on the chart.<ref>{{Cite magazine |date= |title=Ariana Grande (Chart History): ''Billboard'' 200 |url=https://www.billboard.com/artist/ariana-grande/chart-history/tlp/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande has accumulated 15 million albums and 124 million digital singles units as a lead artist in the United States,<ref name="RIAA Certifications">{{cite web |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=ARIANA+GRANDE&ti=&lab=&genre=&format=&date_option=release&from=&to=&award=&type=&category=&adv=SEARCH#search_section |title=RIAA Searchable Database: Ariana Grande |publisher=[[Recording Industry Association of America]] |access-date=March 24, 2026}}</ref> making her the 13th-highest-certified artist and fourth-highest-certified female artist on RIAA's [[List of highest-certified music artists in the United States#Top 50 certified music artists (digital singles)|Top Artists (Digital Singles)]] ranking.<ref>{{cite web |title=Gold & Platinum – Top Artists (Digital Singles) |url=https://www.riaa.com/gold-platinum/?tab_active=top_tallies&ttt=TAS |access-date=March 24, 2026 |publisher=[[Recording Industry Association of America]]}}</ref> With 139 million units combined (songs and albums), she is the 21st-highest-certified artist, overall, and sixth-highest among women.<ref name="RIAAranking">{{Cite web |title=Gold & Platinum — Artists |url=https://www.riaa.com/gold-platinum/?tab_active=awards_by_artist#search_section |access-date=March 24, 2026 |publisher=[[Recording Industry Association of America]] (RIAA)}}</ref> In the US, Grande has moved 22.4 million album units, and garnered over 23.6 billion streams across lead artist credits, as of 2023, according to [[Luminate (company)|Luminate]].<ref name="bbupdate">{{cite magazine |last1=Trust |first1=Gary |title='Such a Breath of Fresh Air': Ariana Grande's 'Yours Truly' Collaborators Reflect on 10 Years of Her Debut Album |url=https://www.billboard.com/music/pop/ariana-grande-yours-truly-collaborators-debut-album-anniversary-1235399838/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 27, 2023 |date=August 25, 2023 |archive-url=https://web.archive.org/web/20230825153706/https://www.billboard.com/music/pop/ariana-grande-yours-truly-collaborators-debut-album-anniversary-1235399838/ |archive-date=August 25, 2023 |url-status=live}}</ref><ref>{{cite magazine |last=Haven |first=Lyndsey |date=December 10, 2023 |title=Ariana Grande Signs With New Management |url=https://www.billboard.com/business/management/ariana-grande-new-management-brandon-creed-good-world-1235549272/ |access-date=December 10, 2023 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Two of her songs have been certified diamond by the RIAA: "Bang Bang" (with [[Jessie J]] and [[Nicki Minaj]]) and "7 Rings".<ref name=":1">{{Cite magazine |last=McIntyre |first=Hugh |date=February 14, 2025 |title=Ariana Grande Scores A New Diamond Single With One Of Her Classics |url=https://www.forbes.com/sites/hughmcintyre/2025/02/14/ariana-grande-scores-a-new-diamond-single-with-one-of-her-classics/ |access-date=February 22, 2025 |magazine=Forbes}}</ref>
Having surpassed 98 billion streams globally as of 2021, Grande is one of the most-streamed artists of all time and was the first female artist to surpass 90 billion streams.<ref name="wickedcasting"/><ref>{{cite magazine |title=HYBE, Formerly Big Hit, Merges With Scooter Braun's Ithaca Holdings, Bringing Together BTS, Justin Bieber, Big Machine (EXCLUSIVE) |url=https://variety.com/2021/digital/news/hybe-formerly-big-hit-entertainment-acquires-scooter-brauns-ithaca-holdings-bringing-together-bts-justin-bieber-big-machine-1234943092/ |access-date=April 2, 2021 |magazine=[[Variety (magazine)|Variety]] |date=April 2, 2021}}</ref> She was the most-streamed female artist of the 2010s decade on [[Spotify]], being the only woman in the overall top five.<ref name="moststreamed2010s2"/> She was also the most-streamed female act of the 2010s decade on [[Apple Music]], and was the first female act to reach 3 billion total streams on the platform.<ref name="am_2010s">{{cite magazine |last=Burch |first=Sean |title=Ariana Grande Tops List of Most Streamed Female Artists on Apple Music (Exclusive) |url=https://www.thewrap.com/apple-music-most-streamed-females-ariana-grande-taylor-swift/ |access-date=November 17, 2023 |magazine=[[TheWrap]] |date=March 8, 2019}}</ref> In the US, Grande was the most-streamed female artist and fourth-most-streamed artist overall of the 2010s decade, across audio and video streams, being the only woman and non-rapper in the top five.<ref>{{Cite web |last=Zhang |first=Charlie |date=January 11, 2021 |title=Drake, Post Malone, Eminem and Others Named Most Streamed Artists of the 2010s |url=https://hypebeast.com/2021/1/drake-post-malone-eminem-future-most-streamed-artists-2010s-info/ |access-date=October 19, 2024 |publisher=[[Hypebeast (company)|Hypebeast]]}}</ref> She became the most-streamed female artist of all time on Spotify in 2020, surpassing [[Rihanna]], and held the record for over two years.<ref>{{cite magazine |last=Reilly |first=Nick |date=August 19, 2020 |title=Ariana Grande pleads with Rihanna to 'drop her album' after breaking streaming record |url=https://www.nme.com/news/music/ariana-grande-pleads-with-rihanna-to-drop-her-album-after-breaking-streaming-record-2732175 |access-date=August 20, 2024 |magazine=[[NME]]}}</ref> As of January 2026, Grande is the second-most-streamed woman and the sixth-most-streamed act on Spotify, with over 63 billion streams across all credits (including 52 billion streams as a lead artist). She is the second woman in the platform's history to surpass 60 billion total streams.<ref>{{cite web |last=Newman |first=Tom |date=October 24, 2024 |title=Top 10 most-streamed artists of all-time on Spotify in 2024 |url=https://routenote.com/blog/most-streamed-artists-all-time-spotify/ |access-date=December 17, 2024 |work=RouteNote}}</ref> Her songs and albums are [[List of most-streamed songs on Spotify|some of the most-streamed of all time]]. Grande became the first woman with one and two billion streams with one album,<ref>{{cite web |url=https://www.inquisitr.com/5358991/ariana-grande-2-billion-spotify-streams |title=Ariana Grande Becomes First Female Artist To Surpass 2 Billion Spotify Streams With Three Albums |website=[[Inquisitr]] |date=March 25, 2019}}</ref> 3.5 billion streams on three separate albums,<ref>{{cite web |url=https://www.nme.com/news/music/ariana-grande-first-female-artist-spotify-streams-three-albums-2604140/ |title=Ariana Grande becomes first female artist with 3.5 billion streams on three separate albums |website=[[NME]] |date=February 2, 2020}}</ref> and the first artist to have five albums with four billion streams.<ref>{{cite web |url=https://uproxx.com/pop/ariana-grande-positions-4-billion-spotify-streams/ |title=Ariana Grande's 'Positions' Surpassed 4 Billion Spotify Streams, Her Fifth Album To Do So |website=[[Uproxx]] |date=December 4, 2022}}</ref> Grande has 22 songs with over one billion streams on Spotify, making her the female artist with the most songs to have achieved the feat;<ref>{{cite web |title=BILLIONS CLUB |url=https://open.spotify.com/playlist/37i9dQZF1DX7iB3RCnBnN4 |access-date=July 27, 2025 |publisher=[[Spotify]]}}</ref> she was the first woman to have 22 songs surpass the mark.<ref>{{cite magazine |last=Madarang |first=Charisma |url=https://www.rollingstone.com/music/music-news/ariana-grande-spotify-billions-club-episode-watch-1234962711/ |title=Ariana Grande Reveals Why Her Label Didn't Approve Original 'Santa Tell Me' Video |magazine=[[Rolling Stone]] |date=February 6, 2024 |access-date=October 19, 2024}}</ref><ref>{{Cite news |last=Kessler |first=Siena |date=April 1, 2025 |title=Album review: Ariana Grande delivers emotional journey with 'Eternal Sunshine Deluxe: Brighter Days Ahead' |url=https://www.thelantern.com/2025/04/album-review-ariana-grande-delivers-emotional-journey-with-eternal-sunshine-deluxe-brighter-days-ahead/ |access-date=April 2, 2025 |work=[[The Lantern]] |quote=Grande became the first female artist to have 20 songs reach one billion streams each on Spotify — a feat that cements her as one of the most influential streaming artists of all time.}}</ref>
In December 2025, she became her monthly listeners on Spotify surpassed 126.8 million monthly listeners, a new record for a female act.<ref>{{Cite web |last=Ileyah |date=December 26, 2025 |title=Ariana Grande Breaks All-Time Spotify Record for Monthly Listeners Among Female Artists |url=https://ratingsgamemusic.com/2025/12/26/ariana-grande-breaks-all-time-spotify-record-for-monthly-listeners-among-female-artists/ |access-date=December 27, 2025 |website=Ratings Game Music}}</ref> She has also topped Spotify's monthly listener ranking the most times (5) among women.<ref>{{Cite web |last=Galante |first=Grace |date=December 25, 2025 |title=Ariana Grande Breaks Spotify Record on Christmas Eve |url=https://parade.com/news/ariana-grande-breaks-spotify-record-christmas-eve/ |access-date=December 27, 2025 |website=[[Parade (magazine)|Parade]]}}</ref> Grande is the [[List of most-streamed artists on Spotify#Most-followed artists|seventh-most-followed artist and fourth-most-followed female artist]] on Spotify, with over 110 million followers;<ref name=":0">{{Cite web |title=Most Followed Artists on Spotify |url=https://volt.fm/most-followed-artists/ |access-date=January 6, 2026 |website=Volt.FM}}</ref> she is the fourth artist in the streaming service's history to surpass 100 million followers.<ref>{{Cite web |last=Newman |first=Tom |date=October 24, 2024 |title=The 10 biggest artists on Spotify in 2024 |url=https://routenote.com/blog/biggest-artists-on-spotify/ |access-date=November 16, 2024 |website=RouteNote}}</ref> Her 2014 single "Santa Tell Me" is the most-streamed Christmas song released in the 2010s—and third-most-streamed overall—on Spotify; the most successful holiday song released in the 21st century; and the eighth-most-popular holiday song of all time.<ref>
* {{Cite web |last=Mulka |first=Angela |date=December 5, 2023 |title=These Christmas songs make the most money |url=https://www.bigrapidsnews.com/news/article/christmas-songs-that-earn-most-money-spotify-18535033.php |archive-url=https://web.archive.org/web/20231217125207/https://www.bigrapidsnews.com/news/article/christmas-songs-that-earn-most-money-spotify-18535033.php |archive-date=December 17, 2023 |access-date=December 17, 2023 |website=Big Rapids Pioneer}}
* {{Cite magazine |last=Edwards |first=Clayton |date=December 9, 2024 |title=The 5 Highest-Earning Christmas Songs of the Streaming Age |url=https://americansongwriter.com/the-5-highest-earning-christmas-songs-streaming-age/ |access-date=December 23, 2024 |website=American Songwriter}}
* {{Cite web |date=December 23, 2024 |title=Spotify reveals the most-streamed Christmas songs from each era and of all time |url=https://community.designtaxi.com/topic/7202-spotify-reveals-the-most-streamed-christmas-songs-from-each-era-and-of-all-time/ |access-date=December 23, 2024 |website=DesignTAXI Community: Creative Connections, Conversations and Collaborations}}</ref><ref>{{Cite magazine |last=[[People (magazine)|People]]s |first=Thomas |date=December 19, 2024 |title=The 25 Most Popular Christmas Songs Released in the Last 25 Years, Ranked by Streams & Sales |url=https://www.billboard.com/lists/most-popular-christmas-songs-21st-century-streams-sales/2-kelly-clarkson-underneath-the-tree-2010/ |access-date=December 27, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande is the third-most-subscribed female soloist on YouTube, with over 57 million subscribers.<ref name="ytsubs"/> Eight of her music videos have surpassed over one billion views; two of them have received over two billion views on the app.<ref name="focus1bn"/><ref name="bangbang2bn"/>
Grande has won three [[Grammy Award]]s,<ref>{{cite web |url=https://www.grammy.com/artists/ariana-grande/18441 |title=Ariana Grande {{!}} Artist |access-date=February 2, 2026 |website=grammy.com}}</ref> one [[Brit Award]],<ref>{{cite web |url=https://www.theguardian.com/music/2019/feb/20/full-list-of-brit-awards-2019-winners-as-they-happen |title=Full list of Brit awards 2019 winners – as they happen |website=[[The Guardian]] |date=February 20, 2019}}</ref> thirteen [[MTV Video Music Award]]s (the fifth-most wins among women),<ref>{{cite magazine |last=Green |first=Walden |date=September 7, 2025 |title=MTV VMAs 2025 Winners: See the Full List Here |url=https://pitchfork.com/news/mtv-vmas-2025-winners-see-the-full-list-here/ |magazine=[[Pitchfork (magazine)|Pitchfork]] |access-date=September 8, 2025}}</ref><ref>{{Cite web |last=Montgomery |first=Daniel |date=September 11, 2024 |title=VMAs biggest winners of all time: Taylor Swift, BTS and Beyonce among top MTV Video Music Awards champs ever |url=https://www.goldderby.com/gallery/most-vmas-biggest-winners-mtv-video-music-awards/ariana-grande-10/ |access-date=September 17, 2024 |publisher=GoldDerby}}</ref> three [[MTV Europe Music Awards]],<ref>{{cite web |last=Wright |first=Tolly |url=https://www.vulture.com/2016/11/canadians-win-big-at-2016-mtv-emas.html |title=MTV's 2016 European Music Awards Honored Europe's Favorite Singing Canadians |website=Vulture.com |date=November 6, 2016}}</ref> and three [[American Music Award]]s.<ref>{{cite web |last=Park |first=Andrea |url=https://www.cbsnews.com/news/amas-2016-highlights-and-winners-at-the-american-music-awards |title=AMAs 2016: Highlights and winners at the American Music Awards |publisher=CBS News |date=November 20, 2016}}</ref> She has received 42 [[Billboard Music Award|''Billboard'' Music Award]] nominations and won 2 in 2019, including [[Billboard Music Award for Top Female Artist|Top Female Artist]].<ref name="billboard_8509655"/> Grande has won eleven [[Nickelodeon Kids' Choice Awards]], including one in [[2014 Kids' Choice Awards|2014]] for [[Kids' Choice Award for Favorite Female TV Star|Favorite TV Actress]] for her performance on ''Sam & Cat'',<ref>{{cite news |last=Wahlberg |first=Mark |title=Nickelodeon's Kids' Choice Awards: The Winners |url=https://www.hollywoodreporter.com/news/kids-choice-awards-2014-winners-692089 |access-date=July 2, 2015 |work=The Hollywood Reporter |date=March 29, 2014}}</ref> and one in [[2025 Kids' Choice Awards|2025]] for [[Kids' Choice Award for Favorite Movie Actress|Favorite Movie Actress]] for her performance in ''Wicked''.<ref>{{cite magazine |last1=Grein |first1=Paul |title=Sabrina Carpenter, SZA, Ariana Grande Win Multiple Awards at 2025 Kids' Choice Awards (Full Winners List) |url=https://www.billboard.com/music/awards/2025-kids-choice-awards-winners-list-1236004651/ |access-date=June 22, 2025 |magazine=[[Billboard (magazine)|Billboard]] |date=June 21, 2025}}</ref> She has received three [[People's Choice Award]]s.<ref>{{cite news |url=http://www.mtv.com/news/1720133/peoples-choice-awards-2014-winners-list/ |archive-url=https://web.archive.org/web/20150107230536/http://www.mtv.com/news/1720133/peoples-choice-awards-2014-winners-list/ |archive-date=January 7, 2015 |title=2014 People's Choice Awards: The Complete Winners List |publisher=[[MTV]] |date=January 8, 2014 |access-date=January 31, 2014 }} {{Webarchive|url=https://web.archive.org/web/20150107230536/http://www.mtv.com/news/1720133/peoples-choice-awards-2014-winners-list/ |date=January 7, 2015 }}</ref> In 2014, she received the Breakthrough Artist of the Year Award from the Music Business Association<ref name=BillArtist13/> and Best Newcomer at the [[Bambi Awards]].<ref>{{cite web |title=Newcomer BAMBI goes to Ariana Grande |url=http://www.bambi-awards.com/newcomer-bambi-goes-to-ariana-grande/22249 |website=Bambi}}</ref> She has won six [[iHeartRadio Music Awards]]<ref>{{cite web |title=Ariana Grande Performs "Problem" ft. Iggy Azalea at the iHeartRadio Music Awards |url=http://news.iheart.com/articles/iheartradio-music-awards-483670/ariana-grande-performs-problem-ft-iggy-12310729/ |publisher=iHeartRadio |access-date=December 27, 2014 |archive-url=https://web.archive.org/web/20150706084430/http://news.iheart.com/articles/iheartradio-music-awards-483670/ariana-grande-performs-problem-ft-iggy-12310729/ |archive-date=July 6, 2015 }}</ref> and twelve [[Teen Choice Awards]].<ref>{{cite web |date=August 16, 2015 |title=2015 Teen Choice Award Winners – Full List |url=https://variety.com/2015/tv/news/teen-choice-awards-winners-2015-full-list-1201571268/ |access-date=August 17, 2015 |work=Variety}}</ref> She was named ''Billboard'' Women in Music's Rising Star in 2014<ref>{{cite magazine |last=Lynch |first=Joe |url=https://www.billboard.com/articles/events/women-in-music-2014/6405617/ariana-grande-rising-star-women-in-music |title=Women in Music's Rising Star Ariana Grande Shares Her Mother's Most Important Lesson |magazine=[[Billboard (magazine)|Billboard]] |date=December 12, 2014}}</ref> and [[Billboard Women in Music|Woman of the Year]] in 2018,<ref name="Aniftos">{{cite magazine |last=Aniftos |first=Rania |url=https://www.billboard.com/articles/events/women-in-music/8483492/ariana-grande-billboard-2018-woman-of-the-year |title=Ariana Grande Is Billboard's 2018 Woman of the Year |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 6, 2018}}</ref> the greatest pop star of 2019, with honorable mentions in 2014 and 2018; and the most successful female artist to debut in the 2010s by ''[[Billboard (magazine)|Billboard]]''.<ref name="billboard.com">{{cite magazine |url=https://www.billboard.com/charts/decade-end/top-artists |title=Decade-End Charts Top Artists 2010s |magazine=[[Billboard (magazine)|Billboard]] |access-date=December 4, 2019}}</ref><ref>{{cite magazine |url=https://www.billboard.com/greatest-pop-star-every-year/?_gl=1*dl8i7y*_ga*YW1wLUxfSTlTay1vMWg0LU51YUpuLThNU3QyWXZKSnpsUnJGdU8zVDJSQmFYd3BZSUw4RGZwdElDcEtHQUs0dExVRW4 |title=The Greatest Pop Star By Year |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 21, 2023}}</ref> Grande was named one of the ten best-selling [[Global Recording Artist of the Year|global recording artists]] of 2018, 2019, and 2020 by the [[International Federation of the Phonographic Industry]] (IFPI), being the highest-ranked woman of 2018 (number eight).<ref>{{cite magazine |last=Paine |first=Andrew |date=February 26, 2019 |title=Drake named IFPI's global recording artist of 2018 |url=https://www.musicweek.com/talent/read/drake-named-ifpi-s-global-recording-artist-of-2018/075443 |access-date=October 10, 2024 |magazine=[[Music Week]]}}</ref><ref>{{cite magazine |last=Cirisano |first=Tatiana |date=March 2, 2020 |title=Taylor Swift Crowned IFPI's Global Best-Selling Artist of 2019 |url=https://www.billboard.com/pro/taylor-swift-ifpi-global-best-selling-artist-2019/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite magazine |last=Brandle |first=Lars |date=March 4, 2021 |title=BTS Crowned IFPI Global Recording Artist of 2020 |url=https://www.billboard.com/pro/bts-ifpi-global-recording-artist-2020/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> The IFPI ranked her as 2024 and 2025's eleventh-best-selling recording artist globally.<ref name="ifpi2024"/><ref>{{Cite magazine |last=Smith |first=Thomas |date=February 18, 2026 |title=Taylor Swift Named IFPI's Biggest-Selling Global Artist in 2025, Her Fourth Year in a Row |url=https://www.billboard.com/music/chart-beat/taylor-swift-biggest-selling-artist-globally-2025-ifpi-list-1236181162/ |access-date=February 20, 2026 |magazine=Billboard}}</ref> For acting, Grande has been nominated for an [[Academy Award]], two [[Golden Globe Awards]], two [[Critics' Choice Movie Awards|Critics' Choice]] awards, and a [[British Academy Film Awards|BAFTA Award]], [[Screen Actors Guild Awards|Screen Actors Guild Award]], and [[Satellite Award for Best Actress in a Supporting Role|Satellite Award]] each.<ref name="WickedNoms"/>
Nine singles by Grande have topped the [[List of Billboard Hot 100 chart achievements and milestones|''Billboard'' Hot 100]], her most recent being "[[We Can't Be Friends (Wait for Your Love)]]".<ref name="wcbfn1">{{Cite magazine |last=Trust |first=Gary |date=March 18, 2024 |title=Ariana Grande's 'We Can't Be Friends' Debuts at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/lists/ariana-grande-we-cant-be-friends-hot-100-number-one-debut/streams-airplay-sales-3/ |access-date=March 18, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande has a total of twenty-three top-ten songs on the chart, which includes sixteen top-ten debuts thus far, beginning with her first single "[[The Way (Ariana Grande song)|The Way]]"; the lead single from each of her first seven studio albums have debuted in the top ten, making her the only artist to achieve this.<ref>{{cite web |url=https://www.stereogum.com/2022487/ariana-grande-thank-u-next-number-1-debut/news/ |title=Ariana Grande's "thank u, next" Debuts At #1 |date=November 12, 2018 |website=Stereogum |access-date=November 14, 2018}}</ref> In 2020, she became the first act to have her first five number-one singles, "[[Thank U, Next (song)|Thank U, Next]]", "[[7 Rings]]", "[[Stuck With U]]", "[[Rain on Me (Lady Gaga and Ariana Grande song)|Rain on Me]]", and "[[Positions (song)|Positions]]" debut at number one; that year, Grande also broke the record for the most number one debuts and became the first female artist topping [[Billboard Global 200|Global 200, Global 200 Excl. US and Hot 100 simultaneously]].<ref name="Billboard"/> Grande would also become the first artist to have three singles debut at number one on a single calendar year.<ref name="billboardpositions"/> She later broke the record for most simultaneously charting songs on the top 40 of the Hot 100 for a female artist with the release of her fifth studio album, ''[[Thank U, Next]]'', when eleven of the twelve tracks charted within the region (later surpassed by [[Billie Eilish]]).<ref name=MostTop40/>
The three singles from ''Thank U, Next'', "7 Rings", "[[Break Up with Your Girlfriend, I'm Bored]]", and "Thank U, Next" charted at numbers one, two, and three respectively on the week of February 23, 2019, making Grande the first solo artist to occupy the top three spots of the ''Billboard'' Hot 100 and the first artist to do so since the Beatles in 1964.<ref name="B19"/> With her album ''Thank U, Next'', Grande set the record for the largest streaming week for a pop album and for a female artist at the time, with 307 million on-demand audio streams.<ref name="BB2002"/> With "Die for You" with [[the Weeknd]] reaching number one, she surpassed Paul McCartney as the artist with the most number-one duets in Hot 100 history, with four songs. In December 2025, Grande became the third woman in history to chart eight albums simultaneously on the ''Billboard'' 200, joining [[Taylor Swift]] and [[Whitney Houston]].<ref>{{Cite web |date=December 17, 2025 |title=Ariana Grande Makes ''Billboard'' 200 History With Eight Albums Charting at Once |url=https://inmusicblog.com/ariana-grande-seven-albums-billboard-200-history/ |access-date=January 7, 2026 |website=InMusic Blog}}</ref> {{As of|2026|{{CURRENTMONTHNAME}}}}, Grande has 98 chart entries—the fourth-most among women—on the Hot 100.<ref>{{cite magazine |date=January 7, 2026 |title=Ariana Grande (Chart History): ''Billboard'' Hot 100 |url=https://www.billboard.com/artist/ariana-grande/ |access-date=January 7, 2026 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> She is the female artist with the second-most number-one debuts on the Hot 100 (7).<ref>{{cite magazine |url=https://www.billboard.com/lists/taylor-swift-hot-100-top-14-fortnight-post-malone-record/swifts-12th-hot-100-no-1/ |title=Taylor Swift Claims Record Top 14 Spots on Billboard Hot 100, Led by 'Fortnight' With Post Malone |magazine=[[Billboard (magazine)|Billboard]] |last=Trust |first=Gary |date=April 29, 2024 |access-date=October 7, 2024}}</ref> On the ''Billboard'' [[Pop Airplay]] chart, Grande has 10 number-ones and 23 top-ten songs.<ref name="popairplay">{{cite web |url=https://www.billboard.com/artist/ariana-grande/chart-history/tfm/ |title=Ariana Grande Chart History (Pop Airplay) |magazine=[[Billboard (magazine)|Billboard]] |access-date=October 10, 2024}}</ref> She was also named the ''Billboard'' year-end Top Female Artist of 2017 and 2019 and was ranked sixth among women (twelfth overall) on the magazine's decade-end Top Artists Chart for the 2010s, the highest for any female act to have debuted that decade.<ref>{{cite news |title=Year-End Charts Top Artists – Female (2017) |url=https://www.billboard.com/charts/year-end/2017/top-artists-female/ |access-date=June 11, 2022 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite news |title=Year-End Charts Top Artists – Female (2019) |url=https://www.billboard.com/charts/year-end/2019/top-artists-female/ |access-date=June 11, 2022 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite news |title=Decade-End Charts Top Artists (2010s) |url=https://www.billboard.com/charts/decade-end/top-artists/ |access-date=November 25, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> The magazine also ranked her as the sixth-greatest pop star of 2024,<ref>{{Cite magazine |last=Unterberger |first=Andrew |date=December 23, 2024 |title=''Billboard'' Staff's 10 Greatest Pop Stars of 2024 (Full List) |url=https://www.billboard.com/lists/greatest-pop-stars-2024-full-list |access-date=December 29, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{Cite magazine |last=Denis |first=Kyle |date=December 18, 2024 |title=''Billboard'' Staff's Greatest Pop Stars of 2024: No. 6 — Ariana Grande |url=https://www.billboard.com/music/pop/ariana-grande-greatest-pop-stars-2024-1235860692/ |access-date=December 29, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> 78th on the "Greatest of All Time Hot 100 Artists" chart,<ref>{{cite news |title=Greatest of All Time Hot 100 Artists |url=https://www.billboard.com/charts/greatest-hot-100-artists/ |access-date=November 25, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite magazine |date=November 23, 2021 |title=The Weeknd's 'Blinding Lights' Is the New No. 1 Billboard Hot 100 Song of All Time |url=https://www.billboard.com/music/chart-beat/the-weeknd-blinding-lights-all-time-hot-100-1235001770/ |access-date=November 25, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and 19th on their "Top Artists of the 21st Century" list.<ref>{{Cite magazine |date=January 8, 2025 |title=Top Artists of the 21st Century |url=https://www.billboard.com/charts/top-artists-of-the-21st-century/ |url-access=subscription |access-date=January 11, 2025 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
As of 2025, Grande has broken 40 ''[[Guinness World Records]]''.<ref name="Higgins">{{cite web |first=Cole |last=Higgins |title=Ariana Grande just earned her 20th Guinness World Records title |url=https://www.cnn.com/2021/02/07/entertainment/ariana-grande-20th-guinness-world-records-tnd/index.html |access-date=February 9, 2021 |publisher=CNN |date=February 8, 2021}}</ref><ref>{{Cite web |last=Newman |first=Vicki |date=January 16, 2025 |title=Ariana Grande takes huge Spotify record from Taylor Swift amid Wicked box office success |url=https://www.guinnessworldrecords.com/news/2025/1/ariana-grande-takes-huge-spotify-record-from-taylor-swift-amid-wicked-box-office-success/ |access-date=January 25, 2025 |website=[[Guinness World Records]]}}</ref> These records included the most songs to debut at number one on the ''Billboard'' Hot 100, most followers on Spotify (female), most monthly listeners on Spotify (female), most-streamed act on Spotify (female), most streamed track in one week by a female artist on the Billboard charts, fastest hat-trick of UK No. 1 singles by a female artist, first female artist to replace herself at No. 1 on UK singles chart, first solo artist to replace themselves at No. 1 on UK singles chart for two consecutive weeks, most subscribers for a musician on YouTube (female), most streamed album by a female artist in one week (UK), among others. Eleven records were achieved from the success of her album ''Thank U, Next'' which was featured in the 2020 edition.
== Philanthropy and activism ==
At age ten, Grande co-founded the South Florida youth singing group Kids Who Care, which performed at charitable fund-raisers and raised over $500,000 in 2007 alone.<ref name="AboutAriana">{{cite web |title=Ariana Grande – About Ariana |url=http://www.arianagrande.info/about.php |publisher=OfficalArianaGrande |access-date=October 29, 2016 |archive-url=https://web.archive.org/web/20140212053628/http://www.arianagrande.info/about.php |archive-date=February 12, 2014}}</ref> In 2009, as a member of the charitable organization Broadway in South Africa, she and her brother Frankie performed and taught music and dance to children in [[Gugulethu]], South Africa.<ref name="Backstage">{{cite web |last=Nikutopia |title=Ariana Grande's Brother Frankie to Play Cat's Brother in Upcoming "Victorious" Episode? |url=http://www.nickutopia.com/2011/11/15/ariana-grandes-brother-frankie-to-play-cats-brother-in-upcoming-victorious-episode/ |access-date=July 17, 2013 |archive-url=https://web.archive.org/web/20131017234719/http://www.nickutopia.com/2011/11/15/ariana-grandes-brother-frankie-to-play-cats-brother-in-upcoming-victorious-episode/ |archive-date=October 17, 2013}}</ref><ref>{{cite web |title=Ariana Grande on PIX Morning News (April 30, 2010) |url=https://www.youtube.com/watch?v=9YhZQiGJHnw |archive-url=https://ghostarchive.org/varchive/youtube/20211220/9YhZQiGJHnw |archive-date=December 20, 2021 |url-status=live |via=YouTube |date=October 2010}}{{cbignore}}</ref>
She was featured with [[Bridgit Mendler]] and [[Kat Graham]] in ''[[Seventeen (American magazine)|Seventeen]]'' magazine in a 2013 public campaign to end [[online bullying]] called "Delete Digital Drama".<ref>{{cite web |url=http://www.seventeen.com/entertainment/features/delete-digital-drama-quotes-bridgit-mendler#slide-1 |title=Spread Love, Not Hate |work=Seventeen Magazine |access-date=July 8, 2012}}</ref> After watching the film ''[[Blackfish (film)|Blackfish]]'' that year, she urged fans to stop supporting [[SeaWorld]].<ref name="DailyNews1"/> In September 2014, Grande participated at the charitable [[Stand Up to Cancer]] television program, performing her song "My Everything" in memory of her grandfather, who had died of cancer that July.<ref>{{cite magazine |title=The Who, Ariana Grande, and Dave Matthews Help Stand Up to Cancer |url=https://www.rollingstone.com/music/news/the-who-ariana-grande-and-dave-matthews-help-stand-up-to-cancer-20140906 |magazine=[[Rolling Stone]] |date=September 6, 2014 |access-date=September 5, 2014 |archive-date=August 25, 2017 |archive-url=https://web.archive.org/web/20170825064221/https://www.rollingstone.com/music/news/the-who-ariana-grande-and-dave-matthews-help-stand-up-to-cancer-20140906 }}</ref> Grande has adopted several rescue dogs as pets and has promoted pet adoption at her concerts.<ref>{{cite web |last=Lindner |first=Emilee |url=http://www.mtv.com/news/2110984/ariana-grande-dogs |archive-url=https://web.archive.org/web/20150322105241/http://www.mtv.com/news/2110984/ariana-grande-dogs/ |archive-date=March 22, 2015 |title=Ariana Grande Rescued 15 Dogs And Is Giving Them Away to Her Fans |publisher=[[MTV]] |date=March 20, 2015}}; and {{cite web |last=Caldwell |first=Kayla |url=http://www.nbcmiami.com/news/local/Miami-Dade-Animal-Services-Adoption-Fees-Waived-297885061.html |title=Miami-Dade Animal Services Adoption Fees Waived |website=NBCMiami.com |date=March 28, 2015}}</ref> In 2016, she launched a line of lip shades, "Ariana Grande's MAC Viva Glam", with MAC Cosmetics, the profits of which benefited people affected by HIV and AIDS.<ref>{{cite web |last=Ruffo |first=Jillian |url=http://stylenews.peoplestylewatch.com/2016/01/13/its-here-ariana-grandes-m-a-c-viva-glam-collection-can-finally-grace-your-lips |title=It's Here: Ariana Grande's M.A.C Viva Glam Collection Can Finally Grace Your Lips |work=[[People (magazine)|People]] StyleWatch |date=January 13, 2016 |access-date=January 13, 2016 |archive-url=https://web.archive.org/web/20160329025103/http://stylenews.peoplestylewatch.com/2016/01/13/its-here-ariana-grandes-m-a-c-viva-glam-collection-can-finally-grace-your-lips/ |archive-date=March 29, 2016 }}</ref><ref>{{cite web |last=Keirans |first=Maeve |url=http://www.mtv.com/news/2894076/ariana-grande-viva-glam-campaign |archive-url=https://web.archive.org/web/20160617135108/http://www.mtv.com/news/2894076/ariana-grande-viva-glam-campaign/ |archive-date=June 17, 2016 |title=Ariana Grande Is a Beautiful Giant In Her New MAC Campaign |publisher=[[MTV]] |date=June 16, 2016}}</ref> That same year, Grande and [[Andrea Martin]] participated in the [[Children of Armenia Fund]] (COAF) gala concert, a benefit for raising funds for impoverished children in [[Armenia]], by encouraging people to buy tickets in support.<ref>{{Cite web |date=November 30, 2016 |title=Andrea Martin, Ariana Grande call to join Children of Armenia Fund Gala |url=https://style.news.am/eng/news/36511/andrea-martin-ariana-grande-call-to-join-children-of-armenia-fund-gala.html |website=style.news.am}}</ref><ref>{{Cite web |date=November 30, 2016 |title=Tom Hanks, Ariana Grande and Andrea Martin call on taking part in Children of Armenia Fund's Gala |url=https://armenpress.am/en/article/869872 |website=Armenpress |language=en}}</ref>
In 2015, Grande and [[Miley Cyrus]] performed a cover of [[Crowded House]]'s "[[Don't Dream It's Over]]" as part of Cyrus's "[[Backyard Sessions]]" to benefit her [[Happy Hippie Foundation]], which helps homeless and LGBTQ youths.<ref>{{cite web |url=https://www.yahoo.com/music/neil-finn-salutes-miley-cyrus-and-ariana-grandes-119053970556.html |title=Neil Finn Salutes Miley Cyrus and Ariana Grande's Crowded House Cover |publisher=Yahoo! Music |date=May 16, 2015}}; and {{cite magazine |url=https://time.com/3858597/miley-cyrus-ariana-grande-cover/ |title=Watch Miley Cyrus and Ariana Grande Cover 'Don't Dream It's Over' |magazine=Time |date=May 14, 2015}}; and {{cite magazine |last=O'Donnell |first=Kevin |url=https://www.ew.com/article/2015/05/13/miley-cyrus-ariana-dont-dream-its-over-cove |title=Watch Miley Cyrus and Ariana Grande Cover 'Don't Dream It's Over' |magazine=Entertainment Weekly |date=May 14, 2015}}{{dead link|date=November 2021 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> Later that year, Grande headlined the Dance On the Pier event, part of the [[LGBT Pride March (New York City)|LGBT Pride]] Week in New York City.<ref>{{cite web |last=Erlich |first=Brenna |url=http://www.mtv.com/news/2198691/ariana-grande-dance-pier-scotus-marriage-equality/ |archive-url=https://web.archive.org/web/20150630195659/http://www.mtv.com/news/2198691/ariana-grande-dance-pier-scotus-marriage-equality/ |archive-date=June 30, 2015 |title=Ariana Grande Told All the Haters In SCOTUS to 'Get Their Heads Out Of Their F–king Asses' |publisher=MTV News |date=June 29, 2015}}; and {{cite magazine |last=Hinzmann |first=Dennis |url=http://www.out.com/popnography/2015/7/01/icymi-ariana-grande-slayed-nyc-prides-dance-pier |title=ICYMI: Ariana Grande Slayed at NYC Pride's Dance on the Pier |magazine=Out |date=July 1, 2015}}</ref> As a feminist, Grande wrote a well-received, "empowering" essay on Twitter decrying the double standard and misogyny in the focus of the press on female musicians' relationships and sex lives instead of "their value as an individual".<ref>{{cite magazine |last=Peters |first=Mitchell |date=June 7, 2015 |title=Ariana Grande Shares Empowering Essay Following Big Sean Breakup |url=https://www.billboard.com/music/pop/ariana-grande-shares-empowering-essay-following-big-sean-breakup-6590565/ |magazine=[[Billboard (magazine)|Billboard]]}}; and {{cite news |date=June 8, 2015 |title=Ariana Grande Lashes Out Against 'Double Standard and Misogyny' |url=https://abcnews.go.com/Entertainment/ariana-grande-lashes-double-standard-misogyny/story?id=31602353 |agency=ABC News}}</ref><ref>{{cite magazine |last=Plucinska |first=Joanna |date=June 8, 2015 |title=Pop-Star Sisterhood Approves Ariana Grande's Feminist Stand |url=https://time.com/3912119/ariana-grande-taylor-swift-rita-ora-feminist-twitter-sisterhood/ |magazine=Time |access-date=November 18, 2024 |archive-date=November 27, 2024 |archive-url=https://web.archive.org/web/20241127234714/https://time.com/3912119/ariana-grande-taylor-swift-rita-ora-feminist-twitter-sisterhood/ }}; and {{cite news |last=Rosa |first=Jelani |date=June 10, 2015 |title=Here's What Selena Gomez Had to Say About Ariana Grande's Empowering Feminist Essay |url=https://www.washingtonpost.com/blogs/style-blog/wp/2014/09/19/ariana-grande-is-on-the-brink-of-a-major-image-problem-how-can-she-fix-it |newspaper=The Washington Post}}</ref> She said that she has "more to talk about" concerning her music and accomplishments rather than her romantic relationships.<ref>{{cite news |last=Grinberg |first=Emanuella |date=June 9, 2015 |title=Ariana Grande takes down sexist double standards in a single tweet |url=http://www.cnn.com/2015/06/07/entertainment/ariana-grande-double-standard-misogyny-tweet-feat |publisher=CNN}}</ref><ref>{{cite news |last=Yahr |first=Emily |date=June 8, 2015 |title=Why Ariana Grande's feminist Twitter post was a brilliant career move |url=https://www.washingtonpost.com/blogs/style-blog/wp/2015/06/08/why-ariana-grandes-feminist-twitter-post-was-a-brilliant-career-move |newspaper=The Washington Post}}</ref> That year, Grande joined [[Madonna]] to raise funds for orphaned children in [[Malawi]];<ref>{{cite magazine |last=Roberts |first=Kayleigh |url=http://www.elle.com/culture/celebrities/news/a41203/ariana-grande-madonna-racy-performance |title=Ariana Grande and Madonna Gave a Racy Live Performance Together |magazine=[[Elle (magazine)|Elle]] |date=December 3, 2016}}</ref> she and [[Victoria Monét]] recorded "Better Days" in support of the [[Black Lives Matter]] movement.<ref>{{cite magazine |last=Daly |first=Rhian |url=https://www.nme.com/news/music/ariana-grande-5-1190612 |title=Ariana Grande and Victoria Monét share 'Better Days' in support of Black Lives Matter |magazine=[[NME]] |date=July 11, 2016 |access-date=May 23, 2017}}</ref>
To aid the victims of the [[Manchester Arena bombing]] in 2017, Grande organized the [[One Love Manchester]] concert and re-released "One Last Time" and her live performance of "[[Over the Rainbow]]" at the event as charity singles.<ref name="Civico">{{cite web |last=Civico |first=Aldo |date=June 6, 2017 |title=Ariana Grande, I Wish You Were Our President! |url=https://www.huffingtonpost.com/entry/ariana-grande-i-wish-you-were-our-president_us_59374970e4b06bff911d7bf0 |work=HuffPost}}; and {{cite news |last=Mallenbaum |first=Carly |date=June 5, 2017 |title=Ariana Grande stays strong, makes a pitch-perfect return to Manchester |url=https://www.usatoday.com/story/life/entertainthis/2017/06/04/ariana-grande-manchester-one-love-benefit-concert/102491800/ |newspaper=USA Today}}</ref><ref>{{cite news |url=http://www.sfgate.com/news/media/Ariana-Grande-continues-raising-money-for-899426.php |title=Ariana Grande continues raising money for Manchester victims |agency=[[SFGate]] |date=June 8, 2017}}</ref> The total amount raised was reportedly $23 million (more than £17 million),<ref name="Fader2018"/><ref name="FundsRaised"/> and she received praise for her "grace and strength" in leading the benefit concert.<ref>{{cite magazine |last=Lynskey |first=Dorian |date=June 9, 2017 |title=How Ariana Grande's Embrace of Community at 'One Love Manchester' Made Her a Star in the U.K. |url=https://www.billboard.com/music/pop/ariana-grande-uk-star-manchester-one-love-concert-7825656/ |magazine=[[Billboard (magazine)|Billboard]]}}; and {{cite news |date=June 13, 2017 |title=Ariana Grande to get honorary citizenship of Manchester |url=https://www.bbc.com/news/uk-england-manchester-40267365 |agency=BBC News}}</ref><ref name="Civico"/> Madeline Roth of MTV wrote that the performance "bolstered courage among an audience that desperately needed it. ... Returning to the stage was a true act of bravery and resilience".<ref>{{cite news |last=Roth |first=Madeline |date=December 6, 2017 |title=Against All Odds, Selena, Ariana, and Kesha Triumphed In 2017 |url=http://www.mtv.com/news/3050051/selena-gomez-ariana-grande-kesha-triumph-2017 |archive-url=https://web.archive.org/web/20171206190207/http://www.mtv.com/news/3050051/selena-gomez-ariana-grande-kesha-triumph-2017/ |archive-date=December 6, 2017 |publisher=MTV News }} {{Webarchive|url=https://web.archive.org/web/20190912172333/http://www.mtv.com/news/3050051/selena-gomez-ariana-grande-kesha-triumph-2017/ |date=September 12, 2019 }}</ref> In 2017, ''[[New York (magazine)|New York]]'' magazine's Vulture section ranked the event as the No. 1 concert of the year,<ref name="Vulture2017">{{cite web |last=Lockett |first=Dee |date=December 21, 2017 |title=The 10 Best Concerts of 2017 |url=https://www.vulture.com/2017/12/the-10-best-concerts-of-2017.html |magazine=[[New York (magazine)|New York]]}}</ref> and ''Billboard''{{'s}} Mitchell Harrison called Grande a "gay icon" for her LGBTQ-friendly lyrics and performances and "support for the LGBTQ community".<ref>{{cite magazine |last=Harrison |first=Mitchell |date=July 19, 2017 |title=8 Reasons Ariana Grande Is the Gay Icon of Her Generation |url=https://www.billboard.com/photos/7864993/8-reasons-ariana-grande-is-the-gay-icon-of-her-generation |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
In September 2017, Grande performed in ''[[A Concert for Charlottesville]]'' which benefitted the victims of the [[Unite the Right rally|August 2017 white nationalist rally]] in [[Charlottesville, Virginia]].<ref>{{cite magazine |last=Delbyck |first=Cole |url=https://www.huffingtonpost.com/entry/ariana-grande-charlottesville_us_59c8f970e4b01cc57ff38b2b |title=Ariana Grande Returns to the Stage for Charlottesville Unity Concert |magazine=[[HuffPost]] |date=September 25, 2017}}</ref> In March 2018, she participated in [[March for Our Lives]] to support gun control reform.<ref>{{cite magazine |last=Honeycutt |first=Shanté |url=https://www.billboard.com/articles/news/politics/8248854/ariana-grande-miley-cyrus-march-for-our-lives |title=Ariana Grande, Miley Cyrus, Jennifer Hudson & More Set to Join Student-Led March for Our Lives |magazine=[[Billboard (magazine)|Billboard]] |date=March 16, 2018}}; and {{cite magazine |last=Kreps |first=Daniel |url=https://www.rollingstone.com/music/news/watch-ariana-grande-sing-be-alright-at-march-for-our-lives-w518351 |title=Watch Ariana Grande Sing 'Be Alright' at March for Our Lives Rally |magazine=[[Rolling Stone]] |date=March 24, 2018 |access-date=March 29, 2018 |archive-date=June 20, 2018 |archive-url=https://web.archive.org/web/20180620181006/https://www.rollingstone.com/music/news/watch-ariana-grande-sing-be-alright-at-march-for-our-lives-w518351 }}</ref> Grande donated the proceeds from the first show in Atlanta on her [[Sweetener World Tour]] to Planned Parenthood in a response to the passage of a number of anti-abortion laws in several states including [[Georgia (U.S. state)|Georgia]].<ref>{{cite magazine |last=Aswad |first=Jem |url=https://variety.com/2019/music/news/ariana-grande-donates-profits-from-atlanta-concert-to-planned-parenthood-1203240940/ |title=Ariana Grande donates Profits from Atlanta Concert to Planned Parenthood |magazine=Variety |date=June 12, 2019}}</ref><ref>{{cite news |access-date=June 18, 2019 |title=Ariana Grande donates $250,000 from Atlanta concert to Planned Parenthood |url=https://www.usatoday.com/story/life/people/2019/06/12/ariana-grande-donates-georgia-concert-money-planned-parenthood/1430405001/ |newspaper=[[USA Today]]}}</ref> During the [[COVID-19 pandemic]], Grande donated between $500 and $1,000 each to a number of fans as financial support.<ref>{{cite web |url=https://www.refinery29.com/en-us/2020/03/9619034/ariana-grande-taylor-swift-send-money-unemployed-fans-coronavirus |last=Reilly |first=Kaitlin |title=Ariana Grande & Taylor Swift Are Sending Money to Fans Who Lost Their Jobs Due to Coronavirus |website=Refinery29 |date=March 27, 2020}}</ref> Grande also supported a [[COVID-19]] fund named ''Project 100'', which aimed to provide $1,000 digital payments to 100,000 families who have been greatly impacted by the pandemic.<ref>{{cite news |url=https://edition.cnn.com/2020/04/21/politics/stacey-abrams-cory-booker-andrew-yang-snap/index.html |title=Stacey Abrams and Andrew Yang announce push to provide direct cash payments to families on food stamps |last=Judd |first=Donald |publisher=[[CNN]] |date=April 21, 2020}}</ref>
In May 2020, Grande announced that all net proceeds from her collaboration with singer [[Justin Bieber]], "Stuck With U", would be donated to the First Responders Children's Foundation to fund grants and scholarships for children of frontline workers who are working during the [[COVID-19 pandemic|global pandemic]].<ref name="Kaufman"/> That month, Grande joined a Los Angeles protest against the [[murder of George Floyd]], demanding justice and asking fans to sign petitions condemning the act of police brutality. She highlighted white privilege and called for more activism outside social media.<ref>{{cite magazine |title=Ariana Grande, Halsey, Timothée Chalamet, and More Celebrities Spent Their Weekends Protesting |url=https://www.vulture.com/2020/06/george-floyd-protests-ariana-grande-halsey-celebrities-join.html |last=Griffin |first=Louise |date=May 29, 2020 |magazine=New York |access-date=June 2, 2020}}</ref><ref>{{cite magazine |title=Billie Eilish, Beyoncé, Ariana Grande and More Celebrities Respond to George Floyd's Death |url=https://www.teenvogue.com/story/celebrities-respond-george-floyd-death/amp |last=Elizabeth |first=De |date=May 31, 2020 |magazine=[[Teen Vogue]] |access-date=June 2, 2020}}</ref> In 2022, Grande surprised children, who were spending the Christmas holiday period at hospitals in Manchester, with gifts from wish lists at the [[Royal Manchester Children's Hospital]], among others. Manchester Foundation Trust Charity revealed that Grande had gifted nearly 1,000 presents to patients across the hospital network's children's wards and newborn intensive care units in 2021.<ref>{{cite magazine |title=Ariana Grande Gifts Hauls of Christmas Presents to Manchester Children's Hospitals: 'We Were So Touched' |url=https://www.rollingstone.com/music/music-news/ariana-grande-manchester-childrens-hospitals-christmas-presents-1234653389/ |access-date=January 17, 2023 |magazine=[[Rolling Stone]] |date=December 28, 2022}}</ref>
In June 2021, Grande and other celebrities signed an open letter to Congress requesting passage of the [[Equality Act (United States)|Equality Act]], highlighting that the Act would protect "marginalized communities".<ref>{{cite news |last1=Meyers |first1=Dave |title=Ariana Grande, Pink, Halsey, Taylor Swift, Ed Sheeran, Lady Gaga & more urge Congress to pass the Equality Act |url=https://www.wrmf.com/ariana-grande-pink-halsey-taylor-swift-ed-sheeran-lady-gaga-more-urge-congress-to-pass-the-equality-act/ |access-date=June 22, 2021 |publisher=WRMF |date=June 22, 2021}}</ref> In the same month, Grande partnered with the online portal [[BetterHelp]], and gave away $2 million worth of therapy to fans.<ref>{{cite news |title=Ariana Grande donates thousands for free mental health counselling |url=https://jerseyeveningpost.com/morenews/viralnews/2021/06/30/ariana-grande-donates-thousands-for-free-mental-health-counselling/ |access-date=December 30, 2021 |work=Jersey Evening Post |publisher=Claverley Group |date=June 30, 2021}}</ref><ref>{{cite magazine |last=Mcnamara |first=Brittney |date=June 30, 2021 |title=Ariana Grande Is Giving Away $2 Million in Free Therapy With BetterHelp |url=https://www.teenvogue.com/story/ariana-grande-is-giving-away-dollar1-million-in-free-therapy-with-betterhelp |magazine=[[Teen Vogue]] |access-date=December 30, 2021}}</ref> On [[International Transgender Day of Visibility]] in 2022, she launched the Protect & Defend Trans Youth Fund to benefit [[transgender youth]], pledging to match every donation up until $1.5 million.<ref>{{cite news |title=Ariana Grande giving $1.5m to support trans youth amid 'disgraceful' legislative attacks |url=https://www.theguardian.com/music/2022/mar/31/ariana-grande-transgender-youth-rights |last=Cantor |first=Matthew |date=April 1, 2022 |newspaper=[[The Guardian]] |access-date=May 7, 2022}}</ref> In May 2022, Grande was among 160 artists and influencers, who signed a [[2022 abortion rights protests in the United States|'Bans Off Our Bodies']] full-page advertisement in ''[[The New York Times]]'', in support of abortion rights in the US.<ref>{{cite news |title=Ariana Grande and other stars support Roe v Wade in New York Times ad |url=https://www.theguardian.com/us-news/2022/may/13/ariana-grande-billie-eilish-roe-v-wade-abortion-nyt-ad |date=May 13, 2022 |newspaper=[[The Guardian]] |location=UK |access-date=May 15, 2022}}</ref> Grande was also one of 175 entertainers to sign an open letter to oppose books bans in US schools in 2023.<ref>{{cite web |last=Horton |first=Adrian |url=https://www.theguardian.com/books/2023/sep/19/celebrities-sign-letter-book-ban-ariana-grande-amanda-gorman |title='Chilling': Ariana Grande, Amanda Gorman and others sign letter against book bans |newspaper=[[The Guardian]] |date=September 19, 2023}}</ref> In June 2022, Grande endorsed [[Karen Bass]] for 2022 Los Angeles mayoral election.<ref>{{cite magazine |last=Rosenbaum |first=Claudia |date=June 6, 2022 |title="There's More to Being a Democrat Than Just Registering": The L.A. Mayor's Race Is Tearing Hollywood Apart |url=https://www.vanityfair.com/news/2022/06/the-la-mayors-race-is-tearing-hollywood-apart |access-date=June 6, 2022 |magazine=[[Vanity Fair (magazine)|Vanity Fair]]}}</ref>
In 2023, Grande signed an open letter from [[Artists4Ceasefire]] to president [[Joe Biden]] during the [[Gaza war]].<ref>{{Cite web |title=Artists4Ceasefire |url=https://www.artists4ceasefire.org/ |url-status=live |archive-url=https://web.archive.org/web/20231216055552/https://www.artists4ceasefire.org/ |archive-date=December 16, 2023 |access-date=December 17, 2023 |website=Artists4Ceasefire}}</ref><ref>{{Cite web |last=Mouriquand |first=David |date=May 29, 2024 |title=Why is Taylor Swift losing followers over Gaza conflict? |url=https://www.euronews.com/culture/2024/05/29/swiftiesforpalestine-taylor-swift-urged-to-speak-up-on-gaza-conflict |access-date=June 2, 2024 |website=[[Euronews]]}}</ref> In May 2024, after [[Rafah offensive|Israel launched an airstrike on Rafah]], Grande shared a fundraiser aimed at providing humanitarian aid for Palestinians in Gaza.<ref>{{Cite news |last=Butt |first=Maira |date=May 30, 2024 |title=Kehlani calls out celebrities for 'embarrassing' silence on Gaza – as Ariana Grande and Katy Perry speak out |url=https://www.independent.co.uk/arts-entertainment/music/news/kehlani-gaza-celebrities-ariana-grande-katy-perry-b2553769.html |access-date=June 2, 2024 |work=The Independent}}</ref> Following Biden's [[Withdrawal of Joe Biden from the 2024 United States presidential election|withdrawal]] from the [[2024 US presidential election]], Grande showed support for vice president [[Kamala Harris]]'s [[Kamala Harris 2024 presidential campaign|campaign]].<ref>{{Cite web |last=Spencer-Elliott |first=Lydia |date=July 22, 2024 |title=Katy Perry and Ariana Grande among stars to endorse Kamala Harris for president |url=https://www.independent.co.uk/arts-entertainment/music/news/kamala-harris-president-katy-perry-ariana-grande-jamie-lee-curtis-b2583697.html |access-date=July 22, 2024 |website=The Independent}}</ref> In January 2025, she reposted messaging from the nonprofit organization [[Advocates for Trans Equality]], via her social media, in response to US President [[Executive Order 14168|Donald Trump's order]] to withdraw federal recognition for transgender people.<ref>{{Cite magazine |last=Puckett-Pope |first=Lauren |date=January 21, 2025 |title=Ariana Grande Signals Support for Trans Community After President Trump Issues 'Two Sexes' Executive Order |url=https://www.elle.com/culture/celebrities/a63494135/ariana-grande-trump-sex-executive-order-trans-community/ |access-date=April 2, 2025 |magazine=[[Elle (magazine)|Elle]]}}</ref> The following month, Grande advocated for therapy for young entertainers in both the acting and music fields, saying that weekly appointments should be built into their contracts.<ref>{{Cite magazine |last=Shafer |first=Ellise |date=February 10, 2025 |title=Ariana Grande Says Studios and Labels Need to Offer Weekly Therapy in Contracts for Young Stars: 'That Should Be Non-Negotiable' |url=https://variety.com/2025/film/news/ariana-grande-studios-labels-need-offer-therapy-young-stars-1236302363/ |access-date=April 2, 2025 |magazine=Variety}}</ref> That June, she endorsed [[Alexandria Ocasio-Cortez]]'s recommendation to impeach Trump for a "disastrous decision to [[United States strikes on Iranian nuclear sites|bomb Iran]] without authorization".<ref>{{cite magazine |first=Anna |last=Chan |title=Ariana Grande Shares AOC's Call to Impeach President Donald Trump |url=https://www.billboard.com/music/music-news/ariana-grande-aoc-impeach-donald-trump-1236004909/ |magazine=[[Billboard (magazine)|Billboard]] |date=June 23, 2025 |access-date=June 25, 2025}}</ref>
== Business and ventures ==
=== Products and endorsements ===
In November 2015, she released a limited edition handbag in collaboration with [[Coach New York|Coach]].<ref>{{cite web |last=Last |first=Ashley |url=https://www.thenational.ae/coach-unveils-collaboration-with-ariana-grande-1.75347 |title=Coach unveils collaboration with Ariana Grande |date=November 4, 2015 |access-date=October 12, 2019}}</ref> In January 2016, she launched a makeup collection with [[MAC Cosmetics]], donating 100% of proceeds to the [[MAC AIDS Fund]].<ref>{{cite web |url=http://www.instyle.com/news/ariana-grande-good-girl-bad-girl-mac-viva-glam |title=Ariana Grande Goes from a Good Girl to a Bad Girl MAC's Viva Glam Campaign |work=InStyle |date=January 13, 2016 |access-date=February 28, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213313/https://www.instyle.com/news/ariana-grande-good-girl-bad-girl-mac-viva-glam }}; {{cite web |last=Kinonen |first=Sarah |url=http://site.people.com/style/ariana-grande-mac-cosmetics-viva-glam-collection |title=Ariana Grande's Having the Most Glam Week Ever (and It's Only Monday) |work=[[People (magazine)|People]] |date=August 22, 2016 |access-date=August 23, 2016 |archive-date=August 29, 2016 |archive-url=https://web.archive.org/web/20160829103306/http://site.people.com/style/ariana-grande-mac-cosmetics-viva-glam-collection/ }}</ref> In February 2016, Grande launched a fashion line with Lipsy London.<ref>{{cite web |url=https://www.mtv.co.uk/news/tbidj1/first-look-at-the-fashion-line-ariana-grande-has-designed-for-lipsy |title=Ariana Grande Teams Up With Lipsy for Her First Fashion Line |publisher=[[MTV]] |date=February 3, 2016 |access-date=February 28, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213258/http://www.mtv.co.uk/ariana-grande/news/first-look-at-the-fashion-line-ariana-grande-has-designed-for-lipsy |url-status=live}}</ref> Later that year, she teamed up with [[Brookstone]], using the concept art of artist Wenqing Yan, to design cat ear headphones.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/7517948/ariana-grande-brookstone-cat-ear-headphones |title=Ariana Grande & Brookstone Collaborate on Limited-Edition Cat-Ear Headphones |magazine=[[Billboard (magazine)|Billboard]] |date=September 20, 2016 |access-date=December 2, 2019}}</ref> In 2017, Grande collaborated with [[Square Enix]] to create a character based on herself for the [[mobile game]] ''[[Final Fantasy Brave Exvius]]''. Grande was a limited-time unlockable character as part of the [[Dangerous Woman Tour]] event, which also included an orchestral remix of Grande's song "Touch It"; the character, Dangerous Ariana, is a magical support character who uses music-based attacks.<ref>{{cite web |last=Wong |first=Steven |date=February 7, 2017 |title=How 'Final Fantasy Brave Exvius' Teamed Up With Ariana Grande |url=https://www.alistdaily.com/digital/final-fantasy-brave-exvius-teamed-ariana-grande/ |url-status=live |archive-url=https://web.archive.org/web/20200523175139/https://www.alistdaily.com/digital/final-fantasy-brave-exvius-teamed-ariana-grande/ |archive-date=May 23, 2020 |access-date=June 18, 2020 |website=AList}}</ref><ref>{{cite web |last=Fahey |first=Mike |date=January 9, 2017 |title=How To Get Ariana Grande in Final Fantasy Brave Exvius, Because You Can Do That Now |url=https://kotaku.com/how-to-get-ariana-grande-in-final-fantasy-brave-exvius-1791380918 |url-status=live |archive-url=https://web.archive.org/web/20191021215011/https://kotaku.com/how-to-get-ariana-grande-in-final-fantasy-brave-exvius-1791380918 |archive-date=October 21, 2019 |access-date=June 18, 2020 |website=[[Kotaku]]}}</ref> In September 2017, she became a brand ambassador for [[Reebok]].<ref>{{cite magazine |last=Briones |first=Isis |url=https://www.billboard.com/articles/news/lifestyle/7981657/ariana-grande-hong-kong-in-48-hours |title=48 Hours in Hong Kong With Ariana Grande |magazine=[[Billboard (magazine)|Billboard]] |date=September 29, 2017}}</ref>
In August 2018, she partnered with [[American Express]] for [[The Sweetener Sessions]], a partnership which continued through the [[Sweetener World Tour]] in 2019, alongside [[T-Mobile US|T-Mobile]]. In March 2019, she partnered with [[Starbucks]] for the launch of the Cloud Macchiato beverage.<ref>{{cite magazine |url=https://www.billboard.com/articles/business/8501214/ariana-grande-starbucks-cloud-macchiato |title=Ariana Grande Inspires New Starbucks Cloud Macchiato |magazine=[[Billboard (magazine)|Billboard]] |last=Silver |first=Michael |date=March 5, 2019 |access-date=October 23, 2019}}</ref> In May 2019, Grande was announced as the face of [[Givenchy]]'s fall-winter campaign.<ref>{{cite magazine |last=Feller |first=Madison |url=https://www.elle.com/fashion/celebrity-style/a27432137/givenchy-face-ariana-grande-ponytail/ |title=Ariana Grande's Ponytail Is The New Face Of Givenchy |magazine=[[Elle (magazine)|Elle]] |date=May 10, 2019 |access-date=September 17, 2024}}</ref> The campaign began in July and generated $25.13 million in [[Influence of mass media|media impact value]].<ref>{{cite web |last=Cohen |first=Julia |url=https://www.launchmetrics.com/resources/blog/ariana-grande-givenchy |title=Givenchy X Ariana Grande: The Full Data Rundown |website=Launchmetrics |date=September 16, 2019 |access-date=October 11, 2019}}</ref> In July 2024, she became the brand ambassador of [[Swarovski]]; Grande's first appearance as the face was in the house's holiday campaign in October 2024.<ref>{{cite journal |last=Zargini |first=Luisa |url=https://wwd.com/accessories-news/jewelry/ariana-grande-swarovski-brand-ambassador-1236488984/ |title=EXCLUSIVE: Swarovski Taps Ariana Grande as Brand Ambassador |journal=[[Women's Wear Daily]] |date=July 16, 2024 |access-date=September 17, 2024 |url-access=subscription}}</ref><ref>{{Cite journal |last=Mineo |first=Alfredo |date=October 29, 2024 |title=Ariana Grande Dances the Night Away in Swarovski's Shining Couture Dress for Holiday Campaign Music Video |url=https://wwd.com/pop-culture/new-fashion-releases/swarovski-ariana-grande-party-of-dreams-collection-1236705279/ |journal=Women's Wear Daily |access-date=October 31, 2024}}</ref> Grande collaborated with the company's global creative director [[Giovanna Battaglia Engelbert]] on two capsule collections, released in January 2025 and March 2026.<ref>{{Cite magazine |last=Calfee |first=Joel |date=January 28, 2025 |title=Ariana Grande Has Co-Created a Brand-New Capsule With Swarovski |url=https://www.harpersbazaar.com/celebrity/latest/a63577778/ariana-grande-swarovski-capsule-collection-giovanna-engelbert-interview/ |access-date=January 30, 2025 |magazine=[[Harper's Bazaar]]}}</ref><ref>{{Cite magazine |last=Graham |first=Joshua |date=March 18, 2026 |title=Ariana Grande channels ethereal beauty for her second collection with Swarovski |url=https://www.rollingstone.co.uk/style/ariana-grande-x-swarovski-collaboration-2026-59708/ |access-date=March 20, 2026 |magazine=[[Rolling Stone UK]]}}</ref> [[Beats Electronics|Beats]], [[Samsung]], [[Fiat]], Reebok, and [[Guess (clothing)|Guess]] products have been [[Product placement|featured]] in Grande's music videos.<ref>{{cite web |url=https://productplacementblog.com/tag/ariana-grande/ |title=Ariana Grande Product Placement Photos |website=Product Placement Blog |date=December 8, 2018 |access-date=October 11, 2019}}</ref> She has appeared in commercials for [[Macy's]], T-Mobile, and [[Apple Inc.|Apple]], as well as for her own fragrances.<ref>{{cite web |url=https://www.ispot.tv/topic/actor-actress/TY/ariana-grande |title=Ariana Grande TV Commercials Ads |website=i-Spot |access-date=October 11, 2019}}</ref> Since 2019, Grande has been among the ten highest-paid individuals on Instagram. As of 2025, Grande earns $2 million per sponsored Instagram post.<ref>{{Cite news |date=June 29, 2025 |title=Virat Kohli is the only Indian among top 20 highest paid celebrities on Instagram, earns these many crores for every post |url=lhttps://indianexpress.com/article/trending/top-10-listing/top-20-highest-paid-celebs-on-instagram-virat-kohli-earns-this-much-per-post-10090668/ |access-date=July 3, 2025 |work=[[The Indian Express]]}}</ref><ref>{{cite web |url=https://www.scmp.com/magazines/style/celebrity/article/3139620/instagrams-2021-rich-list-cristiano-ronaldo-highest |title=Instagram's 2021 rich list: Cristiano Ronaldo is the highest earner, pushing Dwayne Johnson into second with Ariana Grande third |magazine=[[South China Morning Post]] |date=July 3, 2021 |access-date=October 18, 2022}}</ref>
=== Fragrances ===
Grande has released eighteen fragrances with Luxe Brands. She launched her debut fragrance, Ari by Ariana Grande, in 2015. In the wake of its success, she launched her third fragrance, Sweet Like Candy, in 2016.<ref>{{cite web |last=Bayley |first=Leanne |url=http://www.glamourmagazine.co.uk/news/beauty/2015/02/20/ariana-grande-first-fragrance-celebrity-perfume-news |title=Ariana Grande is launching her first fragrance |work=Glamour (magazine) |date=February 20, 2015 |access-date=May 19, 2015 |archive-url=https://web.archive.org/web/20150403135040/http://www.glamourmagazine.co.uk/news/beauty/2015/02/20/ariana-grande-first-fragrance-celebrity-perfume-news |archive-date=April 3, 2015 }}; {{cite web |last=Geffen |first=Sasha |url=http://www.mtv.com/news/2192443/ariana-grande-perfume-snapchat |title=Ariana Grande Accidentally Revealed Her New Perfume On Snapchat: See The Pics |publisher=[[MTV]] |date=June 20, 2015 |access-date=October 30, 2016 |archive-date=September 14, 2019 |archive-url=https://web.archive.org/web/20190914032913/http://www.mtv.com/news/2192443/ariana-grande-perfume-snapchat/ }}; {{cite web |last=Zhekova |first=Dobrina |url=http://www.instyle.com/beauty/fragrance/ariana-grande-sweet-like-candy-launch |title=Ariana Grande Launches Sweet Like Candy Fragrance – Celebrity Perfumes |work=InStyle |date=July 20, 2016 |access-date=October 8, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213314/https://www.instyle.com/beauty/fragrance/ariana-grande-sweet-like-candy-launch }}</ref> Her fifth fragrance, Moonlight, was released in 2017, followed by Cloud (2018), Thank U, Next (2019), R.E.M. (2020), and God Is a Woman (2021), which was later expanded to an [[Ulta Beauty|Ulta]]-exclusive body care line in 2022.<ref>{{cite web |last=Shaw |first=Sophie |date=August 22, 2022 |title=Ariana Grande launches God Is A Woman body care collection |url=https://edition.cnn.com/cnn-underscored/beauty/ariana-grande-god-is-a-woman-body-collection-launch |archive-url=https://web.archive.org/web/20220822140922/https://edition.cnn.com/cnn-underscored/beauty/ariana-grande-god-is-a-woman-body-collection-launch |archive-date=August 22, 2022 |access-date=August 31, 2022 |publisher=[[CNN]]}}</ref> She then released the duo fragrance collection Mod Vanilla and Mod Blush (2022).<ref>{{cite web |url=https://wwd.com/fashion-news/fashion-scoops/ariana-grande-mod-fragrance-vanilla-blush-duo-release-info-1235426415/ |title=Ariana Grande Channels '60s Mod Inspiration for New Vanilla and Blush Fragrance Duo Collection |agency=[[PR Newswire]] |date=November 22, 2022}}</ref> It was followed by the collection Lovenotes (2024), which consisted of four region-exclusive fragrances.<ref>{{Cite magazine |last=Saulog |first=Gabriel |date=August 9, 2024 |title=Ariana Grande Announces New International Fragrance Line 'LOVENOTES' |url=https://billboardphilippines.com/culture/lifestyle/ariana-grande-announces-new-international-fragrance-line-lovenotes/ |access-date=October 31, 2024 |magazine=[[Billboard Philippines]]}}</ref>
The next fragrance was Cherry Blossom (2025), released as a R.E.M. Beauty product via Ulta.<ref>{{Cite web |last=Chapman |first=Rachel |date=February 28, 2025 |title=Ariana Grande's Cherry Eclipse Or Sabrina Carpenter's Cherry Baby? |url=https://www.elitedaily.com/lifestyle/ariana-grande-cherry-eclipse-sabrina-carpenter-cherry-baby-perfume-reviews/ |access-date=April 1, 2025 |website=[[Elite Daily]]}}</ref> The range also includes the limited editions Frankie (2016), Sweet Like Candy Limited Edition (2017), Thank U, Next 2.0, Cloud Intense (both 2021), and Cloud Pink (2023). The fragrances won the [[FiFi Award]] multiple times, most recently with R.E.M. in 2021. In 2022, it was reported that Cloud was the best-selling fragrance at Ulta, selling one bottle every eleven seconds.<ref>{{cite web |last=Russo |first=Maria Del |date=March 23, 2022 |title=This Cult-Favorite Perfume Sold Every 11 Seconds Last Year — And Now I Know Why |url=https://www.thezoereport.com/beauty/ariana-grande-cloud-perfume |access-date=May 7, 2022 |website=The Zoe Report}}</ref> As of 2024, the scents are developed and manufactured in collaboration with [[Robertet Group]] and [[International Flavors & Fragrances]].<ref>{{Cite web |last=Wightman-Stone |first=Danielle |date=August 12, 2024 |title=Ariana Grande unveils new region-specific fragrance collection |url=https://fashionunited.in/news/fashion/ariana-grande-unveils-new-region-specific-fragrance-collection/2024081246184/ |access-date=October 31, 2024 |publisher=[[FashionUnited]]}}</ref> Grande's fragrance line is the most-searched celebrity offering, with over 4.4 million searches across Google and social media platforms per year, as of 2023.<ref>{{cite magazine |last=Jensen |first=Emily |date=August 14, 2023 |title=Ariana Grande Is the Last Great Celebrity Perfumer |url=https://www.harpersbazaar.com/beauty/a41924718/ariana-grande-perfumes-reviews-success/ |access-date=November 26, 2023 |magazine=Harper's Bazaar}}</ref> Since its launch in 2015, the franchise has made over $1 billion in retail sales globally.<ref>{{cite web |last=Pener |first=Degen |date=November 23, 2022 |title=''The Hollywood Reporter''<nowiki/>'s 40 Biggest Celebrity Entrepreneurs in 2022 |url=https://www.hollywoodreporter.com/lists/the-hollywood-reporters-40-biggest-celebrity-entrepreneurs-2022/jennifer-aniston-6/ |access-date=October 31, 2024 |work=[[The Hollywood Reporter]]}}</ref>
=== R.E.M. Beauty ===
{{Main|R.E.M. Beauty}}
In November 2021, Grande launched her makeup line R.E.M. Beauty, which is distributed at Ulta Beauty as of March 2022.<ref name=HarpersBeauty>{{cite magazine |last=Rosenstein |first=Jenna |url=https://www.harpersbazaar.com/beauty/makeup/a38225476/ariana-grande-rem-beauty-review/ |title=Ariana Grande's Makeup Brand, r.e.m. beauty, Is Available Right Now |magazine=[[Harper's Bazaar]] |date=November 12, 2021}}</ref><ref>{{cite magazine |url=https://wwd.com/beauty-industry-news/beauty-features/ariana-grandes-r-e-m-beauty-heads-to-ulta-1235139566/ |title=Ariana Grande's R.E.M. Beauty Heads to Ulta |date=March 25, 2022 |last=Manso |first=James |magazine=Women's Wear Daily}}</ref> The original line featured 12 core products for lips and eyes, and the range has since been expanded with additional skincare and makeup products.<ref name=HarpersBeauty/><ref>{{cite magazine |url=https://www.elle.com/uk/beauty/make-up/a37945600/ariana-grande-rem-beauty-line/ |title=Everything You Need To Know About Ariana Grande's R.E.M Beauty Line |access-date=August 9, 2022 |date=July 29, 2022 |magazine=Elle}}</ref> ''[[Forbes]]'' reported in 2022 that R.E.M. Beauty was one of the brands boosting Ulta's driving gross margin due to strong consumer demand.<ref>{{cite magazine |url=https://www.forbes.com/sites/shelleykohan/2022/05/26/strong-customer-demand-leads-ulta-beauty-to-a-21-sales-increase/ |title=Strong Customer Demand Leads Ulta Beauty To A 21% Sales Increase |access-date=June 3, 2022 |date=May 26, 2022 |last=Cohan |first=Shelley |magazine=Forbes}}</ref> In May, the line won "Best New Brand" at the [[Allure (magazine)#Best of Beauty Awards|Allure Best of Beauty Awards]].<ref>{{cite magazine |title=These Are the Winners of Our Allure Readers' Choice Awards for 2022 |url=https://www.allure.com/story/readers-choice-winners#newbrand |magazine=[[Allure (magazine)|Allure]] |date=May 16, 2017 |access-date=June 3, 2022 |url-status=live |archive-url=https://web.archive.org/web/20220518152443/https://www.allure.com/story/readers-choice-winners |archive-date=May 18, 2022}}</ref> In February 2023, the brand was launched in 81 [[Sephora]] stores and 13 online sites, including across Europe.<ref>{{cite web |url=https://fashionunited.uk/news/fashion/ariana-grande-s-beauty-line-to-launch-at-sephora/2023020167634 |title=Ariana Grande's beauty line to launch at Sephora |access-date=February 2, 2023 |date=February 1, 2023 |publisher=[[FashionUnited]]}}</ref>
== Personal life ==
Grande has said she struggled with [[hypoglycemia]], which she attributed to poor dietary habits.<ref>{{cite web |last=Carbone |first=Gina |url=http://www.wetpaint.com/nickelodeon-star-ariana-grande-addresses-597630/ |title=Nickelodeon Star Ariana Grande Addresses Eating Disorder Rumors |work=WetPaint |date=June 19, 2013 |access-date=December 11, 2018 |archive-date=September 16, 2019 |archive-url=https://web.archive.org/web/20190916112840/http://www.wetpaint.com/nickelodeon-star-ariana-grande-addresses-597630/ }}; and {{cite magazine |last=Goodman |first=Lizzy |url=https://www.billboard.com/articles/news/6221482/billboard-cover-ariana-grande-on-fame-freddy-krueger-and-her-freaky-past |title=''Billboard'' Cover: Ariana Grande on Fame, Freddy Krueger and Her Freaky Past |magazine=[[Billboard (magazine)|Billboard]] |date=August 15, 2014}}</ref> She has been following a [[vegan]] diet since 2013,<ref>{{cite news |last=Nied |first=Jennifer |date=August 16, 2020 |title=Ariana Grande Sticks To A Vegan Diet And Walks 12,000 Steps A Day |url=https://www.womenshealthmag.com/food/a33472196/ariana-grande-diet/ |work=Women's Health |access-date=August 21, 2022}}</ref> though fans questioned in 2019 whether she still was, after working with [[Starbucks]] to create a special edition of one of her favorite drinks which was revealed to contain eggs. Her nutritionist, Harley Pasternak, told the magazine [[Glamour (magazine)|''Glamour'']] that Grande is still following the diet, but that he has gotten her to "feel OK about indulging and celebrating sometimes".<ref>{{cite news |date=March 11, 2019 |title=Ariana Grande Vegan? '7 Rings' Singer's Diet As Fans Question New Starbucks Drink |url=https://www.capitalfm.com/artists/ariana-grande/vegan-starbucks-7-rings-diet/ |work=Capital |access-date=August 21, 2022}}</ref>
Grande developed [[post-traumatic stress disorder]] (PTSD) and [[Anxiety disorder|anxiety]] after the [[Manchester Arena bombing]]; she nearly pulled out of her performance in the 2018 broadcast ''[[A Very Wicked Halloween]]'' due to anxiety.<ref>{{cite web |last=Sheridan |first=Emily |url=https://www.mirror.co.uk/3am/celebrity-news/ariana-grande-reveals-shes-suffering-13429859 |title=Ariana Grande reveals she's suffering from anxiety after 'split' from Pete Davidson |work=[[Daily Mirror|Mirror]] |date=October 17, 2018}}</ref> Grande has also said she has been in therapy for over a decade, having first seen a mental health professional shortly after her parents' divorce.<ref>{{cite web |last=Weiner |first=Zoë |url=https://www.self.com/story/ariana-grande-therapy-anxiety |title=Ariana Grande Reveals She's Been in Therapy for Over a Decade: 'It's Work' |work=Self |date=July 11, 2018}}</ref>
Grande was raised [[Catholic]], but left the church during the pontificate of [[Benedict XVI]] (circa 2013),<ref>{{cite web |title=Singer Ariana Grande Abandons Catholic Beliefs |url=http://www.cathnewsusa.com/2013/11/singer-ariana-grande-abandons-catholic-beliefs/ |website=CathNewsUSA |access-date=February 9, 2014 |date=November 20, 2013 |archive-date=August 26, 2019 |archive-url=https://web.archive.org/web/20190826085614/http://cathnewsusa.com/2013/11/singer-ariana-grande-abandons-catholic-beliefs/ }}</ref> opposing its [[Catholic Church and homosexuality|stance on homosexuality]]<ref name="DailyNews1"/> and stating that her half-brother Frankie is gay.<ref name="brenna">{{cite web |last=Ehrlich |first=Brenna |url=http://www.mtv.com/news/1972089/ariana-grande-questions-religion |title=Ariana Grande Reveals Love for Gay Brother Frankie Made Her Question Catholic Faith |publisher=[[MTV]] |date=October 22, 2014 |access-date=May 3, 2016 |archive-url=https://web.archive.org/web/20220209002618/http://www.mtv.com/news/1972089/ariana-grande-questions-religion/ |archive-date=February 9, 2022}}</ref> Grande said that she and Frankie later visited a [[Kabbalah Centre]] and that they both "really had a connection with it".<ref name="CoolDiva"/><ref name="brenna"/> Several of her songs, such as "Break Your Heart Right Back", are supportive of [[LGBT rights]].<ref>{{cite web |author-last1=Peeples |author-first1=Jason |url=http://www.advocate.com/arts-entertainment/music/2014/08/16/ariana-grande-says-recording-song-about-gay-affair-was-very-fun |title=Ariana Grande Says Recording Song About Gay Affair Was 'Very Fun' |magazine=[[The Advocate (LGBT magazine)|The Advocate]] |date=August 16, 2014}}</ref> She has also been labeled "an advocate for a [[sex-positive]] attitude".<ref>{{cite magazine |last=Bruner |first=Raisa |date=February 27, 2017 |title=Watch Ariana Grande's Steamy, Diverse and Sex-Positive Video for 'Everyday' |url=https://time.com/4684270/ariana-grande-future-everyday-video/ |magazine=[[Time (magazine)|Time]] |access-date=January 3, 2021 |archive-date=January 15, 2021 |archive-url=https://web.archive.org/web/20210115214102/https://time.com/4684270/ariana-grande-future-everyday-video/ }}</ref>
===Politics===
In November 2019, Grande endorsed [[Bernie Sanders]]'s [[Bernie Sanders 2020 presidential campaign|second presidential bid]].<ref>{{cite magazine |date=November 20, 2019 |title=Ariana Grande Breaks Free From Capitalism, Endorses Bernie Sanders |url=https://www.rollingstone.com/music/music-news/ariana-grande-bernie-sanders-915571/ |access-date=April 24, 2022 |magazine=Rolling Stone}}</ref> She endorsed [[Joe Biden]] for the [[2020 United States presidential election|2020 presidential election]],<ref>{{Cite web |date=October 28, 2020 |title=Ariana Grande officially endorses Joe Biden in new Instagram post |url=https://www.thenews.com.pk/latest/736920-ariana-grande-officially-endorses-joe-biden-in-new-instagram-post |access-date=June 2, 2024 |website=[[The News International]]}}</ref> and [[Kamala Harris]] for the [[2024 United States presidential election|2024 presidential election]].<ref>{{Cite magazine |last=Dailey |first=Hannah |date=September 17, 2024 |title=All the Musicians Supporting Kamala Harris in the 2024 Presidential Election |url=https://www.billboard.com/lists/musicians-endorsing-kamala-harris-president-2024/ariana-grande-17/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
In June 2025, amid [[U.S. Immigration and Customs Enforcement|ICE]] enforcement operations in [[Los Angeles]], Grande wrote on Instagram that she was "deeply upset about these violent deportations" and that "LA simply wouldn't exist without immigrants", sharing [[American Civil Liberties Union|ACLU]] resources on immigrant rights.<ref name="rodrigo-ice-ticker">{{cite web |last=Stubberud |first=Casper |date=November 17, 2025 |title=Olivia Rodrigo denounces new ICE app in Instagram comment |url=https://theticker.org/17552/arts/arts-amp-style/olivia-rodrigo-denounces-new-ice-app-in-instagram-comment/ |work=The Ticker}}</ref> In January 2026, Grande promoted a nationwide protest against ICE on her Instagram Story, urging followers to participate in the "ICE Out Nationwide Shutdown" on January 30.<ref name="yahoo-grande-ice">{{cite web |date=January 29, 2026 |title=Ariana Grande Continues Political Stance Against ICE With Big Endorsement |url=https://www.yahoo.com/entertainment/music/articles/ariana-grande-continues-political-stance-231516608.html |work=Yahoo! Entertainment}}</ref> At the [[83rd Golden Globe Awards]] on January 11, 2026, Grande wore an "ICE Out" pin on her [[Vivienne Westwood]] dress, part of a coordinated campaign in response to the [[Killing of Renee Nicole Good|fatal shooting of Renee Good]] by an ICE agent in [[Minneapolis]].<ref name="complex-globes">{{cite web |last=Cowen |first=Trace William |date=January 12, 2026 |title=Ariana Grande Wears 'ICE Out' Pin at 2026 Golden Globes |url=https://www.complex.com/pop-culture/a/tracewilliamcowen/ariana-grande-ice-out-pin-golden-globes-2026 |work=[[Complex (magazine)|Complex]]}}</ref><ref name="npr-globes">{{cite web |date=January 12, 2026 |title=Celebrities wear pins protesting ICE at the Golden Globes |url=https://www.npr.org/2026/01/12/g-s1-105659/celebrities-pins-protesting-ice-golden-globes |work=[[NPR]]}}</ref>
=== Relationships ===
<!--PER PREVIOUS Talk page discussions (see Archive), please DO NOT ADD boyfriends until Ariana has had a serious dating relationship with them for more than one continuous year if they have an article or two continuous years if they don't. -->
Grande's personal relationships have been widely scrutinized by the public.<ref>{{Cite magazine |last=Rose |first=Lacey |date=February 11, 2025 |title=The Second Coming of Ariana Grande |url=https://www.hollywoodreporter.com/movies/movie-features/ariana-grande-wicked-oscars-music-love-1236132418/ |access-date=February 18, 2025 |magazine=The Hollywood Reporter}}</ref> Some of her former lovers were mentioned by name in the song "[[Thank U, Next (song)|Thank U, Next]]".<ref>{{cite web |last=Grossman |first=Lena |date=November 4, 2018 |title=Ariana Grande Sings About Pete Davidson and Mac Miller in New Song "Thank u, next" |url=https://www.eonline.com/au/news/983536/ariana-grande-sings-about-pete-davidson-and-mac-miller-in-new-song-thank-u-next |access-date=November 1, 2024 |agency=[[E!]]}}</ref> She dated her ''[[13 (musical)|13]]'' co-star [[Graham Phillips (actor)|Graham Phillips]] for three years.<ref>{{cite magazine |last=Zauzmer |first=Emily |url=http://www.people.com/article/graham-phillips-defends-ariana-grande-donut-scandal |title=Graham Phillips Defends Ex-Girlfriend Ariana Grande After Doughnut Controversy: 'It Doesn't Speak to Her Character at All' |magazine=[[People (magazine)|People]] |date=July 22, 2015 |access-date=January 22, 2018 |archive-date=May 18, 2016 |archive-url=https://web.archive.org/web/20160518201143/http://www.people.com/article/graham-phillips-defends-ariana-grande-donut-scandal }}</ref><ref>{{cite web |last=Cabrera |first=Daniela |url=https://www.bustle.com/articles/180516-who-has-ariana-grande-dated-the-singer-has-a-thing-for-guys-in-the-music-biz |title=Who Has Ariana Grande Dated? The Singer Has a Thing for Guys in the Music Biz |magazine=[[Bustle.com]] |date=August 26, 2016 |access-date=January 22, 2018}}</ref><ref>{{Cite web |url=http://www.californianeutrals.org/PDF/Layn-Phillips-2012.pdf |title=Curriculum Vitae: Judge Layn R. Phillips |website=California Academy of Distinguished Neutrals |access-date=July 25, 2013 |archive-url=https://web.archive.org/web/20141014035929/http://www.californianeutrals.org/PDF/Layn-Phillips-2012.pdf |archive-date=October 14, 2014 }} {{Title missing|date=September 2025}}</ref> From August 2012 to August 2014, Grande was in an [[on-again, off-again relationship]] with Australian YouTuber [[Jai Brooks]].<ref>{{cite web |url=https://sports.yahoo.com/blogs/celeb-news/ariana-grande-breaks-up-with-jai-brooks-following-her-grandfather-s-death-132619459.html |title=Ariana Grande Breaks Up With Jai Brooks Following Her Grandfather's Death |website=[[Yahoo!]] |date=August 5, 2014 |access-date=December 4, 2023}}</ref> She briefly dated English singer [[Nathan Sykes]] during their separation, and then dated rapper [[Big Sean]] for eight months.<ref>{{Cite magazine |date=March 8, 2024 |title=Quick Refresher on Ariana Grande's Full Dating History Over the Years |url=https://www.cosmopolitan.com/entertainment/celebs/a44577267/ariana-grande-dating-relationship-history/ |access-date=April 3, 2024 |magazine=Cosmopolitan}}</ref> Grande was in a year-long relationship with Ricky Alvarez, who was one of her backup dancers on [[the Honeymoon Tour]].<ref>{{Cite magazine |last=Cerón |first=Ella |date=July 26, 2016 |title=Ariana Grande Breaks Up With Boyfriend Ricky Alvarez, According to Sources |url=https://www.teenvogue.com/story/ariana-grande-ricky-alvarez-breakup/ |access-date=November 1, 2024 |magazine=[[Teen Vogue]]}}</ref><ref>{{Cite web |last=Fisher |first=Kendall |date=July 27, 2016 |title=Ariana Grande Breaks Up With Ricky Alvarez |url=https://www.eonline.com/news/782890/ariana-grande-breaks-up-with-ricky-alvarez/ |access-date=November 1, 2024 |website=[[E! Online]]}}</ref>
After recording "[[The Way (Ariana Grande song)|The Way]]" in 2012, Grande began dating rapper [[Mac Miller]] in 2016.<ref>{{cite magazine |last=Garcia |first=Patricia |url=http://www.vogue.com/13484221/mac-miller-the-divine-feminine-album |title=Mac Miller on Love, Ariana Grande, and the Last Thing That Made Him Cry |magazine=[[Vogue (magazine)|Vogue]] |date=September 27, 2016 |access-date=May 25, 2017 |archive-date=January 3, 2017 |archive-url=https://web.archive.org/web/20170103170159/http://www.vogue.com/13484221/mac-miller-the-divine-feminine-album/ }}</ref><ref>{{cite web |last=Avila |first=Theresa |date=September 7, 2016 |title=Ariana Grande Confirms Her Relationship With Mac Miller by Literally Wrapping Her Legs Around Him |url=https://nymag.com/thecut/2016/09/ariana-grande-wraps-her-legs-around-mac-miller-in-photo.html |access-date=October 31, 2024 |work=[[The Cut (publication)|The Cut]]}}</ref> She was prominently featured on his fourth album ''[[The Divine Feminine]]'' (2016), including on its third single "[[My Favorite Part]]".<ref>{{Cite web |last=Yoo |first=Noah |date=September 9, 2016 |title=Listen to Mac Miller and Ariana Grande's New Song "My Favorite Part" |url=https://pitchfork.com/news/68142-listen-to-mac-miller-and-ariana-grandes-new-song-my-favorite-part/ |access-date=May 8, 2024 |website=[[Pitchfork (website)|Pitchfork]]}}</ref><ref>{{Cite magazine |last=Quinn |first=Dave |date=May 24, 2018 |title=Ariana Grande Says Mac Miller's Explicit Song 'Cinderella' Is About Her and Twitter Is Shook |url=https://people.com/music/ariana-grande-mac-miller-cinderella-about-her-twitter-shook/ |access-date=March 19, 2024 |magazine=[[People (magazine)|People]]}}</ref> By May 2018, their relationship had ended and Grande entered a whirlwind romance with comedian [[Pete Davidson]].<ref name="mac001">{{cite magazine |last=Penrose |first=Nerisha |url=https://www.billboard.com/music/rb-hip-hop/ariana-grande-mac-miller-relationship-timeline-8457806/ |title=A Timeline of Ariana Grande & Mac Miller's Relationship |magazine=[[Billboard (magazine)|Billboard]] |date=May 25, 2018}}; and {{cite magazine |last=Jackson |first=Dory |url=http://www.newsweek.com/ariana-grande-mac-miller-break-reveal-920158 |title=Why Did Ariana Grande and Mac Miller Break Up? Singer Shares Update on Instagram Story Post |magazine=[[Newsweek]] |date=May 10, 2018}}</ref> They got engaged in June, after a few weeks of dating, while a [[Pete Davidson (song)|song titled after and inspired by Davidson]] was featured on ''Sweetener''.<ref>{{cite news |last=Mallenbaum |first=Carly |title=Pete Davidson confirms Ariana Grande engagement: 'I feel like I won a contest' |url=https://www.usatoday.com/story/life/entertainthis/2018/06/11/ariana-grande-pete-davidson-engaged/693041002 |newspaper=[[USA Today]] |date=June 21, 2018 |access-date=June 21, 2018}}</ref> That September, Miller [[Mac Miller#Death|died from an accidental drug overdose]]; Grande expressed grief over his death on social media and called him her "dearest friend".<ref>{{cite news |url=https://www.usatoday.com/story/life/music/2018/09/14/ariana-grande-posted-video-ex-boyfriend-mac-miller-friday-another-touching-remembrance-26-year-old-r/1306393002/ |title=Ariana Grande in tribute post to Mac Miller: 'You were my dearest friend' |first=Julia |last=Thompson |date=September 14, 2018 |newspaper=[[USA Today]]}}</ref> She and Davidson called off their engagement and ended their relationship the following month.<ref>{{Cite web |last=Ahlgrim |first=Callie |title=Here's a complete timeline of Ariana Grande and Pete Davidson's whirlwind engagement and sudden split |url=https://www.businessinsider.com/ariana-grande-pete-davidson-relationship-timeline-2018-6 |access-date=April 1, 2024 |website=Business Insider}}</ref>
Grande began dating real estate agent Dalton Gomez in January 2020.<ref>{{cite web |last1=Seemayer |first1=Zach |last2=Schillaci |first2=Sophie |title=Ariana Grande and Dalton Gomez Split After 2 Years of Marriage: A Timeline of Their Whirlwind Romance |website=Entertainment Tonight |date=July 17, 2023 |url=https://www.etonline.com/ariana-grande-and-dalton-gomez-split-after-2-years-of-marriage-a-timeline-of-their-whirlwind |access-date=July 19, 2025}}</ref> Their relationship, while mostly private, was made public in May 2020, in the music video of her and [[Justin Bieber]]'s charity single "[[Stuck with U]]".<ref>{{cite web |last=Bailey |first=Alyssa |date=May 8, 2020 |title=Ariana Grande Confirms She's Dating Dalton Gomez With a Kiss in Her 'Stuck With U' Music Video |url=https://www.elle.com/culture/celebrities/a32414537/ariana-grande-dalton-gomez-kiss-stuck-with-u-music-video/ |access-date=May 19, 2021 |website=[[Elle (magazine)|Elle]]}}</ref> Grande announced their engagement on December 20, 2020, after 11 months of dating.<ref>{{cite magazine |url=https://www.hollywoodreporter.com/news/ariana-grande-engaged-to-real-estate-agent-dalton-gomez |title=Ariana Grande Engaged to Real Estate Agent Dalton Gomez |magazine=[[The Hollywood Reporter]] |date=December 20, 2020 |last=Perez |first=Lexy}}</ref> On May 15, 2021, they married in a private ceremony at her home in [[Montecito, California]].<ref>{{cite magazine |last=Macon |first=Alexandra |title=Inside Ariana Grande's Intimate At-Home Wedding |url=https://www.vogue.com/slideshow/ariana-grande-at-home-wedding-photos |access-date=May 26, 2021 |magazine=[[Vogue (magazine)|Vogue]]}}</ref> Her wedding pictures became [[List of most-liked Instagram posts|the second-most-liked Instagram post]] and most-liked Instagram post featuring pictures of people at the time, with over 25 million likes.<ref>{{cite news |title=Ariana Grande's wedding photo become most-liked Instagram post that features people |url=https://www.today.com/video/ariana-grande-s-wedding-photo-become-most-liked-instagram-post-that-features-people-113975365505 |access-date=May 29, 2021 |work=[[Today (American TV program)|Today]] |date=May 29, 2021}}</ref><ref>{{cite news |last=Longmire |first=Becca |date=May 28, 2021 |title=Ariana Grande Breaks Instagram Record After Sharing Stunning Photos From Wedding To Dalton Gomez |url=https://etcanada.com/news/785525/ariana-grande-breaks-instagram-record-after-sharing-stunning-photos-from-wedding-to-dalton-gomez/ |archive-url=https://web.archive.org/web/20210528141032/https://etcanada.com/news/785525/ariana-grande-breaks-instagram-record-after-sharing-stunning-photos-from-wedding-to-dalton-gomez/ |archive-date=May 28, 2021 |access-date=May 29, 2021 |work=[[Entertainment Tonight Canada]] }} {{Webarchive|url=https://web.archive.org/web/20210528141032/https://etcanada.com/news/785525/ariana-grande-breaks-instagram-record-after-sharing-stunning-photos-from-wedding-to-dalton-gomez/ |date=May 28, 2021 }}</ref> Grande and Gomez separated on February 20, 2023, and simultaneously filed for divorce that September due to "[[irreconcilable differences#United States|irreconcilable differences]]".<ref>{{Cite web |last1=Calvario |first1=Liz |last2=Dasrath |first2=Diana |date=October 7, 2023 |title=Ariana Grande and Dalton Gomez settle divorce after two years of marriage |url=https://www.today.com/popculture/news/ariana-grande-dalton-gomez-relationship-timeline-divorce-rcna108116 |access-date=March 19, 2024 |work=Today}}</ref> They agreed on a [[divorce settlement]] in October, which was finalized in March 2024.<ref>{{cite magazine |url=https://people.com/ariana-grande-and-dalton-gomez-settle-divorce-8348933 |title=Ariana Grande and Dalton Gomez Settle Divorce Weeks After Filing |first=Angel |last=Saunders |date=October 6, 2023 |access-date=October 6, 2023 |magazine=[[People (magazine)|People]]}}</ref><ref name="daltongomez_divorce">{{Cite news |date=March 19, 2024 |title=Ariana Grande and Dalton Gomez are officially divorced |url=https://apnews.com/article/ariana-grande-dalton-gomez-divorce-f4393ab6b6c203f11d3fa4534978d6a8 |access-date=March 19, 2024 |work=[[Associated Press News]]}}</ref> As of July 2023, Grande is in a relationship with her ''Wicked'' co-star [[Ethan Slater]].<!-- Do not change to "began dating in July" without a reliable source; the source cited with this statement does not say so--><ref>{{Cite magazine |last=Gibson |first=Kelsie |date=November 5, 2024 |title=Ariana Grande and Ethan Slater's Relationship Timeline |url=https://people.com/ariana-grande-and-ethan-slater-relationship-timeline-7974917 |access-date=December 28, 2024 |magazine=[[People (magazine)|People]]}}</ref>
== Filmography ==
{{Main|Ariana Grande videography}}
{{hatnote|This section lists select works only. Refer to the main article for further information.}}
{{col-begin}}
{{col-2}}
'''Films and television'''
* ''[[Victorious]]'' (2010–2013)
* ''[[Sam & Cat]]'' (2013–2014)
* ''[[Swindle (2013 film)|Swindle]]'' (2013)
* ''[[Metegol|Underdogs]]'' (2016)
* ''[[Hairspray Live!]]'' (2016)
* ''[[Don't Look Up]]'' (2021)
* ''[[Wicked (2024 film)|Wicked]]'' (2024){{notetag|name="agb"|Credited as Ariana Grande-Butera.}}
* ''[[Brighter Days Ahead]]'' (2025){{notetag|Short film; also co-writer, co-director and executive producer.}}
* ''[[Wicked: For Good]]'' (2025){{notetag|name="agb"}}
{{col-2}}
'''Documentaries and concert specials'''
* ''[[One Love Manchester]]'' (2017)
* ''[[Ariana Grande at the BBC]]'' (2018)
* ''[[Ariana Grande: Dangerous Woman Diaries]]'' (2018)
* ''[[Ariana Grande: Excuse Me, I Love You]]'' (2020)
{{col-end}}
== Discography ==
{{Main|Ariana Grande discography|List of songs recorded by Ariana Grande}}
* ''[[Yours Truly (Ariana Grande album)|Yours Truly]]'' (2013)
* ''[[My Everything (Ariana Grande album)|My Everything]]'' (2014)
* ''[[Dangerous Woman]]'' (2016)
* ''[[Sweetener (album)|Sweetener]]'' (2018)
* ''[[Thank U, Next]]'' (2019)
* ''[[Positions (album)|Positions]]'' (2020)
* ''[[Eternal Sunshine (album)|Eternal Sunshine]]'' (2024)
== Live performances and tours ==
{{Main|List of Ariana Grande live performances}}
=== Musical theater ===
{| class="wikitable"
!Year
!Production
!Role
!Director
!Venue
!Notes
!{{Reference column heading}}
|-
|2008
| rowspan="2" |''[[13 (musical)|13]]''
| rowspan="2" |Charlotte
| rowspan="2" |[[Jeremy Sams]]
|[[Norma Terris Theatre]], [[Chester, Connecticut|Chester]]
|
|<ref>Jones, Kenneth. [http://www.playbill.com/news/article/117016.html "Teen Time! Cast Announced for Goodspeed Run of '13' Musical"] {{Webarchive|url=https://web.archive.org/web/20080502124634/http://www.playbill.com/news/article/117016.html|date=May 2, 2008}}, playbill.com, April 22, 2008</ref>
|-
|2008–2009
|[[Bernard B. Jacobs Theatre]], [[Manhattan]]
|Original [[Broadway theatre|Broadway]] Cast
|<ref>Gans, Andrew and Kenneth Jones. [http://www.playbill.com/news/article/123569.html "New Musical 13 to Close on Broadway in January 2009"] {{Webarchive|url=https://web.archive.org/web/20081216011558/http://www.playbill.com/news/article/123569.html|date=December 16, 2008}}, playbill.com, November 21, 2008</ref>
|-
|2012
|''[[A Snow White Christmas (musical)|A Snow White Christmas]]''
|[[Snow White]]
|[[Bonnie Lythgoe]]
|[[Pasadena Playhouse]]
|
|<ref>{{cite web |date=December 30, 2012 |title=A Snow White Christmas |url=http://www.pasadenaplayhouse.org/box-office/mainstage/a-snow-white-christmas.html |archive-url=https://web.archive.org/web/20120914035847/http://www.pasadenaplayhouse.org/box-office/mainstage/a-snow-white-christmas.html |archive-date=September 14, 2012 |access-date=May 11, 2013 |publisher=The Pasadena Playhouse}}</ref><ref>{{Cite web |last=Garcia |first=Dawn |date=December 14, 2012 |title=A Snow White Christmas |url=https://atodmagazine.com/2012/12/14/a-snow-white-christmas/ |access-date=April 15, 2024 |website=atodmagazine.com |archive-date=December 9, 2025 |archive-url=https://web.archive.org/web/20251209010006/https://atodmagazine.com/2012/12/14/a-snow-white-christmas/ |url-status=dead }}</ref>
|-
|2027
|[[Sunday in the Park with George|''Sunday in the Park with George'']]
|Dot / Marie
|[[Marianne Elliott]]
|[[Barbican Centre|Barbican Theater]]
|
|<ref name=":4" />
|}
=== Tours ===
==== Headlining ====
* [[The Listening Sessions]] (2013)
* [[The Honeymoon Tour]] (2015)
* [[Dangerous Woman Tour]] (2017)
* [[Sweetener World Tour]] (2019)
* [[The Eternal Sunshine Tour]] (2026)
==== Promotional ====
* [[The Sweetener Sessions]] (2018)
==== Opening act ====
* [[Justin Bieber]] – [[Believe Tour]] (2013)
== See also ==
{{Portal|Biography|Pop music|United States}}
* [[List of American Grammy Award winners and nominees]]
* [[List of artists who have achieved simultaneous UK and U.S. number-one hits]]
* [[List of artists who reached number one in the United States]]
* [[List of Billboard Social 50 number-one artists|List of ''Billboard'' Social 50 number-one artists]]
* [[Honorific nicknames in popular music]]
* [[UK singles chart records and statistics]]
== Notes ==
{{reflist|group=note}}
== References ==
{{Reflist}}
{{notelist}}
== External links ==
{{sister project links|d=Q151892|q=Ariana Grande|c=category:Ariana Grande|n=no|b=no|v=no|voy=no|m=no|mw=no|wikt=no|s=no|species=no}}
* {{#invoke:Official website|main}}
* {{AllMusic}}
* {{Discogs artist}}
* {{IMDb name}}
* {{MusicBrainz artist}}
* {{IBDB name}}
* {{playbill person}}
{{Ariana Grande|state=expanded}}
{{Ariana Grande songs}}
{{Navboxes
|title = [[List of awards and nominations received by Ariana Grande|Awards for Ariana Grande]]
|list =
{{American Music Award for Artist of the Year}}
{{American Music Award for Favorite Pop/Rock Female Artist}}
{{American Music Award for New Artist of the Year}}
{{Astra Film Award for Best Supporting Actress}}
{{Brit International Female}}
{{Grammy Award for Best Pop Duo/Group Performance}}
{{Grammy Award for Best Pop Vocal Album}}
{{Japan Gold Disc Award for Artist of the Year}}
{{Nickelodeon Kids' Choice Award for Favorite Female Singer}}
{{Nickelodeon Kids' Choice Award for Favorite Female TV Star}}
{{Nickelodeon Kids' Choice Award for Favorite Movie Actress}}
{{Nickelodeon Kids' Choice Award for Favorite Song}}
{{MTV Europe Music Award for Best Female}}
{{MTV Europe Music Award for Best Pop}}
{{MTV Europe Music Award for Best US Act}}
{{MTV Video Music Award for Video of the Year}}
{{MTV Video Music Award for Song of the Year}}
{{MTV Video Music Award for Artist of the Year}}
{{MTV Video Music Award for Best Collaboration}}
{{MTV Video Music Award for Best Long Form Video}}
{{MTV Video Music Award for Best Pop Video}}
{{MTV Video Music Award for Song of Summer}}
{{People's Choice Award for Favorite Female Artist}}
{{San Diego Film Critics Society Award for Best Supporting Actress}}
{{Satellite Award Best Supporting Actress Motion Picture}}
{{Teen Choice Award for Choice Music – Female Artist}}
}}
{{Authority control}}
{{DEFAULTSORT:Grande, Ariana}}
[[Category:Ariana Grande| ]]
[[Category:1993 births]]
[[Category:Living people]]
[[Category:21st-century American actresses]]
[[Category:21st-century American singer-songwriters]]
[[Category:21st-century American women singers]]
[[Category:21st-century people from Florida]]
[[Category:American actors with disabilities]]
[[Category:American activists for Palestinian solidarity]]
[[Category:American contemporary R&B singers]]
[[Category:American former Christians]]
[[Category:LGBTQ rights activists from Florida]]
[[Category:American musical theatre actresses]]
[[Category:American sopranos]]
[[Category:American television actresses]]
[[Category:American women pop singers]]
[[Category:American women singer-songwriters]]
[[Category:Anti-bullying activists]]
[[Category:Brit Award winners]]
[[Category:Kabbalists]]
[[Category:Crime witnesses]]
[[Category:American dance-pop musicians]]
[[Category:American feminist musicians]]
[[Category:Grammy Award winners]]
[[Category:Judges in American reality television series]]
[[Category:MTV Europe Music Award winners]]
[[Category:Music Awards Japan winners]]
[[Category:Nickelodeon people]]
[[Category:Actresses from Boca Raton, Florida]]
[[Category:People with post-traumatic stress disorder]]
[[Category:Republic Records artists]]
[[Category:Singer-songwriters from Florida]]
[[Category:Singers with a four-octave vocal range]]
[[Category:Universal Music Group artists]]
[[Category:American women in electronic music]]
[[Category:American musicians with disabilities]]
[[Category:Singers with disabilities]]
[[Category:Survivors of terrorist attacks]]
[[Category:American women company founders]]
[[Category:American people of Italian descent]]
97iskx95r5zsqfubnbjnzau7p86i3ls
750422
750421
2026-07-07T17:38:54Z
Enbi
72574
750422
wikitext
text/x-wiki
{{Use American English|date=January 2024}}
{{Use mdy dates|date=February 2026}}
{{Infobox person
| name = Ariana Grande
| image = Ariana Grande promoting Wicked (2024).jpg
| alt = Ariana Grande in 2024, wearing pink suit while promoting the film Wicked
| caption = Grande in 2024
| birth_name = <!-- Do not delete "Butera". This is for her birth name, not her stage name. --> Ariana Grande-Butera
| birth_date = {{Birth date and age|1993|6|26}}
| birth_place = [[Boca Raton, Florida]], U.S.
| occupation = {{flatlist|
* Singer
* songwriter
* actress
}}
| organization = [[R.E.M. Beauty]]
| years_active = 2008–present
| spouse = {{marriage|Dalton Gomez|2021|2024|end=divorced}}
| works = {{hlist|[[Ariana Grande discography|Discography]]|[[List of songs recorded by Ariana Grande|songs recorded]]|[[Ariana Grande videography|videography]]|[[List of Ariana Grande live performances|performances]]}}
| relatives = [[Frankie Grande]] (half-brother)
| awards = [[List of awards and nominations received by Ariana Grande|Full list]]
| signature = Ariana Grande autograph.svg
| module = {{Infobox musical artist|embed=yes
| instruments = Vocals
| genre = {{hlist|[[Pop music|Pop]]|[[Contemporary R&B|R&B]]}}<!--Reliable sources must classify artist/their overall music as listed genre(s)-->
| label = {{hlist|[[Republic Records|Republic]]}}
}}
| website = {{URL|https://arianagrande.com/}}
}
'''Ariana Grande-Butera'''<!-- Do NOT delete "Butera" here. This is for her full name, not her stage name. Please provide a reliable, independent source when changing her name. --> ({{IPAc-en|ˌ|ɑr|i|ˈ|ɑː|n|ə|_|ˈ|ɡ|r|ɑː|n|d|ei|_|b|j|ʊ|ˈ|t|ɛ|ə|r|ə|audio=LL-Q1860 (eng)-Flame, not lame-Ariana Grande.wav}} {{Respell|AR|ee|AH|nə|_|GRAHN|day|_|byuu|TAIR|ə}};{{notetag|Grande pronounces her surname with the final syllable being similar to the pronunciation for "day". She explained in an interview for [[Beats 1]] that the pronunciation with the final syllable like "dee" was used by her grandfather.<ref>{{cite web |url=https://music.apple.com/us/station/the-ariana-grande-interview/ra.1430351850 |title=The Ariana Grande Interview |work=Beats 1 |via=Apple Music |last=Darden |first=Ebro |access-date=June 1, 2022 |archive-date=June 1, 2022 |archive-url=https://web.archive.org/web/20220601220004/https://music.apple.com/us/station/the-ariana-grande-interview/ra.1430351850 |url-status=live}}</ref>}} born June 26, 1993) is an American singer, songwriter, and actress.<!--NOTE: Only include occupation(s) that reliable sources consider notable/integral to artist's career --> Known for her four-octave [[vocal range]], which extends into the [[whistle register]], she is regarded as an influential figure in [[popular music]]. Publications such as ''[[Rolling Stone]]'' and [[Billboard (magazine)|''Billboard'']] have deemed Grande one of the greatest artists in history, while ''[[Time (magazine)|Time]]'' included her on its list of the world's [[Time 100|100 most influential people]] in 2016 and 2019.
Grande's career began as a teenager in the [[Broadway theatre|Broadway]] musical ''[[13 (musical)|13]]'' (2008) before she gained prominence as [[Cat Valentine (Victorious)|Cat Valentine]] in the [[Nickelodeon]] television series ''[[Victorious]]'' (2010–2013) and its spin-off ''[[Sam & Cat]]'' (2013–2014). After signing with [[Republic Records]], she released her debut studio album, ''[[Yours Truly (Ariana Grande album)|Yours Truly]]'' (2013), a [[retro]]-inspired [[pop music|pop]] and [[Contemporary R&B|R&B]] record that debuted atop the [[Billboard 200|''Billboard'' 200]]. She incorporated elements of [[electronic music|electronic]] on her next two albums, ''[[My Everything (Ariana Grande album)|My Everything]]'' (2014) and ''[[Dangerous Woman]]'' (2016), which both achieved international success, spawning the singles "[[Problem (Ariana Grande song)|Problem]]", "[[Break Free (song)|Break Free]]", "[[Bang Bang (Jessie J, Ariana Grande and Nicki Minaj song)|Bang Bang]]", "[[One Last Time (Ariana Grande song)|One Last Time]]", "[[Into You (Ariana Grande song)|Into You]]", and "[[Side to Side]]".
Personal struggles influenced Grande's albums ''[[Sweetener (album)|Sweetener]]'' (2018) and ''[[Thank U, Next]]'' (2019), both of which delved into [[trap music|trap]]. The latter garnered the US [[Billboard Hot 100|''Billboard'' Hot 100]] number-one singles "[[Thank U, Next (song)|Thank U, Next]]" and "[[7 Rings]]". With the [[Positions (song)|title track]] of her R&B-infused album ''[[Positions (album)|Positions]]'' (2020), as well as the collaborations "[[Stuck with U]]" and "[[Rain on Me (Lady Gaga and Ariana Grande song)|Rain on Me]]", she achieved the [[List of Billboard Hot 100 chart achievements and milestones#Most number-one debuts|most number-one debuts]] in the US. After a musical hiatus, she explored [[dance music|dance]] on ''[[Eternal Sunshine (album)|Eternal Sunshine]]'' (2024), which yielded the US number-one songs "[[Yes, And?]]" and "[[We Can't Be Friends (Wait for Your Love)]]". She returned to acting with the political satire ''[[Don't Look Up]]'' (2021) and portrayed [[Glinda]] in the fantasy musical film ''[[Wicked (2024 film)|Wicked]]'' (2024), which earned her an [[Academy Award]] nomination, as well as its sequel ''[[Wicked: For Good]]'' (2025).
Grande is one of the [[List of best-selling music artists#80 million to 99 million records|best-selling music artists of all time]], with estimated sales of over 90 million records. The [[Forbes list of the world's highest-paid musicians#Female|highest-paid female musician]] in 2020, [[List of awards and nominations received by Ariana Grande|her accolades]] include three [[Grammy Awards]], a [[Brit Award]], two [[Billboard Music Awards|''Billboard'' Music Awards]], three [[American Music Awards]], forty ''[[Guinness World Records]]'', and thirteen [[MTV Video Music Awards]]. Six of Grande's albums have reached number one on the ''Billboard'' 200, while nine of her songs have topped the ''Billboard'' Hot 100. Outside of music and acting, she has worked with many charitable organizations and advocates for [[animal rights]], [[mental health]], and [[Gender equality|gender]], [[Racial equality|racial]], and [[LGBT rights in the United States|LGBT equality]]. Her business ventures include the cosmetics brand [[R.E.M. Beauty]] and a fragrance line that has earned over $1 billion in global retail sales. She has a large social media following, being the [[List of most-followed Instagram accounts|sixth-most-followed individual]] on [[Instagram]].
{{TOC limit|4}}
== Early life ==
Ariana Grande-Butera was born on June 26, 1993, in [[Boca Raton, Florida]].<ref name="AllMusicBio">{{cite web |url=https://www.allmusic.com/artist/ariana-grande-mn0002264745/biography |title=Ariana Grande Biography |author-link=Stephen Thomas Erlewine |first=Stephen Thomas |last=Erlewine |publisher=[[AllMusic]] |access-date=August 28, 2014 |archive-date=May 2, 2019 |archive-url=https://web.archive.org/web/20190502120402/https://www.allmusic.com/artist/ariana-grande-mn0002264745/biography |url-status=live}}{{bsn|date=March 2026}}</ref> She is the daughter of Joan Grande, the [[Brooklyn]]-born CEO of Hose-McCann Communications, a manufacturer of marine communications equipment owned by the Grande family since 1964,<ref name=CoolDiva>{{cite news |last=McLean |first=Craig |date=October 17, 2014 |title=Ariana Grande: 'If you want to call me a diva I'll say: cool' |url=https://www.telegraph.co.uk/culture/music/11159510/Ariana-Grande-interview-Big-Sean-diva.html |url-status=live |archive-url=https://web.archive.org/web/20141208054853/https://www.telegraph.co.uk/culture/music/11159510/Ariana-Grande-interview-Big-Sean-diva.html |archive-date=December 8, 2014 |access-date=October 20, 2015 |newspaper=[[The Daily Telegraph]]}}</ref> and Edward Butera, a graphic design firm owner in Boca Raton.<ref name="DailyNews1">{{cite news |last=Farber |first=Jim |title=Ariana Grande owes her stardom to singing, not sex appeal |url=http://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-not-sex-appeal-article-1.1902829 |newspaper=[[New York Daily News]] |date=August 14, 2014 |access-date=February 7, 2015 |archive-url=https://web.archive.org/web/20160130010137/http://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-not-sex-appeal-article-1.1902829 |archive-date=January 30, 2016 |url-status=live}}</ref><ref name="BillboardFreaky">{{cite magazine |last=Goodman |first=Lizzy |title=''Billboard'' Cover: Ariana Grande on Fame, Freddy Krueger and Her Freaky Past |url=https://www.billboard.com/articles/news/6221482/billboard-cover-ariana-grande-on-fame-freddy-krueger-and-her-freaky-past |magazine=[[Billboard (magazine)|Billboard]] |date=August 15, 2014 |access-date=September 1, 2014 |archive-url=https://web.archive.org/web/20141206040004/https://www.billboard.com/articles/news/6221482/billboard-cover-ariana-grande-on-fame-freddy-krueger-and-her-freaky-past |archive-date=December 6, 2014 |url-status=live}}</ref> Grande is of Italian<ref name="Savage">{{cite news |last=Savage |first=Mark |url=https://www.bbc.com/news/entertainment-arts-40005064 |title=Ariana Grande: The diva with a heart |publisher=[[BBC]] |date=May 23, 2017 |access-date=October 25, 2017 |archive-url=https://web.archive.org/web/20170524080653/https://www.bbc.com/news/entertainment-arts-40005064 |archive-date=May 24, 2017 |url-status=live}}</ref> descent and has described herself as an Italian American with [[Sicilians|Sicilian]] and [[Abruzzo|Abruzzese]] roots.<ref>{{cite tweet |url=https://mobile.twitter.com/arianagrande/status/40266680152240128 |user=ArianaGrande |number=40266680152240128 |date=February 22, 2011 |last=Grande |first=Ariana |title=I am Italian American, half Sicilian and half Abruzzese xx RT @_mylifestory @ArianaGrande What is your nationality? :) |access-date=November 29, 2018 |archive-url=https://web.archive.org/web/20150724112011/https://twitter.com/ArianaGrande/status/40266680152240128 |archive-date=July 24, 2015 }}</ref> She has an older half-brother, [[Frankie Grande]], who is an entertainer and producer.<ref>{{cite news |last=Gonzales |first=Erica |url=http://www.harpersbazaar.com/celebrity/latest/news/a19403/ariana-grande-reaction-frankie-grade-gay |title=Ariana Grande Had the Perfect Response When Her Brother Came Out |work=[[Harpers Bazaar]] |date=December 14, 2016 |archive-url=https://web.archive.org/web/20161215123806/http://www.harpersbazaar.com/celebrity/latest/news/a19403/ariana-grande-reaction-frankie-grade-gay/ |archive-date=December 15, 2016 |access-date=December 14, 2016 |url-status=live}}</ref> Her family moved from New York to Florida before her birth, and her parents separated when she was eight or nine years old.<ref name="BillboardFreaky"/> Grande had a close relationship with her maternal grandmother, Marjorie Grande.<ref>{{Cite news |title=Ariana Grande had the cutest date at the AMAs: Her Grandma! |url=http://www.people.com/article/ariana-grande-grandmother-nonna-steals-show-at-the-american-music-awards |archive-url=https://web.archive.org/web/20151126043141/http://www.people.com/article/ariana-grande-grandmother-nonna-steals-show-at-the-american-music-awards |archive-date=November 26, 2015 |access-date=November 25, 2015 |work=[[People (magazine)|People]]}}</ref> At age eight, she sang "[[The Star-Spangled Banner]]" at the [[Florida Panthers]]'s home game against the [[Chicago Blackhawks]] on January 16, 2002.<ref>{{cite AV media |url=https://www.youtube.com/watch?v=QEwwhklDbVo |title=Ariana Grande at 8 years old singing National Anthem (via Ariana Grande Official Artist Channel) |via=[[YouTube]] |access-date=October 28, 2021 |date=June 8, 2011 |archive-url=https://web.archive.org/web/20221220120825/https://www.youtube.com/watch?v=QEwwhklDbVo |archive-date=December 20, 2022 |url-status=live}}</ref>
As a young child, Grande performed with the [[Fort Lauderdale]] Children's Theater,<ref>{{cite news |last=Geggis |first=Anne |date=August 31, 2012 |title=America's Tweetheart: Boca-born singer/actress big on Twitter |url=http://articles.sun-sentinel.com/2012-08-31/news/fl-boca-ariana-grande-20120830_1_twitter-nickelodeon-social-media |archive-url=https://web.archive.org/web/20180806182101/http://articles.sun-sentinel.com/2012-08-31/news/fl-boca-ariana-grande-20120830_1_twitter-nickelodeon-social-media |archive-date=August 6, 2018 |access-date=September 13, 2014 |work=[[South Florida Sun-Sentinel]] |location=Florida }} {{Webarchive|url=https://web.archive.org/web/20180806182101/http://articles.sun-sentinel.com/2012-08-31/news/fl-boca-ariana-grande-20120830_1_twitter-nickelodeon-social-media |date=August 6, 2018 }}</ref> playing her first role as the title character in the musical ''[[Annie (musical)|Annie]]''. She also performed in their productions of ''[[Adaptations of The Wizard of Oz|The Wizard of Oz]]'' and ''[[Beauty and the Beast (musical)|Beauty and the Beast]]''.<ref name="Savage"/><ref name="Complex">{{cite magazine |last=Nostro |first=Lauren |title=Who Is Ariana Grande? – Growing Up and Starting to Sing |url=http://www.complex.com/music/2013/08/who-is-ariana-grande/growing-up-and-starting-to-sing |magazine=Complex |access-date=June 11, 2014 |archive-date=July 19, 2019 |archive-url=https://web.archive.org/web/20190719140117/https://www.complex.com/music/2013/08/who-is-ariana-grande/growing-up-and-starting-to-sing |url-status=live}}</ref> At age eight, she performed at a karaoke lounge on a cruise ship and with orchestras such as South Florida's Philharmonic, Florida Sunshine Pops and Symphonic Orchestras.<ref name="AboutGrande">{{cite web |title=About Ariana Grande |url=http://www.mtv.com/artists/ariana-grande/biography/ |archive-url=https://web.archive.org/web/20170216080254/http://www.mtv.com/artists/ariana-grande/biography/ |archive-date=February 16, 2017 |access-date=August 28, 2014 |publisher=MTV}}</ref> During this time, she attended the [[Pine Crest School]] and later [[North Broward Preparatory]].<ref>{{cite magazine |last=Wilson |first=Olivia |url=http://www.teen.com/2014/12/09/celebrities/celebrities-who-went-to-boarding-prep-school/#1 |title=16 Celebrities You Didn't Know Went to Boarding or Prep School |magazine=[[Teen (magazine)|Teen]] |date=December 9, 2014 |access-date=May 31, 2016 |archive-url=https://web.archive.org/web/20170815024411/http://www.teen.com/2014/12/09/celebrities/celebrities-who-went-to-boarding-prep-school/#1 |archive-date=August 15, 2017 }}</ref>
== Career ==
=== 2008–2013: Career beginnings and Nickelodeon ===
{{Main|Victorious|l1=''Victorious''|Sam & Cat|l2=''Sam & Cat''}}
When she first arrived in [[Los Angeles]], California, to meet with her managers, she expressed a desire to record an [[contemporary R&B|R&B]] album: "I was like, 'I want to make an R&B album,' They were like 'Um, that's a helluva goal! Who is going to buy a 14-year-old's R&B album?!'"<ref name="BillboardFreaky"/> In 2008, Grande was cast as cheerleader Charlotte in the Broadway musical ''[[13 (musical)|13]]''.<ref>{{cite news |url=https://www.nytimes.com/2008/10/06/theater/reviews/06bran.html |title=Stranger in Strange Land: The Acne Years |newspaper=[[The New York Times]] |last=Brantley |first=Ben |date=October 6, 2008 |access-date=September 11, 2014 |archive-date=February 9, 2018 |archive-url=https://web.archive.org/web/20180209162616/http://www.nytimes.com/2008/10/06/theater/reviews/06bran.html |url-status=live}}</ref><ref>{{cite magazine |url=http://www.timeforkids.com/news/ariana-grande/133541 |title=Ariana Grande |magazine=[[Time for Kids]] |date=December 5, 2013 |access-date=September 7, 2014 |archive-url=https://web.archive.org/web/20131218235254/https://www.timeforkids.com/news/ariana-grande/133541/ |archive-date=December 18, 2013}}</ref>
[[File:Ariana Grande by David Shankbone (cropped).jpg|thumb|upright|Grande at the 2010 [[Tribeca Film Festival]]]]
Grande was cast in the [[Nickelodeon]] television show ''[[Victorious]]'' along with ''13'' co-star [[Elizabeth Gillies]] in 2009.<ref name="Liz2009">{{cite magazine |url=http://www.seventeen.com/cosmogirl/five-questions-elizabeth-gillies |title=Elizabeth Gillies from Victorious Interview |last=Brown |first=Lauren |magazine=[[Seventeen (American magazine)|Seventeen]] |date=April 21, 2010 |access-date=August 30, 2014 |archive-date=September 3, 2014 |archive-url=https://web.archive.org/web/20140903232248/http://www.seventeen.com/cosmogirl/five-questions-elizabeth-gillies |url-status=live}}</ref> In the sitcom, set at a [[performing arts]] high school, she played the "adorably dimwitted" [[List of Victorious characters#Cat Valentine|Cat Valentine]].<ref name="Savage"/><ref name="Liz2009"/> She had to dye her hair red every other week for the role, which damaged it.<ref>{{cite magazine |url=https://www.allure.com/story/ariana-grande-hair-down-no-ponytail-photos |title=Ariana Grande Wore Her Hair Down Again, and Fans Still Can't Handle It |magazine=[[Allure (magazine)|Allure]] |last=Mueller |first=Marissa G. |date=June 7, 2019 |quote=Since people give me such a hard time about my hair I thought I'd take the time to explain the whole situation to everybody," she wrote on Facebook. "I had to bleach my hair and dye it red every other week for the first 4 years of playing Cat... as one would assume, that completely destroyed my hair. |access-date=December 23, 2019 |archive-date=December 23, 2019 |archive-url=https://web.archive.org/web/20191223183214/https://www.allure.com/story/ariana-grande-hair-down-no-ponytail-photos |url-status=live}}</ref> The show premiered in March 2010 to the second-largest audience for a live-action series in Nickelodeon, with 5.7 million viewers.<ref>{{cite news |url=https://www.nytimes.com/2010/03/26/arts/television/26victor.html |title=First the Tween Heart, Now the Soul |last=Wyatt |first=Edward |newspaper=The New York Times |date=March 25, 2010 |access-date=August 30, 2014 |archive-date=June 17, 2012 |archive-url=https://web.archive.org/web/20120617164647/http://www.nytimes.com/2010/03/26/arts/television/26victor.html |url-status=live}}</ref><ref name="rat2">{{cite web |last=Seidman |first=Robert |date=March 29, 2010 |title=Nickelodeon Scores 2nd Biggest "Kids' Choice Awards"; "Victorious" Bows to 5.7 Million |url=http://tvbythenumbers.zap2it.com/2010/03/29/nickelodeon-scores-2nd-biggest-kids-choice-awards-victorious-bows-to-5-7-million/46493/ |archive-url=https://web.archive.org/web/20150711234226/http://tvbythenumbers.zap2it.com/2010/03/29/nickelodeon-scores-2nd-biggest-kids-choice-awards-victorious-bows-to-5-7-million/46493/ |archive-date=July 11, 2015 |access-date=September 3, 2014 |publisher=TV by the Numbers}}</ref> The role helped propel Grande to [[teen idol]] status, but she was more interested in a music career, saying that acting is "fun, but music has always been first and foremost with me."<ref>{{cite magazine |last=Greene |first=Andy |title=How Ariana Grande and Max Martin Made 'Problem' the Song of the Summer |url=https://www.rollingstone.com/music/news/how-ariana-grande-and-max-martin-made-problem-the-song-of-the-summer-20140522 |magazine=[[Rolling Stone]] |date=May 22, 2014 |access-date=September 2, 2014 |archive-date=April 7, 2018 |archive-url=https://web.archive.org/web/20180407224107/https://www.rollingstone.com/music/news/how-ariana-grande-and-max-martin-made-problem-the-song-of-the-summer-20140522 }}</ref>
After the first season of ''Victorious'' wrapped, Grande wanted to focus on her music career and began working on her debut album in August 2010.<ref>{{cite web |last=Hyman |first=Dan |title=Life Is Grande: Ariana Grande On Her Debut Album and the Thrill of Hearing Herself on the Radio |url=http://www.elle.com/news/culture/ariana-grande-interview |website=[[Elle (magazine)|Elle]] |date=August 22, 2013 |access-date=August 30, 2014 |archive-date=November 8, 2014 |archive-url=https://web.archive.org/web/20141108153902/http://www.elle.com/news/culture/ariana-grande-interview |url-status=live}}</ref> The second season premiered in April 2011 to 6.2 million viewers, becoming the show's highest-rated episode.<ref>{{cite web |last=Seidman |first=Robert |title=Cable Top 25: 'Kids' Choice Awards,' 'Pawn Stars,' 'WWE RAW' and 'Victorious' Top Weekly Cable Viewing |url=http://tvbythenumbers.zap2it.com/2011/04/05/cable-top-25-kids-choice-awards-pawn-stars-wwe-raw-and-victorious-top-weekly-cable-viewing/88284/ |archive-url=https://web.archive.org/web/20110408070942/http://tvbythenumbers.zap2it.com/2011/04/05/cable-top-25-kids-choice-awards-pawn-stars-wwe-raw-and-victorious-top-weekly-cable-viewing/88284 |archive-date=April 8, 2011 |publisher=[[TV by the Numbers]] |date=April 5, 2011 |access-date=September 3, 2014}}</ref> In May 2011, Grande appeared in [[Greyson Chance]]'s video for the song "Unfriend You" from his album ''[[Hold On 'til the Night]]'' (2011), portraying his ex-girlfriend. She made her first musical appearance on the track "Give It Up" from the [[Victorious: Music from the Hit TV Show|''Victorious'' soundtrack]] in August 2011. While filming ''Victorious'', Grande made several recordings of herself singing covers of songs by [[Adele]], [[Whitney Houston]] and [[Mariah Carey]], and uploaded them to [[YouTube]].<ref name="GrandeDeal">{{cite news |url=https://www.reuters.com/article/2011/08/11/idUS232814+11-Aug-2011+BW20110811$495411498 |title=Universal Republic Records Announces the Signing of Ariana Grande |work=Reuters |date=August 11, 2011 |access-date=August 29, 2014 |archive-url=https://web.archive.org/web/20141026170358/http://www.reuters.com/article/2011/08/11/idUS232814+11-Aug-2011+BW20110811$495411498 |archive-date=October 26, 2014}}</ref> A friend of [[Monte Lipman]], chief executive officer (CEO) of [[Republic Records]], came across one of the videos. Impressed by her vocals, he sent the links to Lipman, who signed her to a recording contract.<ref name="BillboardFreaky"/> Grande voiced the title role in the English dub of the [[Spanish-language]] animated film ''[[Snowflake, the White Gorilla]]'' in November 2011.<ref>{{cite web |last=Dinh |first=James |title=Greyson Chance Gets Revenge In 'Unfriend You' Video |url=http://www.mtv.com/news/1666573/greyson-chance-unfriend-you-video/ |publisher=[[MTV]] |date=June 28, 2011 |access-date=July 10, 2015 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213315/http://www.mtv.com/news/1666573/greyson-chance-unfriend-you-video/ }}</ref><ref name="Spanos7">{{cite magazine |last=Spanos |first=Brittany |url=https://www.rollingstone.com/music/lists/ariana-grande-7-forgotten-screen-cameos-20160520/snowflake-the-white-gorilla-2011-20160520 |title=Ariana Grande: 7 Forgotten Screen Cameos |magazine=[[Rolling Stone]] |date=May 20, 2016 |access-date=August 24, 2017 |archive-date=August 31, 2017 |archive-url=https://web.archive.org/web/20170831132453/https://www.rollingstone.com/music/lists/ariana-grande-7-forgotten-screen-cameos-20160520/snowflake-the-white-gorilla-2011-20160520 |url-status=live}}</ref> From 2011 to 2013, she was cast in the role of fairy Princess Diaspro in the [[List of Winx Club episodes#Revived series 2|Nickelodeon revival]] of ''[[Winx Club]]''.<ref>{{cite press release |url=http://www.thefutoncritic.com/news/2011/06/09/global-hit-animated-series-winx-club-comes-to-nickelodeon-starting-monday-june-27-at-8-pm-219312/20110609nickelodeon01/ |title=Global hit animated series 'Winx Club' comes to Nickelodeon, starting Monday, June 27, at 8pm |via=[[The Futon Critic]] |date=June 9, 2011 |author=Nickelodeon |access-date=August 13, 2016 |archive-date=September 11, 2020 |archive-url=https://web.archive.org/web/20200911034336/http://www.thefutoncritic.com/news/2011/06/09/global-hit-animated-series-winx-club-comes-to-nickelodeon-starting-monday-june-27-at-8-pm-219312/20110609nickelodeon01/ |url-status=live}}</ref>
In December 2011, Grande released her first single, "[[Put Your Hearts Up]]", which was recorded for a potential teen-oriented pop album that was never issued. She later disowned the track for its [[bubblegum pop]] sound, saying she had no interest in recording music of that genre.<ref name="AllMusicBio"/> The song was later certified Gold by the [[Recording Industry Association of America]] (RIAA).<ref>{{cite web |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=ARIANA+GRANDE&ti=PUT+YOUR+HEARTS+UP |title=Put Your Hearts Up – RIAA's Gold & Platinum Program searchable database |publisher=Recording Industry Association of America |access-date=March 31, 2016 |archive-date=October 9, 2016 |archive-url=https://web.archive.org/web/20161009205906/http://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Put+Your+Hearts+Up |url-status=live}}</ref> On a second soundtrack, ''[[Victorious 2.0]]'', released on June 5, 2012, as an [[extended play]], she supplied vocals as part of the show's cast for the song "5 Fingaz to the Face".<ref>{{cite web |url=https://www.allmusic.com/album/victorious-20-more-music-from-the-hit-tv-show-original-tv-soundtrack-mw0002392649 |title=Victorious 2.0: More Music from the Hit TV Show |last=Phares |first=Heather |publisher=[[AllMusic]] |date=June 5, 2012 |access-date=August 31, 2014 |archive-date=April 3, 2019 |archive-url=https://web.archive.org/web/20190403231415/https://www.allmusic.com/album/victorious-20-more-music-from-the-hit-tv-show-original-tv-soundtrack-mw0002392649 |url-status=live}}</ref> The third and final soundtrack, ''[[Victorious 3.0]]'', was released on November 6, 2012, which featured a duet by Grande and [[Victoria Justice]] titled "[[L.A. Boyz (song)|L.A. Boyz]]", with an accompanying music video being released shortly after.<ref>{{cite web |url=http://www.nick.com/videos/clip/victorious-la-boyz-music-video.html |archive-url=https://web.archive.org/web/20141016121251/http://www.nick.com/videos/clip/victorious-la-boyz-music-video.html |archive-date=October 16, 2014 |title=Victoria Justice & Ariana Grande: "L.A. Boyz" |publisher=[[Nick.com]] |access-date=August 31, 2014}}</ref> In December 2012, Grande collaborated on the single version of "[[Popular Song (Mika song)|Popular Song]]", a duet with British singer and songwriter [[Mika (singer)|Mika]].<ref>{{cite news |last=Depland |first=Michael |date=April 29, 2013 |title=New Video: Mika Featuring Ariana Grande, 'Popular Song' |publisher=[[MTV]] |url=http://buzzworthy.mtv.com/2013/04/29/mika-ariana-grande-popular-song-video/ |access-date=May 5, 2013 |archive-date=May 3, 2013 |archive-url=https://web.archive.org/web/20130503012439/http://buzzworthy.mtv.com/2013/04/29/mika-ariana-grande-popular-song-video }} {{Webarchive|url=https://web.archive.org/web/20130503012439/http://buzzworthy.mtv.com/2013/04/29/mika-ariana-grande-popular-song-video |date=May 3, 2013 }}</ref>
After four seasons, ''Victorious'' was not renewed,<ref>{{cite web |date=August 11, 2012 |title='Victorious': Nickelodeon Cancels Victoria Justice Series After 3 Seasons |url=https://www.huffingtonpost.com/2012/08/11/victorious-cancelled-nickelodeon_n_1768125.html |url-status=live |archive-url=https://web.archive.org/web/20170707202840/http://www.huffingtonpost.com/2012/08/11/victorious-cancelled-nickelodeon_n_1768125.html |archive-date=July 7, 2017 |access-date=September 14, 2014 |work=[[HuffPost]]}}</ref> with the finale airing in February 2013. Grande starred as [[Snow White]] in the [[pantomime]]-style musical theatre production ''[[A Snow White Christmas (musical)|A Snow White Christmas]]'' with [[Charlene Tilton]] and [[Neil Patrick Harris]] at the [[Pasadena Playhouse]].<ref>{{Cite web |last=Denette |first=Kelsey |title=Ariana Grande, Charlene Tilton and Neil Patrick Harris Headline A Snow White Christmas at Pasadena Playhouse, 12/13-23 |url=https://www.broadwayworld.com/los-angeles/article/Ariana-Grande-Charlene-Tilton-and-Neil-Patrick-Harris-Headline-A-SNOW-WHITE-CHRISTMAS-at-Pasadena-Playhouse-1213-23-20120907 |archive-url=https://web.archive.org/web/20131013014801/https://www.broadwayworld.com/los-angeles/article/Ariana-Grande-Charlene-Tilton-and-Neil-Patrick-Harris-Headline-A-SNOW-WHITE-CHRISTMAS-at-Pasadena-Playhouse-1213-23-20120907 |archive-date=October 13, 2013 |access-date=April 1, 2024 |publisher=[[BroadwayWorld]]}}</ref>{{unreliable source|sure=yes|date=March 2026}} She played Amanda Benson in ''[[Swindle (2013 film)|Swindle]]'', a 2013 Nickelodeon film adaptation of the children's [[Swindle (novel)|book of the same name]].<ref name="Spanos7"/><ref>{{cite magazine |last=Marechal |first=AJ |date=October 3, 2012 |title=Nick stars set to 'Swindle' |url=https://variety.com/2012/tv/news/nick-stars-set-to-swindle-1118060202/ |url-status=live |archive-url=https://web.archive.org/web/20231026185028/https://variety.com/2012/tv/news/nick-stars-set-to-swindle-1118060202/ |archive-date=October 26, 2023 |access-date=February 27, 2013 |magazine=[[Variety (magazine)|Variety]]}}</ref> Meanwhile, Nickelodeon created ''[[Sam & Cat]]'', an ''[[iCarly]]'' and ''Victorious'' spin-off starring [[Jennette McCurdy]] and Grande.<ref>{{cite magazine |last=Snierson |first=Dan |date=August 2, 2012 |title=Nickelodeon greenlights spin-off pilots for 'iCarly,' 'Victorious' from creator Dan Schneider – EXCLUSIVE |url=http://insidetv.ew.com/2012/08/02/nickelodeon-icarly-spinoff-victorious/ |url-status=live |archive-url=https://web.archive.org/web/20141216025119/http://insidetv.ew.com/2012/08/02/nickelodeon-icarly-spinoff-victorious/ |archive-date=December 16, 2014 |access-date=September 3, 2014 |magazine=[[Entertainment Weekly]]}}</ref> Grande and McCurdy reprised their roles as Cat Valentine and [[Sam Puckett (iCarly Character)|Sam Puckett]] on the buddy sitcom, which paired the characters as roommates who form an after-school babysitting business.<ref>{{cite news |date=August 3, 2012 |title=Nickelodeon greenlights an 'iCarly' spinoff and other new shows |url=https://www.latimes.com/entertainment/tv/showtracker/la-et-st-nickelodeon-greenlights-icarly-spinoff-20120803,0,3715048.story |url-status=live |archive-url=https://web.archive.org/web/20120807002502/http://www.latimes.com/entertainment/tv/showtracker/la-et-st-nickelodeon-greenlights-icarly-spinoff-20120803,0,3715048.story |archive-date=August 7, 2012 |access-date=August 12, 2012 |newspaper=Los Angeles Times}}</ref>
=== 2013–2015: ''Yours Truly'' and ''My Everything'' ===
{{Main|Yours Truly (Ariana Grande album)|l1=''Yours Truly'' (Ariana Grande album)|My Everything (Ariana Grande album)|l2=''My Everything'' (Ariana Grande album)}}
[[File:ArianaGrandeDecember2013 ohne Hintergrund.jpg|thumb|left|upright|Grande in 2013]]
Grande released her debut album, ''Yours Truly'', on August 30, 2013.<ref name="itunesgb">{{cite web |last=Grande |first=Ariana |date=August 30, 2013 |title=Yours Truly |url=https://music.apple.com/gb/album/yours-truly/685617992 |archive-url=https://web.archive.org/web/20131014170604/https://itunes.apple.com/gb/album/yours-truly/id685617992 |archive-date=October 14, 2013 |access-date=August 3, 2021 |url-status=live |publisher=[[iTunes Store]]}}</ref> A pop and [[contemporary R&B|R&B]] record influenced by 1950s [[doo-wop]], ''Yours Truly'' debuted at number one on the US [[Billboard 200|''Billboard'' 200]] albums chart, with 138,000 copies sold in its first week.<ref>{{cite magazine |url=https://pitchfork.com/reviews/albums/18591-ariana-grande-yours-truly/ |title=Ariana Grande Yours Truly |last=Ryce |first=Andre |magazine=[[Pitchfork (website)|Pitchfork]] |access-date=June 7, 2020 |date=September 23, 2013 |archive-url=https://web.archive.org/web/20131124214449/https://pitchfork.com/reviews/albums/18591-ariana-grande-yours-truly/ |archive-date=November 24, 2013 |url-status=live}}</ref><ref>{{cite magazine |last=Caulfield |first=Keith |title=Ariana Grande Debuts At No. 1 On ''Billboard'' 200 |url=https://www.billboard.com/articles/news/5687364/ariana-grande-debuts-at-no-1-on-billboard-200 |magazine=[[Billboard (magazine)|Billboard]] |date=September 11, 2013 |access-date=September 11, 2013 |archive-date=April 3, 2019 |archive-url=https://web.archive.org/web/20190403070409/https://www.billboard.com/articles/news/5687364/ariana-grande-debuts-at-no-1-on-billboard-200 |url-status=live}}</ref><ref>{{cite web |title=Ariana Grande, Tamar Braxton Score Top Debuts |url=http://www.rap-up.com/2013/09/11/ariana-grande-tamar-braxton-score-top-debuts/ |work=Rap-Up |date=September 11, 2014 |access-date=August 29, 2014 |archive-date=June 24, 2019 |archive-url=https://web.archive.org/web/20190624155737/https://www.rap-up.com/2013/09/11/ariana-grande-tamar-braxton-score-top-debuts/ |url-status=live}}</ref> ''Yours Truly'' also debuted in the top ten in several other countries, including Australia,<ref>{{cite web |title=Week Commencing 9 September, 2013 |url=http://www.ariacharts.com.au/chart/download/1478/albums |publisher=ARIA |archive-url=https://web.archive.org/web/20130921055715/http://www.ariacharts.com.au/chart/download/1478/albums |archive-date=September 21, 2013}}</ref> the UK,<ref>{{cite web |last=Lane |first=Daniel |title=The 1975 score debut Number 1 album |url=http://www.officialcharts.com/chart-news/the-1975-score-debut-number-1-album-2474/ |publisher=[[Official Charts Company]] |access-date=September 8, 2013 |archive-date=October 18, 2014 |archive-url=https://web.archive.org/web/20141018151324/http://www.officialcharts.com/chart-news/the-1975-score-debut-number-1-album-2474/ |url-status=live}}</ref> Ireland,<ref>{{cite web |url=http://www.chart-track.co.uk/index.jsp?c=p%252Fmusicvideo%252Fmusic%252Farchive%252Findex_test.jsp&ct=240002&arch=t&lyr=2013&year=2013&week=36 |title=GFK Chart-Track – Irish Album Chart 5 September 2013 |website=chart-track.co.uk |access-date=March 31, 2016 |archive-url=https://web.archive.org/web/20181214135218/http://www.chart-track.co.uk/index.jsp?c=p%2Fmusicvideo%2Fmusic%2Farchive%2Findex_test.jsp&ct=240002&arch=t&lyr=2013&year=2013&week=36 |archive-date=December 14, 2018 }}</ref> and the Netherlands.<ref>{{cite web |title=Yours Truly |url=http://www.dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Yours+Truly&cat=a |publisher=Dutch Charts |access-date=November 15, 2014 |archive-date=November 29, 2019 |archive-url=https://web.archive.org/web/20191129164106/https://dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Yours+Truly&cat=a |url-status=live}}</ref> Its lead single, "[[The Way (Ariana Grande song)|The Way]]", featuring [[Pittsburgh]] rapper [[Mac Miller]], debuted at number ten on the US [[Billboard Hot 100|''Billboard'' Hot 100]],<ref name="billboard1">{{cite magazine |url=https://www.billboard.com/articles/news/1555888/macklemore-ryan-lewis-top-hot-100-imagine-dragons-ariana-grande-hit-top-10 |title=Macklemore & Ryan Lewis Top Hot 100; Imagine Dragons, Ariana Grande Hit Top 10 |magazine=[[Billboard (magazine)|Billboard]] |date=February 16, 2008 |access-date=May 5, 2013 |archive-date=June 13, 2019 |archive-url=https://web.archive.org/web/20190613170813/https://www.billboard.com/articles/news/1555888/macklemore-ryan-lewis-top-hot-100-imagine-dragons-ariana-grande-hit-top-10 |url-status=live}}</ref> eventually peaking at number nine for two weeks.<ref>{{cite magazine |title=The song, featuring T.I. and Pharrell, zips 6–1 to become Thicke's first Hot 100 No. 1. Plus, Ariana Grande returns to the top 10 at a new peak and Miley Cyrus debuts at No. 11 |url=https://www.billboard.com/articles/news/1566519/robin-thickes-blurred-lines-hits-no-1-on-hot-100 |magazine=[[Billboard (magazine)|Billboard]] |date=June 12, 2013 |access-date=August 29, 2014 |archive-date=June 14, 2018 |archive-url=https://web.archive.org/web/20180614154532/https://www.billboard.com/articles/news/1566519/robin-thickes-blurred-lines-hits-no-1-on-hot-100 |url-status=live}}</ref> Grande was later sued by Minder Music for copying the line "What we gotta do right here is go back, back in time" from the 1972 song "[[Troglodyte (Cave Man)]]" by [[The Jimmy Castor Bunch]].<ref>{{cite web |title=Ariana Grande faces lawsuit over allegedly copying song lyrics |url=https://www.digitalspy.com/music/news/a538118/ariana-grande-faces-lawsuit-over-allegedly-copying-song-lyrics.html |last=Corner |first=Lewis |work=[[Digital Spy]] |date=December 13, 2013 |access-date=August 31, 2014 |archive-date=September 24, 2015 |archive-url=https://web.archive.org/web/20150924051923/http://www.digitalspy.com/music/news/a538118/ariana-grande-faces-lawsuit-over-allegedly-copying-song-lyrics.html |url-status=live}}</ref> The album's second single, "[[Baby I]]", was released in July.<ref>{{cite web |url=https://itunes.apple.com/us/album/baby-i-single/id675752389 |title=iTunes – Music – Baby I – Single by Ariana Grande |publisher=[[Apple Music]] |date=July 22, 2013 |access-date=September 1, 2013 |archive-url=https://web.archive.org/web/20130822154339/https://itunes.apple.com/us/album/baby-i-single/id675752389 |archive-date=August 22, 2013}}</ref> Its third single, "[[Right There (Ariana Grande song)|Right There]]", featuring [[Detroit]] rapper [[Big Sean]], was released in August 2013.<ref>{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-big-sean-masquerade-in-right-there-video-watch-5770708/ |title=Ariana Grande, Big Sean Masquerade in 'Right There' Video: Watch |last=Lipshutz |first=Jason |date=October 30, 2013 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 14, 2014 |archive-date=July 12, 2019 |archive-url=https://web.archive.org/web/20190712031345/https://www.billboard.com/articles/columns/pop-shop/5770708/ariana-grande-big-sean-masquerade-in-right-there-video-watch |url-status=live}}</ref> They respectively peaked at number 21 and 84 on the ''Billboard'' Hot 100.<ref>{{cite magazine |last=Lipshutz |first=Jason |title=Ariana Grande Unveils 'Yours Truly' Artwork, Confirms Release Date |url=https://www.billboard.com/music/music-news/ariana-grande-unveils-yours-truly-artwork-confirms-release-date-5380950/ |magazine=[[Billboard (magazine)|Billboard]] |date=July 31, 2013 |access-date=July 31, 2013 |archive-date=June 14, 2018 |archive-url=https://web.archive.org/web/20180614102412/https://www.billboard.com/articles/columns/pop-shop/5380950/ariana-grande-unveils-yours-truly-artwork-confirms-release-date |url-status=live}}</ref>
Grande recorded the duet "[[Almost Is Never Enough]]" with [[Nathan Sykes]] of [[The Wanted]], which was released as a promotional single in August 2013. She also joined [[Justin Bieber]] on his [[Believe Tour]] for three shows and kicked off her own headlining mini-tour, [[The Listening Sessions]].<ref>{{cite web |url=http://www.mtv.com/news/1711445/ariana-grande-justin-bieber-believe-tour-prep/ |title=Ariana Grande 'Working Out A Lot' Before Justin Bieber Tour |last=Vena |first=Jocelyn |publisher=[[MTV]] |date=July 29, 2013 |access-date=August 30, 2014 |archive-date=September 12, 2019 |archive-url=https://web.archive.org/web/20190912203314/http://www.mtv.com/news/1711445/ariana-grande-justin-bieber-believe-tour-prep/ }}</ref> At the 2013 [[American Music Awards of 2013|American Music Awards]], she won the award for [[American Music Award for New Artist of the Year|New Artist of the Year]].<ref>{{cite magazine |url=http://music-mix.ew.com/2013/11/25/amas-2013-winners-list/ |title=AMAs 2013: See the complete winners list |magazine=Entertainment Weekly |date=November 25, 2013 |access-date=November 25, 2013 |archive-date=January 13, 2015 |archive-url=https://web.archive.org/web/20150113203900/http://music-mix.ew.com/2013/11/25/amas-2013-winners-list/ |url-status=live}}</ref><ref>{{cite magazine |last=Gallo |first=Phil |title=Ariana Grande, Taylor Swift Lead AMAs to Record Twitter Traffic (Exclusive) |url=https://www.billboard.com/articles/news/5800827/amas-twitter-traffic-ariana-grande-taylor-swift |magazine=[[Billboard (magazine)|Billboard]] |date=November 26, 2013 |access-date=December 15, 2013 |archive-date=July 9, 2018 |archive-url=https://web.archive.org/web/20180709075151/https://www.billboard.com/articles/news/5800827/amas-twitter-traffic-ariana-grande-taylor-swift |url-status=live}}</ref> She released a four-song Christmas EP, ''[[Christmas Kisses (EP)|Christmas Kisses]]'' in December 2013.<ref>{{cite web |url=http://www.digitalspy.co.uk/music/news/a529329/ariana-grande-to-release-new-music-in-the-lead-up-to-christmas.html |title=Ariana Grande to release new music in the lead-up to Christmas |work=[[Digital Spy]] |date=November 6, 2013 |access-date=August 30, 2014 |archive-date=September 24, 2015 |archive-url=https://web.archive.org/web/20150924155746/http://www.digitalspy.co.uk/music/news/a529329/ariana-grande-to-release-new-music-in-the-lead-up-to-christmas.html }}</ref> Grande received the Breakthrough Artist of the Year award from the [[Music Business Association]], recognizing her achievements throughout 2013.<ref name="BillArtist13">{{cite magazine |url=https://www.billboard.com/biz/articles/news/legal-and-management/6052301/ariana-grande-to-be-awarded-breakthrough-artist-of |title=Ariana Grande to be Awarded 'Breakthrough Artist of the Year' by Music Business Association |last=Trakin |first=Roy |date=April 14, 2014 |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 30, 2014 |archive-date=January 27, 2015 |archive-url=https://web.archive.org/web/20150127075710/http://www.billboard.com/biz/articles/news/legal-and-management/6052301/ariana-grande-to-be-awarded-breakthrough-artist-of |url-status=live}}</ref> By January 2014, Grande had begun recording her second studio album, with singer-songwriter [[Ryan Tedder]] and record producers [[Benny Blanco]] and [[Max Martin]].<ref>{{cite web |url=http://www.musictimes.com/articles/3392/20140113/ariana-grande-twitter-announces-shes-working-second-album-studio.htm |title=Ariana Grande Twitter announces she's working on second album in studio |last=Menyes |first=Carolyn |date=January 13, 2014 |work=Music Times |access-date=January 14, 2014 |archive-date=April 5, 2019 |archive-url=https://web.archive.org/web/20190405004711/https://www.musictimes.com/articles/3392/20140113/ariana-grande-twitter-announces-shes-working-second-album-studio.htm |url-status=live}}</ref> The same month, she earned the Favorite Breakout Artist award at the [[40th People's Choice Awards|People's Choice Awards 2014]].<ref name="BillArtist13"/> In March 2014, Grande sang at the [[White House]] concert, "Women of Soul: In Performance at the White House".<ref>{{cite magazine |url=https://www.billboard.com/articles/news/5923162/aretha-franklin-ariana-grande-set-for-first-ladys-women-of-soul-concert |title=Aretha Franklin, Ariana Grande Set for First Lady's 'Women of Soul' Concert |date=March 4, 2014 |magazine=[[Billboard (magazine)|Billboard]] |access-date=March 5, 2014 |archive-date=July 9, 2018 |archive-url=https://web.archive.org/web/20180709084218/https://www.billboard.com/articles/news/5923162/aretha-franklin-ariana-grande-set-for-first-ladys-women-of-soul-concert |url-status=live}}</ref> The following month, President [[Barack Obama]] and First Lady [[Michelle Obama]] invited Grande again to perform at the White House for the [[Easter Egg Roll]] event.<ref>{{cite news |url=http://au.ibtimes.com/articles/549011/20140422/ariana-grande-without-knicker-easter-egg-roll.htm |title=Ariana Grande Sexy Legs on Display at Easter Egg Roll Event: Gushes About Jim Carrey |last=Singh |first=Sonalee |date=April 22, 2014 |newspaper=International Business Times |access-date=April 22, 2014 |archive-url=https://web.archive.org/web/20140424142618/http://au.ibtimes.com/articles/549011/20140422/ariana-grande-without-knicker-easter-egg-roll.htm |archive-date=April 24, 2014}}</ref>{{unreliable source|sure=yes|date=March 2026}}
Grande released her second studio album ''[[My Everything (Ariana Grande album)|My Everything]]'' on August 25, 2014; it debuted atop the ''Billboard'' 200 with 169,000 copies and received generally positive reviews.<ref>{{cite news |date=September 3, 2014 |title=Ariana Grande scores second chart-topping album on Billboard 200 |work=Reuters |url=https://www.reuters.com/article/us-music-arianagrande-charts-idINKBN0GY2DQ20140903 |access-date=July 26, 2023 |archive-date=July 26, 2023 |archive-url=https://web.archive.org/web/20230726002854/https://www.reuters.com/article/us-music-arianagrande-charts-idINKBN0GY2DQ20140903 |url-status=live}}</ref><ref>Attributed to:
* {{cite magazine |last=Sheffield |first=Rob |title=Ariana Grande's New Album: My Everything |url=https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 |archive-url=https://web.archive.org/web/20180617093135/https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 |archive-date=June 17, 2018 |access-date=August 23, 2014 |magazine=[[Rolling Stone]] |pages=59–60 |volume=August 28, 2014 |issue=1216 |issn=0035-791X}}
* {{cite web |last=Wood |first=Mikael |date=August 29, 2014 |title=Review: Ariana Grande makes big things happen on 'My Everything' |url=http://www.latimes.com/entertainment/music/posts/la-et-ms-review-ariana-grande-makes-big-things-happen-on-my-everything-20140829-story.html |url-status=live |archive-url=https://web.archive.org/web/20141006215304/http://www.latimes.com/entertainment/music/posts/la-et-ms-review-ariana-grande-makes-big-things-happen-on-my-everything-20140829-story.html |archive-date=October 6, 2014 |access-date=August 30, 2014 |work=[[Los Angeles Times]]}}
* {{cite web |last=Gardner |first=Elysa |date=August 25, 2014 |title=Ariana's 'My Everything' is all things to all fans |url=https://www.usatoday.com/story/life/music/2014/08/25/ariana-grande-my-everything-review-listen-up/14547907/ |url-status=live |archive-url=https://web.archive.org/web/20140825073145/http://www.usatoday.com/story/life/music/2014/08/25/ariana-grande-my-everything-review-listen-up/14547907/ |archive-date=August 25, 2014 |access-date=August 25, 2014 |newspaper=[[USA Today]]}}
* {{cite web |last=Garvey |first=Meaghan |date=August 29, 2014 |title=Ariana Grande: My Everything | Album Reviews |url=http://pitchfork.com/reviews/albums/19765-ariana-grande-my-everything/ |url-status=live |archive-url=https://web.archive.org/web/20140830043900/http://pitchfork.com/reviews/albums/19765-ariana-grande-my-everything/ |archive-date=August 30, 2014 |access-date=August 30, 2013 |website=[[Pitchfork (website)|Pitchfork]]}}</ref> She explored [[Electronic dance music|EDM]], [[dance-pop]], and [[Electro (music)|electro]] genres on the album.<ref>Attributed to:
* {{cite magazine |title=My Everything – Billboard Review |url=http://www.billboard.com/articles/review/6229287/ariana-grande-my-everything-billboard-album-review |url-status=live |archive-url=https://web.archive.org/web/20180625133909/https://www.billboard.com/articles/review/6229287/ariana-grande-my-everything-billboard-album-review |archive-date=June 25, 2018 |access-date=November 6, 2016 |magazine=[[Billboard (magazine)|Billboard]]}}
* {{cite news |title=Ariana Grande's 'My Everything': Album Review |url=http://www.nydailynews.com/entertainment/music/stars-ariana-grande-article-1.1912013 |url-status=live |archive-url=https://web.archive.org/web/20161107010724/http://www.nydailynews.com/entertainment/music/stars-ariana-grande-article-1.1912013 |archive-date=November 7, 2016 |access-date=November 6, 2016 |newspaper=[[New York Daily News]] |location=New York}}
* {{cite news |last1=Sawdey |first1=Evan |date=August 25, 2014 |title=Ariana Grande: My Everything | PopMatters |url=http://www.popmatters.com/review/185041-ariana-grande-my-everything |url-status=live |archive-url=https://web.archive.org/web/20160918071621/http://www.popmatters.com/review/185041-ariana-grande-my-everything/ |archive-date=September 18, 2016 |access-date=November 6, 2016 |work=[[PopMatters]]}}
* {{cite magazine |last=Lipshutz |first=Jason |date=April 28, 2014 |title=Ariana Grande Talks 'Problem' Single & Second Album, Due Out August/September |url=https://www.billboard.com/music/music-news/ariana-grande-talks-problem-single-second-album-due-out-6070079/ |url-status=live |archive-url=https://web.archive.org/web/20140501095225/http://www.billboard.com/articles/columns/pop-shop/6070079/ariana-grande-talks-problem-single-second-album-due-out |archive-date=May 1, 2014 |access-date=June 29, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Its lead single, "[[Problem (Ariana Grande song)|Problem]]" featuring Australian rapper [[Iggy Azalea]], peaked at number two on the ''Billboard'' Hot 100,<ref>{{cite magazine |last1=Trust |first1=Gary |title=Iggy Azalea Tops Hot 100 With 'Fancy,' Matches Beatles' Historic Mark |url=http://www.billboard.com/articles/news/6099390/iggy-azalea-tops-hot-100-fancy-matches-beatles |url-status=live |archive-url=https://web.archive.org/web/20150429012119/http://www.billboard.com/articles/news/6099390/iggy-azalea-tops-hot-100-fancy-matches-beatles |archive-date=April 29, 2015 |access-date=June 14, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and became Grande's first number-one on [[UK singles chart|the UK]] and [[Official Aotearoa Music Charts|New Zealand singles]] charts.<ref>{{cite web |last=Lane |first=Dan |date=July 6, 2014 |url=http://www.officialcharts.com/chart-news/ariana-grande-earns-a-place-in-official-chart-history-with-problem-3146/ |title=Ariana Grande earns a place in Official Chart history with Problem |archive-url=https://web.archive.org/web/20170601175201/http://www.officialcharts.com/chart-news/ariana-grande-earns-a-place-in-official-chart-history-with-problem__4302/ |archive-date=June 1, 2017 |publisher=[[Official Charts Company]] |access-date=November 23, 2015}}</ref><ref>{{cite web |date=May 5, 2014 |title=NZ Top 40 Singles Chart |url=https://aotearoamusiccharts.co.nz/archive/singles/2014-05-02 |url-status=live |archive-url=https://web.archive.org/web/20140502133815/http://nztop40.co.nz/chart/singles?chart=2493 |archive-date=May 2, 2014 |access-date=May 2, 2014 |publisher=[[Recorded Music NZ]]}}</ref> Selling 438,000 digital copies in its opening week, it achieved the highest first-week sales numbers of 2014<ref>{{cite magazine |last=Trust |first=Gary |date=May 7, 2014 |title=Hot 100: John Legend's "All Of Me" Hits No. 1, Ariana Grande's "Problem" Debuts At No. 3 |url=http://www.billboard.com/articles/news/6077635/hot-100-john-legend-all-of-me-ariana-grande-iggy-azalea |url-status=live |archive-url=https://web.archive.org/web/20140510180721/http://www.billboard.com/articles/news/6077635/hot-100-john-legend-all-of-me-ariana-grande-iggy-azalea |archive-date=May 10, 2014 |access-date=May 7, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and made Grande the youngest woman, at 20 years old, to debut with over 400,000 downloads at the time.<ref>{{cite magazine |last=Caulfield |first=Keith |title=Ariana Grande's 'Problem' Set for Record Sales Debut |url=http://www.billboard.com/articles/news/6077517/ariana-grande-problem-record-sales-debut-hot-100-chart |url-status=live |archive-url=https://web.archive.org/web/20180623010312/https://www.billboard.com/articles/news/6077517/ariana-grande-problem-record-sales-debut-hot-100-chart |archive-date=June 23, 2018 |access-date=May 6, 2014 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> "Problem" became 2014's eighth-best-selling digital single globally, with over 9 million copies sold, according to the [[International Federation of the Phonographic Industry]] (IFPI).<ref>{{cite web |date=April 14, 2015 |title=IFPI publishes Digital Music Report 2015 |url=http://www.ifpi.org/news/Global-digital-music-revenues-match-physical-format-sales-for-first-time |url-status=live |archive-url=https://web.archive.org/web/20150414194629/http://www.ifpi.org/news/Global-digital-music-revenues-match-physical-format-sales-for-first-time |archive-date=April 14, 2015 |access-date=April 15, 2015 |publisher=International Federation of the Phonographic Industry |page=12}}</ref> The album's second single, "[[Break Free (song)|Break Free]]", featuring German musician and producer [[Zedd]],<ref>{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-break-free-zedd-interview-video-new-single-problem-6128769/ |title=Ariana Grande's 'Break Free': Zedd Discusses The 'Problem' Follow-Up |last=Lipshutz |first=Jason |magazine=[[Billboard (magazine)|Billboard]] |date=June 23, 2014 |access-date=July 28, 2014 |archive-date=June 17, 2018 |archive-url=https://web.archive.org/web/20180617125940/https://www.billboard.com/articles/columns/pop-shop/6128769/ariana-grande-break-free-zedd-interview-video-new-single-problem |url-status=live}}</ref> was released on July 3 and reached number four in the United States.<ref name="TripleHot100">{{cite magazine |last=Trust |first=Gary |title=Ariana Grande, Iggy Azalea Triple Up In Hot 100's Top 10, MAGIC! Still No. 1 |url=https://www.billboard.com/articles/news/6221978/hot-100-ariana-grande-iggy-azalea-top-10-magic |magazine=[[Billboard (magazine)|Billboard]] |date=August 20, 2014 |access-date=August 20, 2014 |archive-date=June 13, 2018 |archive-url=https://web.archive.org/web/20180613083134/https://www.billboard.com/articles/news/6221978/hot-100-ariana-grande-iggy-azalea-top-10-magic |url-status=live}}</ref> She performed the song as the opening of the [[2014 MTV Video Music Awards]], and won [[Best Pop Video]] for "Problem".<ref>{{cite web |last=Ehrlich |first=Brenna |url=http://www.mtv.com/news/1909975/ariana-grande-best-pop-video-vma |title=Ponytail Princess Ariana Grande Wins Best Pop Video VMA |publisher=[[MTV]] |date=August 24, 2014 |access-date=September 2, 2014 |archive-date=September 16, 2019 |archive-url=https://web.archive.org/web/20190916084543/http://www.mtv.com/news/1909975/ariana-grande-best-pop-video-vma/ }}</ref> Grande and [[Nicki Minaj]] provided guest vocals on "[[Bang Bang (Jessie J, Ariana Grande and Nicki Minaj song)|Bang Bang]]", the lead single from [[Jessie J]]'s album ''[[Sweet Talker (Jessie J album)|Sweet Talker]]'',<ref>{{cite magazine |last=Lipshutz |first=Jason |title=Jessie J, Ariana Grande, Nicki Minaj Combine For 'Bang Bang' Single |url=https://www.billboard.com/music/music-news/jessie-j-ariana-grande-nicki-minaj-bang-bang-single-6141209/ |date=July 1, 2014 |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 20, 2014 |archive-date=June 17, 2018 |archive-url=https://web.archive.org/web/20180617124228/https://www.billboard.com/articles/columns/pop-shop/6141209/jessie-j-ariana-grande-nicki-minaj-bang-bang-single |url-status=live}}</ref> which peaked at number one in the UK and at number three in the US.<ref name="TripleHot100"/> The song was added to the deluxe version of ''My Everything'', serving as the third single from the album.<ref>{{cite magazine |last=Crow |first=Jones |date=April 28, 2015 |title=Five Hits, One Album: The Strategy Behind Ariana Grande's Singles From 'My Everything' |url=https://www.billboard.com/pro/five-hits-one-album-the-strategy-behind-ariana-grandes-singles/ |access-date=September 6, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 25, 2024 |archive-url=https://web.archive.org/web/20240325010234/https://www.billboard.com/pro/five-hits-one-album-the-strategy-behind-ariana-grandes-singles/ |url-status=live}}</ref> It was certified diamond by the RIAA in May 2024, for selling over 10 million units in the US; it marked the first all-female collaboration to achieve the certification.<ref>{{Cite magazine |last=Trapp |first=Malcom |date=May 23, 2024 |title=Jessie J, Nicki Minaj, And Ariana Grande's 'Bang Bang' Becomes First All-Female Collaboration To Be RIAA-Certified Diamond |url=https://www.rap-up.com/2024/05/23/nicki-minaj-earns-her-second-diamond-certification-with-bang-bang/ |access-date=September 6, 2024 |magazine=[[Rap-Up]] |archive-date=May 25, 2024 |archive-url=https://web.archive.org/web/20240525174028/https://www.rap-up.com/2024/05/23/nicki-minaj-earns-her-second-diamond-certification-with-bang-bang/ |url-status=live}}</ref> With the singles "Problem", "Break Free", and "Bang Bang", Grande became the second female artist in chart history, joining [[Adele]], with three top-ten singles simultaneously on the ''Billboard'' Hot 100 as a lead artist.<ref name="TripleHot100"/>
Grande was the musical performer on ''[[Saturday Night Live]]'', with [[Chris Pratt]] as the host on September 27, 2014.<ref>{{cite magazine |last=Reed |first=Ryan |title=Ariana Grande, Chris Pratt Set for 'Saturday Night Live' Premiere |url=https://www.rollingstone.com/tv/news/ariana-grande-chris-pratt-set-for-saturday-night-live-premiere-20140910 |magazine=[[Rolling Stone]] |date=September 10, 2014 |access-date=September 17, 2014 |archive-date=September 12, 2014 |archive-url=https://web.archive.org/web/20140912222951/http://www.rollingstone.com/tv/news/ariana-grande-chris-pratt-set-for-saturday-night-live-premiere-20140910 }}</ref> That same month, the fourth single from ''My Everything'', "[[Love Me Harder]]", featuring Canadian recording artist [[the Weeknd]], was released and peaked at number seven in the United States.<ref>{{cite magazine |last=Trust |first=Gary |title=Hot 100 Chart Moves: Ed Sheeran, Ariana Grande, Fergie Debut |url=https://www.billboard.com/pro/hot-100-ed-sheeran-ariana-grande-fergie/ |magazine=[[Billboard (magazine)|Billboard]] |date=October 17, 2014 |access-date=April 20, 2020 |archive-date=June 23, 2018 |archive-url=https://web.archive.org/web/20180623040146/https://www.billboard.com/articles/columns/chart-beat/6289067/hot-100-ed-sheeran-ariana-grande-fergie |url-status=live}}</ref> In November 2014, Grande was featured in [[Major Lazer]]'s song "[[All My Love (Major Lazer song)|All My Love]]" from the [[The Hunger Games: Mockingjay, Part 1 – Original Motion Picture Soundtrack|soundtrack album]] for the film ''[[The Hunger Games: Mockingjay – Part 1]]'' (2014).<ref name="spin">{{cite news |last=Carley |first=Brennan |date=November 13, 2014 |title=Major Lazer and Ariana Grande Team Up for Piercing 'Mockingjay' Cut |work=[[Spin (magazine)|Spin]] |url=https://www.spin.com/2014/11/ariana-grande-major-lazer-mockingjay-all-my-love-stream/ |access-date=May 18, 2018 |archive-date=August 17, 2023 |archive-url=https://web.archive.org/web/20230817074515/https://www.spin.com/2014/11/ariana-grande-major-lazer-mockingjay-all-my-love-stream/ |url-status=live}}</ref> Later that month, Grande released the Christmas song "[[Santa Tell Me]]" as a single from the [[reissue]] of her first Christmas EP, ''Christmas Kisses'' (2014).<ref>{{cite web |last1=White |first1=Caitlin |title=Ariana Grande's 'Santa Tell Me' Is Officially Here, and It Sounds Like Christmas Came Early! |url=http://www.mtv.com/news/2007283/ariana-grande-santa-tell-me/ |publisher=[[MTV]] |date=November 24, 2014 |access-date=November 30, 2014 |archive-date=April 1, 2019 |archive-url=https://web.archive.org/web/20190401033750/http://www.mtv.com/news/2007283/ariana-grande-santa-tell-me/ }}</ref> The track became a modern [[Standard (music)|Christmas standard]], significantly rising in popularity on streaming services during the holiday season every year.<ref>{{Cite magazine |last=Beck |first=Lia |date=November 2, 2022 |title=These Are the Best 33 Modern Christmas Songs to Add to Your Holiday Playlist |url=https://www.cosmopolitan.com/entertainment/music/a34287825/best-modern-christmas-songs/ |access-date=November 20, 2022 |magazine=[[Cosmopolitan (magazine)|Cosmopolitan]] |archive-date=September 18, 2025 |archive-url=https://web.archive.org/web/20250918153926/https://www.cosmopolitan.com/entertainment/music/a34287825/best-modern-christmas-songs/ |url-status=live}}</ref> A decade after its release, it reached number five on the Hot 100 issue dated January 4, 2025—being the first Christmas song released in the 21st century to appear in the chart's top-five region.<ref>{{Cite magazine |last=Trust |first=Gary |date=December 30, 2024 |title=Mariah Carey's 'All I Want for Christmas Is You' Adds 18th Week at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/lists/mariah-carey-all-i-want-for-christmas-is-you-hot-100-number-one-18-weeks/christmas-streams-airplay-sales-4/ |access-date=December 31, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 2, 2025 |archive-url=https://web.archive.org/web/20250102213414/https://www.billboard.com/lists/mariah-carey-all-i-want-for-christmas-is-you-hot-100-number-one-18-weeks/christmas-streams-airplay-sales-4/ |url-status=live}}</ref><ref>{{Cite magazine |last=Trust |first=Gary |date=December 30, 2024 |title=Here's Every Holiday Hit That Has Jingled to the Billboard Hot 100's Top 10 |url=https://www.billboard.com/lists/holiday-songs-hot-100-top-10/ |access-date=December 31, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 30, 2024 |archive-url=https://web.archive.org/web/20241230224013/https://www.billboard.com/lists/holiday-songs-hot-100-top-10/ |url-status=live}}</ref> The following month, she appeared on Nicki Minaj's third album ''[[The Pinkprint]]'', with the song "[[Get on Your Knees (Nicki Minaj song)|Get on Your Knees]]". She later released the fifth and the final single from ''My Everything'', "[[One Last Time (Ariana Grande song)|One Last Time]]", which peaked at number 13 in the US.<ref>{{cite magazine |url=https://www.billboard.com/artist/ariana-grande/chart-history/hot-100 |title=Ariana Grande – Chart History: The Hot 100 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 29, 2019 |archive-date=November 21, 2021 |archive-url=https://web.archive.org/web/20211121103915/https://www.billboard.com/artist/ariana-grande/chart-history/hot-100/ |url-status=live}}</ref>
[[File:Ariana Grande - The Honeymoon Tour Live Jakarta (3).jpg|thumb|upright|Grande performing on [[the Honeymoon Tour]] in 2015]]
In February 2015, Grande embarked on her first worldwide concert tour, [[The Honeymoon Tour]], to further promote ''My Everything'', with shows in North America, Europe, Asia and South America.<ref>{{cite news |last=Perdani |first=Yuliasri |title=Ariana Grande to debut in Jakarta soon |url=http://www.thejakartapost.com/news/2015/06/16/ariana-grande-debut-jakarta-soon.html |newspaper=[[The Jakarta Post]] |date=June 16, 2015 |access-date=June 29, 2015 |archive-date=October 24, 2019 |archive-url=https://web.archive.org/web/20191024222129/https://www.thejakartapost.com/news/2015/06/16/ariana-grande-debut-jakarta-soon.html |url-status=live}}</ref> Grande was featured on [[Cashmere Cat]]'s song [[Adore (Cashmere Cat song)|"Adore"]], which was released in March 2015.<ref>{{cite web |last1=McDermott |first1=Maeve |last2=Ryan |first2=Patrick |url=https://www.usatoday.com/story/life/music/2015/12/22/songs-of-the-year-2015/77689258/ |title=The 50 best songs of 2015 |work=[[USA Today]] |date=December 22, 2015 |access-date=August 24, 2017 |archive-date=December 9, 2019 |archive-url=https://web.archive.org/web/20191209190650/https://www.usatoday.com/story/life/music/2015/12/22/songs-of-the-year-2015/77689258/ |url-status=live}}</ref> In the spring, she signed an exclusive publishing contract with the [[Universal Music Publishing Group]], covering her entire music catalog.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/6583126/ariana-grande-signs-with-universal-music-publishing-group |title=Ariana Grande Signs with Universal Music Publishing Group |magazine=[[Billboard (magazine)|Billboard]] |date=June 1, 2015 |access-date=April 20, 2020 |archive-date=October 26, 2023 |archive-url=https://web.archive.org/web/20231026185044/https://pixels.ad.gt/api/v1/getpixels?tagger_id=fbf4aef3db1f9d87b19a37e2c9c2dc7f&url=https%3A%2F%2Fwww.billboard.com%2Fmusic%2Fmusic-news%2Fariana-grande-signs-with-universal-music-publishing-group-6583126%2F&code=%27none%27 |url-status=live}} and {{cite web |last1=Stassen |first1=Murray |title=Ariana Grande signs worldwide publishing deal with UMPG |url=http://www.musicweek.com/news/read/ariana-grande-signs-worldwide-publishing-deal-with-umpg/061935 |website=[[Music Week]] |date=June 2, 2015 |access-date=June 12, 2015 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213250/http://www.musicweek.com/news/read/ariana-grande-signs-worldwide-publishing-deal-with-umpg/061935 |url-status=live}}</ref> Grande also filmed an episode for the [[Fox Broadcasting Company]] reality TV series ''[[Knock Knock Live]]'' (2015),<ref name="KKL">{{cite web |last=Holloway |first=Daniel |url=https://www.thewrap.com/justin-bieber-ariana-grande-to-appear-on-ryan-seacrests-knock-knock-live |title=Justin Bieber, Ariana Grande to Appear on Ryan Seacrest's ''Knock Knock Live'' |website=[[TheWrap]] |date=July 14, 2015 |access-date=October 30, 2016 |archive-date=April 20, 2021 |archive-url=https://web.archive.org/web/20210420181148/https://www.thewrap.com/justin-bieber-ariana-grande-to-appear-on-ryan-seacrests-knock-knock-live/ |url-status=live}}</ref> but the show was canceled before her episode aired.<ref>{{cite web |last=Wagmeister |first=Elizabeth |url=https://variety.com/2015/tv/news/knock-knock-live-fox-cancelled-ryan-seacrest-1201553836/ |title=Fox Pulls Ryan Seacrest's ''Knock Knock Live'' After Two Episodes |work=[[Variety (magazine)|Variety]] |date=July 30, 2015 |access-date=December 10, 2017 |archive-date=November 22, 2019 |archive-url=https://web.archive.org/web/20191122013451/https://variety.com/2015/tv/news/knock-knock-live-fox-cancelled-ryan-seacrest-1201553836/ |url-status=live}}</ref> She also guest-starred on several episodes of the Fox [[comedy-horror]] television series ''[[Scream Queens (2015 TV series)|Scream Queens]]'' as [[Sonya Herfmann]]/Chanel #2 from September to November 2015.<ref name="ScreamQueens">{{cite magazine |last=Stack |first=Tim |date=April 24, 2015 |title=First Look: Ariana Grande on the set of Scream Queens |url=https://www.ew.com/article/2015/04/24/first-look-ariana-grande-scream-queens |archive-url=https://web.archive.org/web/20210419215425/https://ew.com/article/2015/04/24/first-look-ariana-grande-scream-queens/ |archive-date=April 19, 2021 |access-date=April 20, 2020 |magazine=[[Entertainment Weekly]]}}</ref> She recorded the duet "[[E Più Ti Penso]]" with Italian recording artist [[Andrea Bocelli]], which was released in October 2015 as the lead single from Bocelli's album ''[[Cinema (Andrea Bocelli album)|Cinema]]'' (2015),<ref>{{cite web |last=Mallenbaum |first=Carly |url=https://www.usatoday.com/story/life/entertainthis/2015/10/14/ariana-grande-andrea-bocelli/73929168/ |title=Ariana Grande has Italian duet with Andrea Bocelli. Of course it's good |work=[[USA Today]] |date=October 14, 2015 |access-date=August 24, 2017 |archive-date=December 8, 2019 |archive-url=https://web.archive.org/web/20191208022423/https://www.usatoday.com/story/life/entertainthis/2015/10/14/ariana-grande-andrea-bocelli/73929168/ |url-status=live}}</ref> and covered the song "Zero to Hero", originally from the [[animated film]] ''[[Hercules (1997 film)|Hercules]]'' (1997), for the compilation album ''[[We Love Disney (2015 album)|We Love Disney]]'' (2015).<ref>{{cite web |last=Glein |first=Kelsey |url=http://www.instyle.com/news/ariana-grande-gwen-stefani-we-love-disney-album |title=Gwen Stefani, Ariana Grande, and More Reimagine Your Favorite Disney Songs on New Album |work=[[InStyle]] |date=October 30, 2015 |access-date=October 30, 2015 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184549/https://www.instyle.com/news/ariana-grande-gwen-stefani-we-love-disney-album }}</ref> Grande also released her second Christmas EP, ''[[Christmas & Chill]]'' in December 2015.<ref>{{cite magazine |last=Spanos |first=Brittany |url=https://www.rollingstone.com/music/news/hear-ariana-grandes-surprise-released-ep-christmas-chill-20151217 |title=Hear Ariana Grande's Surprise-Released EP 'Christmas & Chill' |magazine=[[Rolling Stone]] |date=December 17, 2015 |access-date=August 24, 2017 |archive-date=June 16, 2018 |archive-url=https://web.archive.org/web/20180616204319/https://www.rollingstone.com/music/news/hear-ariana-grandes-surprise-released-ep-christmas-chill-20151217 }}</ref>
===2015–2018: ''Dangerous Woman'' and ''Sweetener''===
{{See also|Dangerous Woman {{!}} ''Dangerous Woman''|Manchester Arena bombing|One Love Manchester|Sweetener (album) {{!}} ''Sweetener'' (album)}}
Grande began recording songs for her third studio album, ''[[Dangerous Woman]]'', originally titled ''Moonlight'', in 2015.<ref>{{cite web |last=Roth |first=Madeline |title=Ariana Grande Revealed Her New Album Title – And It's Literally Out of This World |url=http://www.mtv.com/news/2173375/ariana-grande-third-album-title/ |publisher=[[MTV]] |access-date=May 30, 2015 |archive-url=https://web.archive.org/web/20150530221938/http://www.mtv.com/news/2173375/ariana-grande-third-album-title/ |archive-date=May 30, 2015 |date=May 30, 2015}}</ref> In October of that year, she released the single "[[Focus (Ariana Grande song)|Focus]]", initially intended as the lead single from the album; the song debuted at number seven on the ''Billboard'' Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/adele-hello-hot-100-second-week/ |title=Adele's 'Hello' Tops Hot 100 for Second Week; Ariana Grande, Meghan Trainor Hit Top 10 |magazine=[[Billboard (magazine)|Billboard]] |date=November 9, 2015 |access-date=April 20, 2020 |archive-date=May 7, 2016 |archive-url=https://web.archive.org/web/20160507132105/http://www.billboard.com/articles/columns/chart-beat/6754159/adele-hello-hot-100-second-week |url-status=live}}</ref> The next month American singer [[Who Is Fancy]] released the single "[[Boys Like You (Who Is Fancy song)|Boys Like You]]", which features Ariana Grande and [[Meghan Trainor]].<ref>{{cite web |url=http://www.m-magazine.com/posts/ariana-grande-teams-with-who-is-fancy-for-boys-like-you-song-77005 |title=Ariana Grande Teams With Who is Fancy For 'Boys Like You' Song |work=[[M Magazine]] |date=November 23, 2015 |access-date=November 23, 2015 |archive-url=https://web.archive.org/web/20151116015553/http://www.m-magazine.com/posts/ariana-grande-teams-with-who-is-fancy-for-boys-like-you-song-77005 |archive-date=November 16, 2015 |last=Thompson |first=Heather}}</ref> She was featured in the remix version of "[[Over and Over Again]]", a song by English singer [[Nathan Sykes]] from his solo debut studio album ''[[Unfinished Business (Nathan Sykes album)|Unfinished Business]]'', which was released in January 2016.<ref>{{cite magazine |last=Mallenbaum |first=Carly |url=https://www.rollingstone.com/music/music-news/hear-ariana-grande-join-ex-boyfriend-nathan-sykes-on-over-and-over-again-178484/ |title=Hear Ariana Grande Join Ex-Boyfriend Nathan Sykes on 'Over and Over Again' |magazine=[[Rolling Stone]] |date=January 16, 2016 |access-date=October 18, 2020 |archive-date=July 15, 2021 |archive-url=https://web.archive.org/web/20210715173115/https://www.rollingstone.com/music/music-news/hear-ariana-grande-join-ex-boyfriend-nathan-sykes-on-over-and-over-again-178484/ |url-status=live}}</ref> In March 2016, Grande released "[[Dangerous Woman (song)|Dangerous Woman]]" as the lead single from the retitled album of the same name.<ref>{{cite magazine |last=Nolfi |first=Joey |url=https://www.ew.com/article/2016/03/10/ariana-grande-dangerous-woman |title=Hear Ariana Grande's sultry new single 'Dangerous Woman' |magazine=Entertainment Weekly |date=March 10, 2016 |access-date=April 20, 2020 |archive-date=March 16, 2022 |archive-url=https://web.archive.org/web/20220316225641/https://ew.com/article/2016/03/10/ariana-grande-dangerous-woman/ |url-status=live}}; {{cite web |last=Geffen |first=Sasha |url=http://www.mtv.com/news/2753217/ariana-grande-dangerous-woman-single/ |title=Ariana Grande's 'Dangerous Woman' Is Here and It Deserves Its Own Spy Movie |publisher=[[MTV]] |date=March 11, 2016 |access-date=March 12, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213308/http://www.mtv.com/news/2753217/ariana-grande-dangerous-woman-single/ }}</ref><ref>{{cite web |url=https://music.apple.com/us/album/dangerous-woman/1440843597 |title=iTunes – Music – Dangerous Woman by Ariana Grande |publisher=[[iTunes Store]] (US) |access-date=March 10, 2016 |archive-date=March 27, 2019 |archive-url=https://web.archive.org/web/20190327111705/https://itunes.apple.com/us/album/dangerous-woman/id1091145606 |url-status=live}}</ref> The single debuted at number ten on the ''Billboard'' Hot 100, making her the first artist to have the lead single from each of their first three albums debut in the top ten.<ref name="FirstThree">{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/rihanna-hot-100-no-1-fifth-week-ariana-grande-debuts/ |title=Rihanna Rules Hot 100 for Fifth Week, Ariana Grande Debuts at No. 10 |magazine=[[Billboard (magazine)|Billboard]] |date=March 21, 2016 |access-date=April 20, 2020 |archive-date=May 6, 2021 |archive-url=https://web.archive.org/web/20210506170226/https://www.billboard.com/articles/columns/chart-beat/7263992/rihanna-hot-100-no-1-fifth-week-ariana-grande-debuts |url-status=live}}</ref> The same month, Grande appeared as host and musical guest of ''Saturday Night Live'', where she performed "Dangerous Woman" and debuted the promotional single "[[Be Alright (Ariana Grande song)|Be Alright]]",<ref>{{Cite magazine |date=February 25, 2016 |title=Ariana Grande to Host and Perform on 'Saturday Night Live' |url=https://time.com/4237667/ariana-grande-saturday-night-live-dangerous-woman-be-alright/ |access-date=April 3, 2024 |magazine=Time |archive-date=April 3, 2024 |archive-url=https://web.archive.org/web/20240403065746/https://time.com/4237667/ariana-grande-saturday-night-live-dangerous-woman-be-alright/ |url-status=live}}</ref> which charted at number 43 on the ''Billboard'' Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/hot-100-chart-moves-iggy-azalea-ariana-grande-debut/ |title=Hot 100 Chart Moves: Iggy Azalea & Ariana Grande Debut |magazine=[[Billboard (magazine)|Billboard]] |date=March 31, 2016 |access-date=April 20, 2020 |archive-date=October 26, 2023 |archive-url=https://web.archive.org/web/20231026185029/https://www.billboard.com/pro/hot-100-chart-moves-iggy-azalea-ariana-grande-debut/ |url-status=live}}</ref> Grande garnered positive reviews for her appearance on the show, including praise for her impressions of various singers,<ref>{{cite web |date=March 14, 2016 |title=Ariana Grande Incredibly Imitates Whitney, Celine, Britney and More |url=http://shows.huffingtonpost.com/video/ariana-grande-incredibly-imitates-whitney-celine-britney-and-more-519579275 |archive-url=https://web.archive.org/web/20231026185030/https://www.huffpost.com/section/video |archive-date=October 26, 2023 |access-date=March 15, 2016 |work=[[HuffPost]]}}</ref><ref>{{cite news |url=https://time.com/4257737/ariana-grande-saturday-night-live-review/ |title=Ariana Grande's Saturday Night Live Performance Was a Triumph |last1=D'Addario |first1=Daniel |access-date=March 15, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213248/http://time.com/4257737/ariana-grande-saturday-night-live-review/ |url-status=live }} {{Webarchive|url=https://web.archive.org/web/20190319213248/http://time.com/4257737/ariana-grande-saturday-night-live-review/ |date=March 19, 2019 }}</ref> some of which she had done on ''[[The Tonight Show Starring Jimmy Fallon]]''.<ref>{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-celebrity-impressions-watch-7256256/ |title=Watch All of Ariana Grande's Celebrity Impressions |last1=Iasimone |first1=Ashley |magazine=[[Billboard (magazine)|Billboard]] |date=March 13, 2016 |access-date=April 20, 2020 |archive-date=January 13, 2020 |archive-url=https://web.archive.org/web/20200113130800/https://www.billboard.com/articles/columns/pop/7256256/ariana-grande-celebrity-impressions-watch |url-status=live}}</ref>
[[File:Dangerous Woman Tour2.jpg|thumb|left|upright|Grande performing on the [[Dangerous Woman Tour]] in 2017]]
Grande released ''Dangerous Woman'' on May 20, 2016, which debuted at number two on the ''Billboard'' 200.<ref>{{cite magazine |last=Caulfield |first=Keith |url=https://www.billboard.com/pro/drake-views-no-1-on-billboard-200-album-chart-ariana-grande-blake-shelton/ |title=Drake's ''Views'' Still No. 1 on ''Billboard'' 200, Ariana Grande and Blake Shelton Debut at Nos. 2 & 3 |magazine=[[Billboard (magazine)|Billboard]] |date=May 29, 2016 |access-date=April 20, 2020 |archive-date=May 30, 2016 |archive-url=https://web.archive.org/web/20160530124854/https://www.billboard.com/articles/columns/chart-beat/7386082/drake-views-no-1-on-billboard-200-album-chart-ariana-grande-blake-shelton |url-status=live}}</ref> It also debuted at number two in Japan,<ref>{{cite web |url=http://www.oricon.co.jp/rank/ja/w/2016-05-30/ |title=週間 CDアルバムランキング: 2016年05月16日〜2016年05月22 |publisher=[[Oricon]] |archive-url=https://web.archive.org/web/20160525023530/http://www.oricon.co.jp/rank/ja/w/2016-05-30/ |archive-date=May 25, 2016}}</ref> and at number one in several other markets, including Australia, the Netherlands, Ireland, Italy, New Zealand and the UK.<ref>{{cite web |url=http://australian-charts.com/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |title=Ariana Grande – ''Dangerous Woman'' |website=australian-charts.com |access-date=May 29, 2016 |archive-date=May 4, 2019 |archive-url=https://web.archive.org/web/20190504013646/https://australian-charts.com/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |url-status=live}}; {{cite web |url=http://www.dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |title=Ariana Grande – ''Dangerous Woman'' |website=dutchcharts.nl |access-date=May 28, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319220316/https://dutchcharts.nl/showitem.asp?interpret=Ariana+Grande&titel=Dangerous+Woman&cat=a |url-status=live}}; {{cite web |url=http://www.chart-track.co.uk/index.jsp?c=p%2Fmusicvideo%2Fmusic%2Farchive%2Findex_test.jsp&ct=240002&arch=t&lyr=2016&year=2016&week=21 |title=Top 100 Artist Album, Week Ending 26 May 2016 |work=Irish Music Charts Archive |access-date=May 29, 2016 |archive-url=https://web.archive.org/web/20181116092852/http://www.chart-track.co.uk/index.jsp?c=p%2Fmusicvideo%2Fmusic%2Farchive%2Findex_test.jsp&ct=240002&arch=t&lyr=2016&year=2016&week=21 |archive-date=November 16, 2018 }}; {{cite web |url=http://www.fimi.it/classifiche#/category:album/id:2256 |title=Album – Classifica settimanale WK 21 |publisher=[[Federazione Industria Musicale Italiana]] |access-date=May 28, 2016 |language=it |archive-date=February 3, 2019 |archive-url=https://web.archive.org/web/20190203185228/http://www.fimi.it/classifiche#/category:album/id:2256 |url-status=live}}; {{cite web |url=https://aotearoamusiccharts.co.nz/archive/albums/2011-11-11 |title=New Zealand Top 40 Albums Chart |archive-url=https://www.webcitation.org/67eErXXv7?url=http://nztop40.co.nz/chart/albums |archive-date=May 14, 2012 |publisher=Recorded Music New Zealand |access-date=May 29, 2016}}</ref><ref>{{cite web |last1=White |first1=Jack |publisher=[[Official Charts Company]] |title=Ariana Grande scores first Number 1 album with Dangerous Woman |url=http://www.officialcharts.com/chart-news/ariana-grande-scores-first-number-1-album-with-dangerous-woman__15171 |date=May 27, 2016 |access-date=June 1, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213259/https://www.officialcharts.com/chart-news/ariana-grande-scores-first-number-1-album-with-dangerous-woman__15171/ |url-status=live}}</ref> Mark Savage, writing for ''BBC News'', called the album "a mature, confident record".<ref name="Savage"/> In August, Grande released a third single from the album, "[[Side to Side]]", featuring rapper [[Nicki Minaj]], her eighth top ten entry on the Hot 100, which peaked at number four on that chart.<ref>{{cite magazine |url=https://www.billboard.com/charts/hot-100/2016-12-03 |title=The Hot 100: The Week of December 3, 2016 |magazine=[[Billboard (magazine)|Billboard]] |date=November 23, 2016 |access-date=April 20, 2020 |archive-date=August 12, 2020 |archive-url=https://web.archive.org/web/20200812162501/https://www.billboard.com/charts/hot-100/2016-12-03 |url-status=live}}</ref> ''Dangerous Woman'' was nominated for [[Grammy Award for Best Pop Vocal Album]] and the title track for [[Best Pop Solo Performance]].<ref name="GrammyNoms2017">{{cite magazine |url=https://www.billboard.com/articles/news/7597556/grammys-nominees-complete-list-2017 |title=Here Is the Complete List of Nominees for the 2017 Grammys |magazine=[[Billboard (magazine)|Billboard]] |date=December 6, 2016 |access-date=April 20, 2020 |archive-date=December 6, 2016 |archive-url=https://web.archive.org/web/20161206151125/http://www.billboard.com/articles/news/7597556/grammys-nominees-complete-list-2017 |url-status=live}}</ref>
Aside from music, Grande played Penny Pingleton in the NBC television broadcast ''[[Hairspray Live!]]'', which aired in December 2016.<ref>{{cite magazine |last=Saraiya |first=Sonia |url=https://variety.com/2016/tv/reviews/tv-review-hairspray-live-jennifer-hudson-ariana-grande-1201936567 |title=TV Review: ''Hairspray Live!'' |magazine=Variety |date=December 7, 2016 |access-date=December 10, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213944/https://variety.com/2016/tv/reviews/tv-review-hairspray-live-jennifer-hudson-ariana-grande-1201936567/ |url-status=live}}</ref> Grande recorded [[Beauty and the Beast (Disney song)#Ariana Grande and John Legend version|the title track]] of the soundtrack for the [[Beauty and the Beast (2017 film)|2017 live-action remake]] of Disney's 1991 animated film ''[[Beauty and the Beast (1991 film)|Beauty and the Beast]]''. The recording was released as a duet with American singer [[John Legend]] in February 2017.<ref>{{cite web |last=Stutz |first=Colin |url=https://www.hollywoodreporter.com/news/ariana-grande-john-legend-record-beauty-beast-duet-disney-film-963725 |title=Ariana Grande and John Legend to Record 'Beauty and the Beast' Duet for Disney Film |work=[[The Hollywood Reporter]] |date=January 11, 2017 |access-date=March 31, 2021 |archive-date=April 22, 2021 |archive-url=https://web.archive.org/web/20210422142238/https://www.hollywoodreporter.com/news/ariana-grande-john-legend-record-beauty-beast-duet-disney-film-963725 |url-status=live}}</ref> The same month, Grande embarked on her third concert tour, the [[Dangerous Woman Tour]], to promote the album.<ref>{{cite web |last=Kelemen |first=Matt |url=https://lasvegasmagazine.com/entertainment/2017/jan/27/ariana-grande-mgm-grand |title=Ariana Grande Is a Dangerous Talent |work=Las Vegas |date=January 27, 2017 |access-date=January 28, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213301/https://lasvegasmagazine.com/entertainment/2017/jan/27/ariana-grande-mgm-grand/ |url-status=live}}</ref>
On May 22, 2017, [[Manchester Arena bombing|her concert]] at [[Manchester Arena]] was the target of a [[suicide bombing]]. An [[Islamic extremist]], motivated by [[Muslim]] casualties from [[American-led intervention in the Syrian Civil War|US intervention in the Syrian Civil War]], detonated a [[nail bomb|shrapnel-laden]] [[homemade bomb]] as people were leaving the arena. The [[Manchester Arena bombing]], which occurred at the City Room, caused 22 deaths and injured over a thousand more. Grande suspended the remainder of the tour and held a televised benefit concert, [[One Love Manchester]], on June 4,<ref>{{cite web |url=https://www.hollywoodreporter.com/news/ariana-grandes-manchester-benefit-concert-draws-biggest-uk-tv-audience-2017-1010106 |title=Ariana Grande's Manchester Benefit Concert Draws Biggest U.K. TV Audience of 2017 |work=The Hollywood Reporter |date=June 5, 2017 |access-date=June 5, 2017 |archive-date=April 25, 2021 |archive-url=https://web.archive.org/web/20210425053824/https://www.hollywoodreporter.com/news/ariana-grandes-manchester-benefit-concert-draws-biggest-uk-tv-audience-2017-1010106 |url-status=live}}</ref> helping to raise $23 million to aid the bombing's victims and affected families.<ref name="FundsRaised">{{cite magazine |last=Blistein |first=Jon |url=https://www.rollingstone.com/music/news/families-of-ariana-grande-concert-attack-victims-to-receive-324000-w498012 |title=Families of Ariana Grande Concert Attack Victims to Receive $324,000 |magazine=[[Rolling Stone]] |date=August 15, 2017 |access-date=August 24, 2017 |archive-date=June 16, 2018 |archive-url=https://web.archive.org/web/20180616230556/https://www.rollingstone.com/music/news/families-of-ariana-grande-concert-attack-victims-to-receive-324000-w498012 }}</ref> The concert featured performances from Grande, as well as [[Liam Gallagher]], [[Robbie Williams]], [[Justin Bieber]], [[Katy Perry]], [[Miley Cyrus]] and other artists.<ref>{{cite magazine |last=Smirke |first=Richard |url=https://www.billboard.com/music/pop/one-love-manchester-concert-ariana-grande-bravery-resilience-7817617/ |title=Bravery, Resilience Shine as Ariana Grande Leads All-Star Benefit Concert for Victims of Manchester Bombing |magazine=[[Billboard (magazine)|Billboard]] |date=June 4, 2017 |access-date=April 20, 2020 |archive-date=April 22, 2021 |archive-url=https://web.archive.org/web/20210422142238/https://www.billboard.com/articles/columns/pop/7817617/one-love-manchester-concert-ariana-grande-bravery-resilience |url-status=live}}</ref> To recognize her efforts, the [[Manchester City Council]] named Grande the first [[honorary citizen]] of [[Manchester]]<ref>{{cite web |last=Macguire |first=Eoghan |url=https://www.nbcnews.com/storyline/manchester-concert-explosion/manchester-names-ariana-grande-honorary-citizen-n781711 |title=Manchester Names Ariana Grande Honorary Citizen |publisher=NBC News |date=July 12, 2017 |access-date=April 20, 2020 |archive-date=August 7, 2020 |archive-url=https://web.archive.org/web/20200807051027/https://www.nbcnews.com/storyline/manchester-concert-explosion/manchester-names-ariana-grande-honorary-citizen-n781711 |url-status=live}}</ref><ref name="FundsRaised"/> and, later in the year, she was reported to have declined an honorary UK [[dame]]hood. The tour resumed on June 7 in Paris and ended in September 2017.<ref>{{cite web |last=Lynch |first=Jess |url=http://www.cosmopolitan.com.au/celebrity/ariana-grande-resumes-dangerous-woman-world-tour-22609 |title=Ariana Grande proves she's an unstoppable force as she resumes her world tour |work=[[Cosmopolitan (magazine)|Cosmopolitan]] |date=June 7, 2017 |access-date=June 8, 2017 |archive-url=https://web.archive.org/web/20170608060705/http://www.cosmopolitan.com.au/celebrity/ariana-grande-resumes-dangerous-woman-world-tour-22609 |archive-date=June 8, 2017 }}; and {{cite web |last=Gonzalez |first=Sandra |url=http://www.cnn.com/2017/06/07/entertainment/ariana-grande-tour-resumes |title=Ariana Grande honors 'angels' as tour resumes |publisher=CNN |date=June 7, 2017 |access-date=June 7, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319215158/https://www.cnn.com/2017/06/07/entertainment/ariana-grande-tour-resumes |url-status=live}}; and {{cite magazine |url=https://www.billboard.com/articles/news/international/7949934/ariana-grande-first-tour-mainland-china |title=Ariana Grande Wraps Up First Tour of Mainland China |last=[[Billboard (magazine)|Billboard]] |magazine=[[Billboard (magazine)|Billboard]] |date=September 1, 2017 |access-date=April 20, 2020 |archive-date=April 27, 2021 |archive-url=https://web.archive.org/web/20210427032405/https://www.billboard.com/articles/news/international/7949934/ariana-grande-first-tour-mainland-china |url-status=live}}</ref><ref>{{cite web |last=Lakshmin |first=Deepa |url=http://www.mtv.com/news/3037300/ariana-grande-goodbye-dangerous-woman-tour |title=Ariana Grande Wrote A Beautiful Goodbye Note To Her Dangerous Woman Tour |publisher=[[MTV]] |date=September 21, 2017 |access-date=September 22, 2017 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184557/http://www.mtv.com/news/3037300/ariana-grande-goodbye-dangerous-woman-tour/ }}</ref>
In August 2017, Grande appeared in an [[Apple Music]] ''[[Carpool Karaoke]]'' episode, singing [[musical theatre]] songs with American entertainer [[Seth MacFarlane]].<ref name="Carpool">{{cite web |last=Fierberg |first=Ruthie |url=http://www.playbill.com/article/ariana-grande-and-seth-macfarlane-sing-little-shops-suddenly-seymour-on-carpool-karaoke |title=Ariana Grande and Seth MacFarlane Sing ''Little Shop's'' 'Suddenly Seymour' on ''Carpool Karaoke'' |work=[[People (magazine)|People]] |date=August 22, 2017 |access-date=August 23, 2017 |archive-date=September 7, 2019 |archive-url=https://web.archive.org/web/20190907084955/http://www.playbill.com/article/ariana-grande-and-seth-macfarlane-sing-little-shops-suddenly-seymour-on-carpool-karaoke |url-status=live}}</ref> In December 2017, ''[[Billboard (magazine)|Billboard]]'' magazine named her "Female Artist of the Year".<ref>{{cite web |last=McNeilage |first=Ross |url=https://www.mtv.co.uk/news/8pbxid/ariana-grande-is-billboards-female-artist-of-the-year |title=Ariana Grande Is Billboard's Female Artist of the Year |publisher=[[MTV]] |date=December 2, 2017 |access-date=December 13, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213256/http://www.mtv.co.uk/ariana-grande/news/ariana-grande-is-billboards-female-artist-of-the-year |url-status=live}}</ref>
Grande began working on songs for her fourth studio album, ''[[Sweetener (album)|Sweetener]]'' with [[Pharrell Williams]] in 2016.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/8470827/pharrell-on-working-with-ariana-grande-on-sweetener |title=Pharrell on Working With Ariana Grande on 'Sweetener': 'She Really Unzipped' |date=August 17, 2018 |access-date=September 20, 2018 |first=Rania |last=Aniftos |magazine=[[Billboard (magazine)|Billboard]] |archive-date=September 12, 2019 |archive-url=https://web.archive.org/web/20190912234835/https://www.billboard.com/articles/news/8470827/pharrell-on-working-with-ariana-grande-on-sweetener |url-status=live}}</ref> Grande released "[[No Tears Left to Cry]]" as the lead single from ''Sweetener'' in April 2018,<ref>{{cite magazine |last=Reed |first=Ryan |url=https://www.rollingstone.com/music/news/hear-ariana-grandes-uplifting-new-song-no-tears-left-to-cry-w519323 |title=Hear Ariana Grande's Uplifting New Song 'No Tears Left to Cry' |magazine=[[Rolling Stone]] |date=April 20, 2018 |access-date=April 20, 2018 |archive-date=June 12, 2018 |archive-url=https://web.archive.org/web/20180612140413/https://www.rollingstone.com/music/news/hear-ariana-grandes-uplifting-new-song-no-tears-left-to-cry-w519323 }}</ref> with the song debuting at number three on the ''Billboard'' Hot 100, making Grande the only artist to have debuted the lead single of her first four albums in the top ten of the Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |url=https://www.billboard.com/pro/drake-nice-for-what-hot-100-number-one-ariana-grande-j-cole/ |title=Drake Leads ''Billboard'' Hot 100, Ariana Grande Arrives at No. 3 & J. Cole Collects Record Three Debuts in Top 10 |magazine=[[Billboard (magazine)|Billboard]] |date=April 30, 2018 |access-date=May 1, 2018 |archive-date=March 29, 2019 |archive-url=https://web.archive.org/web/20190329054545/https://www.billboard.com/articles/columns/chart-beat/8412480/drake-nice-for-what-hot-100-number-one-ariana-grande-j-cole |url-status=live}}</ref><ref>{{cite web |last=Nelson |first=Jeff |url=https://people.com/music/ariana-grande-the-light-is-coming-music-video-nicki-minaj |title=Ariana Grande Drops 'The Light Is Coming' Video, Frolics in the Woods with Nicki Minaj |work=[[People (magazine)|People]] |date=June 20, 2018 |access-date=June 20, 2018 |archive-date=June 28, 2019 |archive-url=https://web.archive.org/web/20190628170338/https://people.com/music/ariana-grande-the-light-is-coming-music-video-nicki-minaj/ |url-status=live}}</ref> In June 2018, she was featured in "[[Bed (Nicki Minaj song)|Bed]]", the second single from [[Nicki Minaj]]'s fourth studio album ''[[Queen (Nicki Minaj album)|Queen]]''.<ref>{{cite web |last=Kiefer |first=Halle |url=https://www.teenvogue.com/story/ariana-grande-nicki-minaj-just-released-their-new-single-bed |title=Ariana Grande and Nicki Minaj Just Released Their New Single, "Bed" |work=Teen Vogue |date=June 14, 2018 |access-date=October 18, 2020 |archive-date=September 28, 2020 |archive-url=https://web.archive.org/web/20200928202534/https://www.teenvogue.com/story/ariana-grande-nicki-minaj-just-released-their-new-single-bed |url-status=live}}</ref> The same month, she was featured on [[Troye Sivan]]'s single "[[Dance to This]]" from his sophomore album [[Bloom (Troye Sivan album)|''Bloom'']]. The second single, "[[God Is a Woman]]",<ref>{{cite web |last=Kiefer |first=Halle |url=https://www.vulture.com/2018/07/listen-to-ariana-grandes-new-song-god-is-a-woman.html |title=Listen to Ariana Grande's New Song 'God is a woman' |work=Vulture |date=July 13, 2018 |access-date=July 13, 2018 |archive-date=July 13, 2018 |archive-url=https://web.archive.org/web/20180713072630/http://www.vulture.com/2018/07/listen-to-ariana-grandes-new-song-god-is-a-woman.html |url-status=live}}</ref><ref>{{cite magazine |last=Whittum |first=Connor |url=https://www.billboard.com/articles/news/8465375/ariana-grande-epic-god-is-a-woman-video-decoded |title=Ariana Grande's Epic 'God Is a Woman' Video, Decoded |magazine=[[Billboard (magazine)|Billboard]] |date=July 13, 2018 |access-date=July 13, 2018 |archive-date=June 8, 2019 |archive-url=https://web.archive.org/web/20190608205133/https://www.billboard.com/articles/news/8465375/ariana-grande-epic-god-is-a-woman-video-decoded |url-status=live}}</ref> peaked at number 8 on the Hot 100 and became Grande's tenth top ten single in the US.<ref name=10thArianaBB>{{cite magazine |last=Zellner |first=Xander |url=https://www.billboard.com/pro/ariana-grande-10th-top-10-hit-10-songs-billboard-hot-100-chart/ |title=Ariana Grande Earns 10th Top 10 Hit, Lands 10 Songs on ''Billboard'' Hot 100 |magazine=[[Billboard (magazine)|Billboard]] |date=August 27, 2018 |access-date=August 27, 2018 |archive-date=June 14, 2019 |archive-url=https://web.archive.org/web/20190614121011/https://www.billboard.com/articles/columns/chart-beat/8472538/ariana-grande-10th-top-10-hit-10-songs-billboard-hot-100-chart |url-status=live}}</ref> Released in August 2018,<ref>{{cite magazine |last=Blistein |first=Jon |url=https://www.rollingstone.com/music/news/hear-ariana-grande-tap-nicki-minaj-for-snappy-the-light-is-coming-w521757 |title=Hear Ariana Grande Tap Nicki Minaj for Snappy 'The Light Is Coming' |magazine=[[Rolling Stone]] |date=June 20, 2018 |access-date=June 20, 2018 |archive-date=June 20, 2018 |archive-url=https://web.archive.org/web/20180620074213/https://www.rollingstone.com/music/news/hear-ariana-grande-tap-nicki-minaj-for-snappy-the-light-is-coming-w521757 }}; {{cite magazine |url=https://www.billboard.com/articles/news/8461868/ariana-grande-the-light-is-coming-featuring-nicki-minaj-stream |title=Ariana Grande Switches on 'The Light Is Coming' Featuring Nicki Minaj: Stream It Here |magazine=[[Billboard (magazine)|Billboard]] |date=June 20, 2018 |access-date=June 20, 2018 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319224851/https://www.billboard.com/articles/news/8461868/ariana-grande-the-light-is-coming-featuring-nicki-minaj-stream |url-status=live}}</ref> ''Sweetener'' debuted at number one on the ''Billboard'' 200<ref>{{cite magazine |last=Kreps |first=Daniel |url=https://www.rollingstone.com/music/music-news/on-the-charts-ariana-grandes-sweetener-opens-at-number-one-715957 |title=On the Charts: Ariana Grande's ''Sweetener'' Opens at Number One |magazine=[[Rolling Stone]] |date=August 26, 2018 |access-date=August 26, 2018 |archive-date=September 19, 2019 |archive-url=https://web.archive.org/web/20190919233603/https://www.rollingstone.com/music/music-news/on-the-charts-ariana-grandes-sweetener-opens-at-number-one-715957/ |url-status=live}}</ref> and received acclaim from critics.<ref>{{cite web |url=https://www.metacritic.com/music/sweetener/ariana-grande |title=Reviews for Sweetener by Ariana Grande |publisher=[[Metacritic]] |access-date=August 28, 2018 |archive-date=July 13, 2022 |archive-url=https://web.archive.org/web/20220713142434/https://www.metacritic.com/music/sweetener/ariana-grande |url-status=live}}</ref> She simultaneously charted nine songs from the album on the Hot 100, along with a collaboration, making her the fourth female artist to reach the ten-song mark.<ref name=10thArianaBB/> Grande gave four concerts to promote the album, billed as [[The Sweetener Sessions]], in New York City, Chicago, Los Angeles, and London between August 20 and September 4, 2018.<ref>{{cite magazine |last=Legaspi |first=Althea |url=https://www.rollingstone.com/music/music-news/ariana-grande-details-intimate-sweetener-sessions-concerts-708392 |title=Ariana Grande Details Intimate ''Sweetener Sessions'' Concerts |magazine=[[Rolling Stone]] |date=August 8, 2018 |access-date=August 22, 2018 |archive-date=June 29, 2019 |archive-url=https://web.archive.org/web/20190629161609/https://www.rollingstone.com/music/music-news/ariana-grande-details-intimate-sweetener-sessions-concerts-708392/ }}</ref> In October 2018, Grande participated in the NBC broadcast, ''[[A Very Wicked Halloween]]'', singing "[[The Wizard and I]]" from the musical ''[[Wicked (musical)|Wicked]]''.<ref>{{cite magazine |last=Lenker |first=Maureen Lee |url=https://ew.com/tv/2018/10/29/the-5-best-moments-in-a-very-wicked-halloween |title=The 5 best moments in ''A Very Wicked Halloween'' |magazine=Entertainment Weekly |date=October 29, 2018 |access-date=October 30, 2018 |archive-date=July 31, 2019 |archive-url=https://web.archive.org/web/20190731222946/https://ew.com/tv/2018/10/29/the-5-best-moments-in-a-very-wicked-halloween/ |url-status=live}}</ref> The following month, the BBC aired a one-hour special, ''[[Ariana Grande at the BBC]]'', featuring interviews and performances.<ref>{{cite web |last=Blair |first=Olivia |url=https://www.cosmopolitan.com/uk/entertainment/a24255798/ariana-grande-bbc-special |title=Ariana Grande has a one hour special airing on the BBC this week and it's a dream |website=Cosmopolitan |date=October 29, 2018 |access-date=October 30, 2018 |archive-date=November 2, 2019 |archive-url=https://web.archive.org/web/20191102012807/https://www.cosmopolitan.com/uk/entertainment/a24255798/ariana-grande-bbc-special/ |url-status=live}}</ref><ref name="AtTheBBC">{{cite web |last=Sporn |first=Natasha |url=https://www.standard.co.uk/stayingin/tvfilm/ariana-grande-at-the-bbc-why-davina-mccall-s-chat-with-star-is-a-must-watch-a3978191.html |title=Ariana Grande at the BBC: Why Davina McCall's chat with star is a must watch |website=Evening Standard |date=November 1, 2018 |access-date=November 2, 2018 |archive-date=June 5, 2019 |archive-url=https://web.archive.org/web/20190605060909/https://www.standard.co.uk/stayingin/tvfilm/ariana-grande-at-the-bbc-why-davina-mccall-s-chat-with-star-is-a-must-watch-a3978191.html |url-status=live}}</ref>
[[File:Ariana Grande - God Is A Woman VMA 2018 2.jpg|thumb|Grande performs "God Is A Woman" at the [[2018 MTV Video Music Awards]] in New York City.]]
=== 2018–2019: ''Thank U, Next'' ===
{{Main|Thank U, Next (album)|l1=''Thank U, Next'' (album)}}
In November 2018, Grande released the single "[[Thank U, Next (song)|Thank U, Next]]" and announced her [[Thank U, Next|fifth studio album of the same name]].<ref>{{cite magazine |url=https://www.billboard.com/articles/news/8483065/ariana-grande-new-album-thank-u-next |title=Ariana Grande Teases New Album 'Thank U, Next' |last=Stiernberg |first=Bonnie |date=November 3, 2018 |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 3, 2018 |archive-date=June 12, 2019 |archive-url=https://web.archive.org/web/20190612072957/https://www.billboard.com/articles/news/8483065/ariana-grande-new-album-thank-u-next |url-status=live}}</ref><ref>{{cite web |url=https://itunes.apple.com/us/album/thank-u-next/1441178207 |title=thank u, next – Single by Ariana Grande |date=November 3, 2018 |publisher=iTunes Store |access-date=November 4, 2018 |archive-date=November 4, 2018 |archive-url=https://web.archive.org/web/20181104135935/https://itunes.apple.com/us/album/thank-u-next/1441178207 }}</ref> The song debuted at number one on the ''Billboard'' Hot 100, becoming Grande's first chart-topping single in the United States, spending seven non-consecutive weeks atop.<ref>{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-thank-u-next-hot-100-first-number-one-debut/ |title=Ariana Grande Achieves First Billboard Hot 100 No. 1 as 'Thank U, Next' Debuts on Top |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 13, 2018 |archive-date=March 20, 2019 |archive-url=https://web.archive.org/web/20190320011137/https://www.billboard.com/articles/columns/chart-beat/8484401/ariana-grande-thank-u-next-hot-100-first-number-one-debut |url-status=live}}</ref><ref>{{cite magazine |url=https://www.billboard.com/artist/ariana-grande/chart-history/hsi/ |title=Chart History Ariana Grande |magazine=[[Billboard (magazine)|Billboard]] |access-date=February 2, 2020 |archive-date=November 22, 2021 |archive-url=https://web.archive.org/web/20211122194105/https://www.billboard.com/artist/ariana-grande/chart-history/hsi/ |url-status=live}}</ref> Since then, it has been certified eight-times platinum in the United States;<ref>{{cite news |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U,+Next#search_section |title=Gold & Platinum – Ariana Grande – Thank U, Next |publisher=Recording Industry Association of America |access-date=November 29, 2018 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184551/https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U,+Next#search_section |url-status=live}}</ref> the song's music video broke records for most-watched music video on YouTube within 24 hours of release<ref>{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-thank-u-next-biggest-music-video-debut-youtube-8488652/ |title=Ariana Grande's 'Thank U, Next' Has the Biggest Music Video Debut in YouTube History |magazine=[[Billboard (magazine)|Billboard]] |access-date=December 9, 2018 |archive-date=December 5, 2018 |archive-url=https://web.archive.org/web/20181205054721/https://www.billboard.com/articles/columns/pop/8488652/ariana-grande-thank-u-next-biggest-music-video-debut-youtube |url-status=live}}</ref> and fastest Vevo video to reach 100 million views on YouTube, at the time.<ref>{{cite news |url=https://www.reuters.com/article/us-music-ariana-grande-idUSKBN1O32FZ |title=Grande's 'thank u, next' bests Adele to fastest 100 million views |date=December 4, 2018 |work=Reuters |access-date=December 4, 2018 |archive-date=December 5, 2018 |archive-url=https://web.archive.org/web/20181205003529/https://www.reuters.com/article/us-music-ariana-grande-idUSKBN1O32FZ |url-status=live}}</ref> On [[Spotify]], it became the fastest song to reach 100 million streams (11 days) and most-streamed song by a female artist in a 24-hour period, with 9.6 million streams, before being surpassed by her own "[[7 Rings]]" (nearly 15 million streams).<ref>{{cite news |url=https://www.thefader.com/2018/11/15/ariana-grande-100m-spotify-streams-thank-u-next |title=Ariana Grande breaks 100 m Spotify streams record with "thank u, next" |work=[[Fader (magazine)|Fader]] |access-date=December 13, 2018 |archive-date=July 26, 2020 |archive-url=https://web.archive.org/web/20200726083850/https://www.thefader.com/2018/11/15/ariana-grande-100m-spotify-streams-thank-u-next |url-status=live}}</ref> "Thank U, Next" was the most-streamed song by a woman globally on [[Apple Music]] in 2019.<ref name="moststreamed2010s2">{{cite web |last=Amatulli |first=Jenna |date=December 3, 2019 |title=Ariana Grande Was The Most Streamed Female Artist Of The 2010s |url=https://www.huffpost.com/entry/ariana-grande-spotify-most-streamed-artist_n_5de6cd6ae4b0d50f32aa59af |access-date=June 19, 2020 |work=[[HuffPost]] |archive-date=May 22, 2020 |archive-url=https://web.archive.org/web/20200522200642/https://www.huffpost.com/entry/ariana-grande-spotify-most-streamed-artist_n_5de6cd6ae4b0d50f32aa59af |url-status=live}}</ref>
Grande released, in collaboration with [[YouTube]], a four-part docuseries titled ''[[Ariana Grande: Dangerous Woman Diaries]]''. It shows behind the scenes and concert footage from Grande's [[Dangerous Woman Tour]], including moments from the [[One Love Manchester]] concert, and follows her professional life during the tour and the making of ''Sweetener''. The series debuted on November 29, 2018.<ref>{{cite magazine |url=https://www.hollywoodreporter.com/live-feed/ariana-grande-docuseries-dangerous-woman-diaries-stream-youtube-1164416 |title=Ariana Grande Docuseries to Stream on YouTube |last=Jarvey |first=Natalie |magazine=The Hollywood Reporter |date=November 28, 2018 |access-date=November 29, 2018 |archive-date=November 29, 2018 |archive-url=https://web.archive.org/web/20181129011939/https://www.hollywoodreporter.com/live-feed/ariana-grande-docuseries-dangerous-woman-diaries-stream-youtube-1164416 |url-status=live}}</ref> By the end of the year, she became the most-streamed female artist on Spotify,<ref>{{cite magazine |url=https://www.billboard.com/music/music-news/spotify-2018-wrapped-most-streamed-stats-drake-ariana-grande-8488027/ |title=Spotify Announces 2018 'Wrapped' Most Streamed Stats: Drake & Ariana Grande Top the List |magazine=[[Billboard (magazine)|Billboard]] |date=December 4, 2022 |access-date=January 5, 2022 |archive-date=January 5, 2022 |archive-url=https://web.archive.org/web/20220105152631/https://www.billboard.com/music/music-news/spotify-2018-wrapped-most-streamed-stats-drake-ariana-grande-8488027/ |url-status=live}}</ref> and was named [[Billboard Women in Music|''Billboard''<nowiki/>'s Woman of the Year]]. In January 2019, it was announced that Grande would be headlining the [[Coachella Valley Music and Arts Festival]],<ref>{{cite web |url=https://pitchfork.com/news/coachella-announces-2019-lineup-one-artist-at-a-time/ |title=Coachella 2019: Full Lineup Announced |website=Pitchfork |date=January 2, 2019 |access-date=January 3, 2019 |archive-date=July 4, 2019 |archive-url=https://web.archive.org/web/20190704125803/https://pitchfork.com/news/coachella-announces-2019-lineup-one-artist-at-a-time/ |url-status=live}}</ref> where she became the youngest and the fourth female artist ever to headline the festival.<ref>{{cite web |url=https://www.elle.com/culture/celebrities/a25734322/ariana-grande-coachella-headliner/ |title=Ariana Grande Is Making History at Coachella This Year |website=[[Elle (magazine)|Elle]] |date=January 3, 2019 |access-date=January 3, 2019 |archive-date=August 16, 2019 |archive-url=https://web.archive.org/web/20190816000941/https://www.elle.com/culture/celebrities/a25734322/ariana-grande-coachella-headliner/ |url-status=live}}</ref> Grande brought a number of guest artists to perform with her, including [[NSYNC]], [[P. Diddy]], [[Nicki Minaj]], and [[Justin Bieber]]. Her set received critical acclaim.<ref>{{cite web |url=https://jezebel.com/ariana-grande-reportedly-raked-in-8-million-from-coach-1834063930 |title=Ariana Grande Reportedly Raked in $8 Million from Coachella |website=Jezebel |date=April 15, 2019 |access-date=June 18, 2019 |archive-date=August 22, 2019 |archive-url=https://web.archive.org/web/20190822224749/https://jezebel.com/ariana-grande-reportedly-raked-in-8-million-from-coach-1834063930 |url-status=live}}</ref><ref>{{cite web |url=https://pitchfork.com/news/watch-ariana-grande-bring-out-justin-bieber-at-coachella-2019/ |title=Watch Ariana Grande Bring Out Justin Bieber at Coachella 2019 |website=Pitchfork |date=April 22, 2019 |access-date=June 18, 2019 |archive-date=March 2, 2020 |archive-url=https://web.archive.org/web/20200302231206/https://pitchfork.com/news/watch-ariana-grande-bring-out-justin-bieber-at-coachella-2019/ |url-status=live}}</ref>
Grande's second single from ''Thank U, Next'', "[[7 Rings]]", was released on January 18, 2019, and debuted at number one on the ''Billboard'' Hot 100 issue dated February 2, becoming her second single in a row (and overall) to top the charts.<ref>{{cite web |url=https://www.mtv.co.uk/news/3ppkql/ariana-grande-breaks-her-own-record-again-with-7-rings |title=Ariana Grande breaks her own record (again) with '7 Rings' |date=January 19, 2019 |website=[[MTV]] UK |access-date=January 26, 2019 |archive-date=January 20, 2019 |archive-url=https://web.archive.org/web/20190120062405/http://www.mtv.co.uk/ariana-grande/news/ariana-grande-breaks-her-own-record-again-with-7-rings |url-status=live}}</ref> It made Grande the third female artist with multiple number-one debuts after Mariah Carey (3) and [[Britney Spears]] (2) and fifth artist overall after [[Justin Bieber]] and [[Drake (musician)|Drake]].<ref>{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-7-rings-hot-100-number-one-debut/ |title=Ariana Grande's '7 Rings' Soars In at No. 1 on Billboard Hot 100 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 29, 2019 |archive-date=January 27, 2020 |archive-url=https://web.archive.org/web/20200127072053/https://www.billboard.com/articles/columns/chart-beat/8495202/ariana-grande-7-rings-hot-100-number-one-debut |url-status=live}}</ref> Spending eight non-consecutive weeks at the summit, it became Grande's most successful song on the chart<ref>{{Cite magazine |last=Anderson |first=Trevor |date=June 26, 2024 |title=Ariana Grande's Biggest ''Billboard'' Hot 100 Hits |url=https://www.billboard.com/lists/ariana-grande-biggest-hits-hot-100/ |access-date=October 26, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 12, 2024 |archive-url=https://web.archive.org/web/20241212113751/https://www.billboard.com/lists/ariana-grande-biggest-hits-hot-100/ |url-status=live}}</ref> and was certified diamond in the US.<ref>{{Cite web |title=American single certifications – Ariana Grande – 7 Rings |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=7+Rings&format=Single&type=#search_section |access-date=August 26, 2024 |publisher=[[Recording Industry Association of America]] |archive-date=October 15, 2024 |archive-url=https://web.archive.org/web/20241015211936/https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=7+Rings&format=Single&type=#search_section |url-status=live}}</ref> "7 Rings" became 2019's fifth-best-selling song globally, and one of the [[List of best-selling singles|best-selling digital singles worldwide]].<ref>{{cite magazine |last=Cirisano |first=Tatiana |date=March 10, 2020 |title=Billie Eilish's 'Bad Guy' Named IFPI's Biggest Global Single of 2019 |url=http://www.billboard.com/articles/news/international/9331529/billie-eilish-bad-guy-ifpi-global-single-2019-list |access-date=August 26, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 11, 2020 |archive-url=https://web.archive.org/web/20200311104939/https://www.billboard.com/articles/news/international/9331529/billie-eilish-bad-guy-ifpi-global-single-2019-list |url-status=live}}</ref> ''Thank U, Next'' was released on February 8, 2019, and debuted at number one on the [[Billboard 200|''Billboard'' 200]] while receiving acclaim from critics.<ref name="Metacritic">{{cite web |url=https://www.metacritic.com/music/thank-u-next/ariana-grande |title=Reviews for thank u, next by Ariana Grande |publisher=[[Metacritic]] |access-date=February 11, 2019 |archive-date=March 21, 2019 |archive-url=https://web.archive.org/web/20190321113505/https://www.metacritic.com/music/thank-u-next/ariana-grande |url-status=live}}</ref> The album garnered Grande's largest sales week of all time in the United States (360,000 album-equivalent units).<ref name="BB2002">{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-thank-u-next-debuts-at-no-1-on-billboard-200-chart-album/ |title=Ariana Grande's 'Thank U, Next' Debuts at No. 1 on Billboard 200 Chart With Biggest Streaming Week Ever for a Pop Album |magazine=[[Billboard (magazine)|Billboard]] |last=Caulfield |first=Keith |date=February 17, 2019 |access-date=February 18, 2019 |archive-date=January 5, 2020 |archive-url=https://web.archive.org/web/20200105210938/https://www.billboard.com/articles/columns/chart-beat/8498762/ariana-grande-thank-u-next-debuts-at-no-1-on-billboard-200-chart-album |url-status=live}}</ref> Her fourth number-one album, and second in less than six months, it marked the shortest gap between number-one albums for a woman at the time. ''Thank U, Next'' broke records for the largest streaming week for a pop album and for a female album in the US, with 307 million on-demand streams.<ref name="BB2002"/> At the time, it was the only non-hip hop title among the twenty largest US album streaming weeks, at number eight.<ref name="BB2002"/> The album also achieved the largest streaming week by a female artist in Canada and the United Kingdom.<ref>{{cite web |last=Copsey |first=Rob |date=February 15, 2019 |title=Ariana Grande scores a record-breaking week with Thank U, Next on the Official Chart |url=https://www.officialcharts.com/chart-news/ariana-grande-scores-a-record-breaking-week-with-thank-u-next-on-the-official-chart__25567/ |access-date=October 10, 2024 |publisher=[[Official Charts Company]] |archive-date=February 16, 2019 |archive-url=https://web.archive.org/web/20190216094129/https://www.officialcharts.com/chart-news/ariana-grande-scores-a-record-breaking-week-with-thank-u-next-on-the-official-chart__25567/ |url-status=live}}</ref><ref>{{cite web |title=2019 Nielsen Music/MRC Data Canada Year-End Report |url=https://static.billboard.com/files/pdfs/NIELSEN_2019_YEARENDreportCANADA.pdf |url-status=live |archive-url=https://web.archive.org/web/20200402131151/https://static.billboard.com/files/pdfs/NIELSEN_2019_YEARENDreportCANADA.pdf |archive-date=April 2, 2020 |access-date=April 2, 2020 |publisher=[[Nielsen Holdings|Nielsen]]}}</ref> In June 2020, ''Thank U, Next'' was certified double platinum by the RIAA.<ref>{{Cite web |title=American album certifications – Ariana Grande – Thank U, Next |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U%2C+Next&format=Album&type=#search_section |access-date=October 10, 2024 |publisher=[[Recording Industry Association of America]] |archive-date=December 13, 2024 |archive-url=https://web.archive.org/web/20241213225131/https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=Ariana+Grande&ti=Thank+U%2C+Next&format=Album&type=#search_section |url-status=live}}</ref>
Grande became the first solo artist to occupy the top three spots on the ''Billboard'' Hot 100 with "7 Rings" at number one, her third single "[[Break Up with Your Girlfriend, I'm Bored]]" debuting at number two, and her lead single "Thank U, Next" rose to number three, and the overall second artist to do so since [[the Beatles]] did in 1964 when they occupied the top five spots.<ref name="B19">{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-top-3-spots-hot-100/ |title=Ariana Grande Claims Nos. 1, 2 & 3 on Billboard Hot 100, Is First Act to Achieve the Feat Since The Beatles in 1964 |magazine=[[Billboard (magazine)|Billboard]] |last=Trust |first=Gary |date=February 19, 2019 |access-date=February 19, 2019 |archive-date=April 5, 2019 |archive-url=https://web.archive.org/web/20190405153906/https://www.billboard.com/articles/columns/chart-beat/8498841/ariana-grande-top-3-spots-hot-100 |url-status=live}}</ref> In the United Kingdom, Grande became the second female solo artist to simultaneously hold the number one and two spots and the first musical artist to replace herself at number one, twice consecutively.<ref>{{cite web |url=https://www.independent.co.uk/arts-entertainment/music/ariana-grande-chart-uk-thank-u-next-new-album-break-up-girlfriend-bored-a8781931.html |title=Ariana Grande just made UK chart history |date=February 15, 2019 |website=The Independent |access-date=February 28, 2019 |archive-date=March 18, 2020 |archive-url=https://web.archive.org/web/20200318185225/https://www.independent.co.uk/arts-entertainment/music/ariana-grande-chart-uk-thank-u-next-new-album-break-up-girlfriend-bored-a8781931.html |url-status=live}}</ref> With eleven ''Thank U, Next'' tracks appearing within the top 40 region on the Hot 100, Grande broke the record for the most simultaneous top 40 entries by a female artist.<ref name=MostTop40>{{cite magazine |url=https://www.billboard.com/pro/ariana-grande-most-simultaneous-top-40-hot-100-hits/ |title=Ariana Grande Breaks Record For Most Simultaneous Top 40 ''Billboard'' Hot 100 Hits by a Female Artist |last=Trust |first=Gary |date=February 19, 2019 |magazine=[[Billboard (magazine)|Billboard]] |access-date=February 19, 2019 |archive-date=February 27, 2020 |archive-url=https://web.archive.org/web/20200227084537/https://www.billboard.com/articles/columns/chart-beat/8498842/ariana-grande-most-simultaneous-top-40-hot-100-hits |url-status=live}}</ref>
In February 2019, it was reported Grande would not attend the [[61st Annual Grammy Awards|Grammy Awards]] after she had a disagreement with producers over a potential performance at the ceremony.<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-not-attending-grammys-insulted-790743/ |title=Ariana Grande Not Attending Grammys After Producers 'Insulted' Her |magazine=[[Rolling Stone]] |last=Kreps |first=Daniel |date=February 6, 2019 |access-date=October 18, 2020 |archive-date=August 31, 2020 |archive-url=https://web.archive.org/web/20200831033521/https://www.rollingstone.com/music/music-news/ariana-grande-not-attending-grammys-insulted-790743/ |url-status=live}}</ref> Grande ended up earning her first Grammy, for [[Best Pop Vocal Album]], for ''Sweetener''.<ref>{{cite web |title=Grammys 2019: Ariana Grande Wins First Grammy |url=https://pitchfork.com/news/grammys-2019-ariana-grande-wins-best-pop-vocal-album/ |date=February 10, 2019 |website=[[Pitchfork (website)|Pitchfork]] |access-date=February 10, 2019 |archive-date=January 25, 2020 |archive-url=https://web.archive.org/web/20200125024153/https://pitchfork.com/news/grammys-2019-ariana-grande-wins-best-pop-vocal-album/ |url-status=live}}</ref> The same month, Grande won a [[Brit Award]] for [[Brit Award for International Female Solo Artist|International Female Solo Artist]].<ref>{{cite magazine |url=https://www.billboard.com/articles/news/awards/8499271/brit-awards-2019-winners-list |title=Brit Awards 2019 Winners: The Complete List |magazine=[[Billboard (magazine)|Billboard]] |last=Lynch |first=Joe |date=February 20, 2019 |access-date=February 20, 2019 |archive-date=February 21, 2019 |archive-url=https://web.archive.org/web/20190221122208/https://www.billboard.com/articles/news/awards/8499271/brit-awards-2019-winners-list |url-status=live}}</ref> She also embarked on her third headlining tour, the [[Sweetener World Tour]], to promote both ''Sweetener'' and ''Thank U, Next'', which began on March 18,<ref>{{cite magazine |last=Brandle |first=Lars |url=https://www.billboard.com/articles/news/8481638/ariana-grande-sweetener-tour-dates |title=Ariana Grande Announces 'Sweetener' World Tour: See the Dates |magazine=[[Billboard (magazine)|Billboard]] |date=October 25, 2018 |access-date=October 25, 2018 |archive-date=March 29, 2019 |archive-url=https://web.archive.org/web/20190329110149/https://www.billboard.com/articles/news/8481638/ariana-grande-sweetener-tour-dates |url-status=live}}</ref> and concluded on December 22, 2019.<ref>{{Cite magazine |last=Phull |first=Hardeep |date=December 23, 2019 |title=Ariana Grande Closes Sweetener World Tour in Los Angeles With Tears and Hits Aplenty |url=https://www.billboard.com/pro/last-show-ariana-grande-sweetener-tour-recap/ |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=May 25, 2022 |archive-url=https://web.archive.org/web/20220525014350/https://www.billboard.com/pro/last-show-ariana-grande-sweetener-tour-recap/ |url-status=live}}</ref> Spanning 97 shows through North America and Europe, it grossed US$146.6 million with over 1.3 million tickets sold, marking Grande's highest-grossing and biggest tour to date.<ref>{{Cite magazine |last=Frankenberg |first=Eric |date=January 23, 2020 |title=The Sweetener World Tour Finishes as Ariana Grande's Biggest Yet: Final Numbers Are In |url=https://www.billboard.com/articles/business/chart-beat/8548830/sweetener-world-tour-ariana-grande-biggest |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 23, 2020 |archive-url=https://web.archive.org/web/20200123225815/https://www.billboard.com/articles/business/chart-beat/8548830/sweetener-world-tour-ariana-grande-biggest |url-status=live}}</ref> A live album of the tour's setlist, titled ''[[K Bye for Now (SWT Live)]]'', was released on December 23.<ref>{{Cite web |last1=Hussey |first1=Allison |last2=Monroe |first2=Jazz |date=December 23, 2019 |title=Ariana Grande Releases New Live Album k bye for now |url=https://pitchfork.com/news/ariana-grande-releases-new-live-album-k-bye-for-now/ |access-date=October 11, 2024 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=September 7, 2021 |archive-url=https://web.archive.org/web/20210907202836/https://pitchfork.com/news/ariana-grande-releases-new-live-album-k-bye-for-now/ |url-status=live}}</ref> Grande was nominated for 9 awards at the [[2019 Billboard Music Awards|2019 ''Billboard'' Music Awards]], including [[Billboard Music Award for Top Artist|Top Artist]]. She would win two awards for [[Billboard Music Award for Chart Achievement|''Billboard'' Chart Achievement]] and [[Billboard Music Award for Top Female Artist|Top Female Artist]] on May 1, 2019.<ref name="billboard_8509655">{{cite magazine |last=Lynch |first=Joe |url=https://www.billboard.com/articles/news/awards/8509655/billboard-music-awards-2019-winners-list |title=2019 Billboard Music Awards Winners: The Complete List |magazine=[[Billboard (magazine)|Billboard]] |date=May 1, 2019 |access-date=May 2, 2019 |archive-date=May 16, 2019 |archive-url=https://web.archive.org/web/20190516041948/https://www.billboard.com/articles/news/awards/8509655/billboard-music-awards-2019-winners-list |url-status=live}}</ref> Grande performed at the event via a pre-recorded performance from her Sweetener World Tour.<ref>{{cite magazine |last=Daw |first=Stephen |url=https://www.billboard.com/articles/news/awards/8509712/ariana-grande-performance-7-rings-2019-bbmas |title=Ariana Grande Gives Epic Performance Of '7 Rings' at the 2019 BBMAs: Watch |magazine=[[Billboard (magazine)|Billboard]] |date=May 1, 2019 |access-date=May 2, 2019 |archive-date=May 27, 2019 |archive-url=https://web.archive.org/web/20190527055932/https://www.billboard.com/articles/news/awards/8509712/ariana-grande-performance-7-rings-2019-bbmas |url-status=live}}</ref>
Grande co-executive produced [[Charlie's Angels: Original Motion Picture Soundtrack|the soundtrack]] to the film ''[[Charlie's Angels (2019 film)|Charlie's Angels]]'', which was released on November 1, 2019; she co-wrote and performed various songs for the record.<ref>{{cite web |last=Minsker |first=Evan |date=October 11, 2019 |title=Ariana Grande Details ''Charlie's Angels'' Soundtrack: Nicki Minaj, Chaka Khan, Normani, More |url=https://pitchfork.com/news/ariana-grande-details-charlies-angels-soundtrack-nicki-minaj-chaka-khan-normani-more/ |access-date=October 10, 2024 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=October 11, 2019 |archive-url=https://web.archive.org/web/20191011045012/https://pitchfork.com/news/ariana-grande-details-charlies-angels-soundtrack-nicki-minaj-chaka-khan-normani-more/ |url-status=live}}</ref> The soundtrack was met with lukewarm reception.<ref>{{cite magazine |last=Amorosi |first=A.D. |date=November 1, 2019 |title=Album Review: 'Charlie's Angels: Original Motion Picture Soundtrack' |url=https://variety.com/2019/music/reviews/charlies-angels-soundtrack-album-review-ariana-grande-1203390153/ |access-date=October 10, 2024 |magazine=[[Variety (magazine)|Variety]] |archive-date=January 8, 2020 |archive-url=https://web.archive.org/web/20200108021431/https://variety.com/2019/music/reviews/charlies-angels-soundtrack-album-review-ariana-grande-1203390153/ |url-status=live}}</ref><ref>{{cite web |last=Torres |first=Eric |date=November 7, 2019 |title=Various Artists: Charlie's Angels (Original Motion Picture Soundtrack) Album Review |url=https://pitchfork.com/reviews/albums/various-artists-charlies-angels-original-motion-picture-soundtrack/ |access-date=October 10, 2024 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=January 4, 2020 |archive-url=https://web.archive.org/web/20200104051217/https://pitchfork.com/reviews/albums/various-artists-charlies-angels-original-motion-picture-soundtrack/ |url-status=live}}</ref> A collaboration with [[Miley Cyrus]] and [[Lana Del Rey]], titled "[[Don't Call Me Angel]]", was released as the lead single on September 13.<ref>{{cite web |last1=Schatz |first1=Lake |date=September 13, 2019 |title=Ariana Grande, Lana Del Rey, and Miley Cyrus premiere new song "Don't Call Me Angel": Stream |url=https://consequence.net/2019/09/ariana-lana-miley-dont-call-me-angel-stream/ |access-date=October 10, 2024 |work=[[Consequence of Sound]] |archive-date=December 12, 2024 |archive-url=https://web.archive.org/web/20241212064616/https://consequence.net/2019/09/ariana-lana-miley-dont-call-me-angel-stream/ |url-status=live}}</ref> ''[[Pitchfork (website)|Pitchfork]]'' wrote that the pop stars "meet at a lower creative common denominator than they've enjoyed lately".<ref>{{cite web |last1=Anderson |first1=Stacey |date=September 13, 2019 |title="Don't Call Me Angel" by Ariana Grande / Lana Del Rey / Miley Cyrus Review |url=https://pitchfork.com/reviews/tracks/ariana-grande-lana-del-rey-miley-cyrus-dont-call-me-angel/ |access-date=October 10, 2024 |website=Pitchfork |archive-date=February 14, 2020 |archive-url=https://web.archive.org/web/20200214182852/https://pitchfork.com/reviews/tracks/ariana-grande-lana-del-rey-miley-cyrus-dont-call-me-angel/ |url-status=live}}</ref> The track was nominated for [[Satellite Award for Best Original Song|Best Original Song]] at the [[24th Satellite Awards]].<ref>{{cite web |date=December 19, 2019 |title=2019 Winners |url=https://www.pressacademy.com/2019-ipa-awards/ |access-date=October 10, 2024 |website=Satellite Awards |publisher=[[International Press Academy]] |archive-date=December 19, 2019 |archive-url=https://web.archive.org/web/20191219204231/https://www.pressacademy.com/2019-ipa-awards/ |url-status=live}}</ref> In August 2019, she released the single "[[Boyfriend (Ariana Grande and Social House song)|Boyfriend]]" with pop duo [[Social House]];<ref>{{Cite web |last=Allaire |first=Christian |date=August 2, 2019 |title=Ariana Grande and Social House Release "Boyfriend"—A New Song About Crippling Crushes |url=https://www.vogue.com/article/ariana-grande-social-house-boyfriend-music-video |url-status=live |archive-url=https://web.archive.org/web/20240402005312/https://www.vogue.com/article/ariana-grande-social-house-boyfriend-music-video |archive-date=April 2, 2024 |access-date=April 2, 2024 |magazine=Vogue}}</ref> it debuted at number eight on the Hot 100,<ref>{{Cite magazine |last=Zellner |first=Xander |date=August 13, 2019 |title=A History of Boyfriends & Girlfriends on the Hot 100, From 'My Boyfriend's Back' to 'Break Up With Your Girlfriend' |url=https://www.billboard.com/pro/boyfriend-girlfriend-hot-100-chart-history-ariana-grande-social-house/ |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 17, 2024 |archive-url=https://web.archive.org/web/20241217195242/https://www.billboard.com/pro/boyfriend-girlfriend-hot-100-chart-history-ariana-grande-social-house/ |url-status=live}}</ref> and became the first song by a woman to top the [[Rolling Stone Top 100|''Rolling Stone'' Top 100]] chart.<ref>{{Cite magazine |date=August 12, 2019 |title=RS Charts: Ariana Grande and Social House's 'Boyfriend' is Number One on Top 100 |url=https://www.rollingstone.com/music/music-news/rs-charts-top-100-ariana-grande-social-house-drake-870557/ |access-date=October 10, 2024 |magazine=[[Rolling Stone]] |archive-date=September 13, 2019 |archive-url=https://web.archive.org/web/20190913224019/https://www.rollingstone.com/music/music-news/rs-charts-top-100-ariana-grande-social-house-drake-870557/ |url-status=live}}</ref> Grande co-wrote singer [[Normani]]'s debut solo single "[[Motivation (Normani song)|Motivation]]", which was released on August 16, 2019.<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-feature-normani-next-single-869177/ |title=Normani Reveals Ariana Grande Wrote on Her New Single |last=Holmes |first=Charles |magazine=[[Rolling Stone]] |date=August 8, 2019 |access-date=August 9, 2019 |archive-date=December 11, 2019 |archive-url=https://web.archive.org/web/20191211202222/https://www.rollingstone.com/music/music-news/ariana-grande-feature-normani-next-single-869177/ |url-status=live}}</ref> Grande won three awards at the [[2019 MTV Video Music Awards]], including the Artist of the Year award. She was nominated for 12 awards in total, including Video of the Year for "Thank U, Next".<ref>{{cite web |last=Nordyke |first=Kimberly |url=https://www.hollywoodreporter.com/lists/mtv-vmas-2019-winners-list-updating-1229669/item/best-direction-1229724 |title=MTV Video Music Awards: Taylor Swift, Jonas Brothers, Cardi B Among Winners |date=August 26, 2019 |access-date=August 26, 2019 |magazine=The Hollywood Reporter |archive-date=August 27, 2019 |archive-url=https://web.archive.org/web/20190827052809/https://www.hollywoodreporter.com/lists/mtv-vmas-2019-winners-list-updating-1229669/item/best-direction-1229724 |url-status=live}}</ref>
Grande was featured on the remix of American singer and rapper [[Lizzo]]'s song "[[Good as Hell]]", which was released on October 25, 2019.<ref>{{Cite web |last=Legaspi |first=Althea |date=October 25, 2019 |title=Hear Lizzo and Ariana Grande's Romping New Remix of 'Good As Hell' |url=https://www.rollingstone.com/music/music-news/lizzo-ariana-grande-good-as-hell-remix-903647/ |access-date=April 2, 2024 |magazine=[[Rolling Stone]] |archive-date=June 8, 2023 |archive-url=https://web.archive.org/web/20230608041413/https://www.rollingstone.com/music/music-news/lizzo-ariana-grande-good-as-hell-remix-903647/ |url-status=live}}</ref> By the end of the year, ''[[Billboard (magazine)|Billboard]]'' named Grande the most accomplished female artist to debut in the 2010s, while ''[[NME]]'' named her one of the defining music artists of the decade. She also became the most-streamed female artist of the decade on music streaming service Spotify.<ref name="billboard.com"/><ref>{{cite web |url=https://www.nme.com/features/nmes-10-artists-who-defined-the-decade-the-2010s-2583451 |title=''NME''<nowiki/>'s 10 Artists Who Defined The Decade: The 2010s |last=Mylrea |first=Hannah |magazine=[[NME]] |access-date=December 4, 2019 |date=December 3, 2019 |archive-date=March 18, 2020 |archive-url=https://web.archive.org/web/20200318234648/https://www.nme.com/features/nmes-10-artists-who-defined-the-decade-the-2010s-2583451 |url-status=live}}</ref><ref>{{cite web |url=https://www.nme.com/news/music/spotify-reveals-most-streamed-artists-and-songs-of-the-decade-2583604 |title=Spotify reveals most-streamed artists and songs of the decade |last=Skinner |first=Tom |website=[[NME]] |access-date=December 4, 2019 |date=December 3, 2019 |archive-date=December 5, 2019 |archive-url=https://web.archive.org/web/20191205002322/https://www.nme.com/news/music/spotify-reveals-most-streamed-artists-and-songs-of-the-decade-2583604 |url-status=live}}</ref> Also, ''[[Forbes]]'' ranked her amongst the [[Forbes Celebrity 100|highest-paid celebrities]] in 2019, placing at number 62 on the list,<ref>{{cite web |url=https://www.forbes.com/celebrities/ |title=The World's Highest-Paid Entertainers 2019 |work=Forbes |access-date=April 15, 2020 |archive-date=June 28, 2004 |archive-url=https://web.archive.org/web/20040628043820/https://www.forbes.com/celebrities/#34b6f7425947 |url-status=live}}</ref> while ''[[Billboard (magazine)|Billboard]]'' ranked her as 2019's highest-paid solo musician.<ref>{{cite magazine |last=Christman |first=Ed |title=''Billboard''<nowiki/>'s U.S. Money Makers: The Top Paid Musicians of 2019 |url=https://www.billboard.com/articles/business/9434831/billboards-money-makers-the-highest-paid-musicians-of-2019 |access-date=August 3, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=August 3, 2021 |archive-url=https://web.archive.org/web/20210803064346/https://www.billboard.com/articles/business/9434831/billboards-money-makers-the-highest-paid-musicians-of-2019 |url-status=live}}</ref> According to the [[International Federation of the Phonographic Industry]] (IFPI), ''Thank U, Next'' was the eighth-best-selling album of 2019 globally, having sold over one million copies worldwide.<ref>{{cite magazine |date=March 19, 2020 |title=Arashi Best-Of Tops Taylor Swift for IFPI's Best-Selling Album of 2019 |url=http://www.billboard.com/articles/news/international/9338380/ifpi-best-selling-albums-list-2019 |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 19, 2020 |archive-url=https://web.archive.org/web/20200319162904/http://www.billboard.com/articles/news/international/9338380/ifpi-best-selling-albums-list-2019 |url-status=live}}</ref> It also ranked as the second-best-performing album on the ''Billboard'' 200 year-end chart of 2019.<ref>{{Cite magazine |date= |title=Year End Charts — ''Billboard'' 200 Albums: 2019 |url=https://www.billboard.com/charts/year-end/2019/top-billboard-200-albums/ |url-access=subscription |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 26, 2022 |archive-url=https://web.archive.org/web/20220426130344/https://www.billboard.com/charts/year-end/2019/top-billboard-200-albums/ |url-status=live}}</ref>
=== 2020–2023: ''Positions'' ===
{{Main|Positions (album)|l1=''Positions'' (album)}}
In January 2020, Grande received multiple nominations at the 2020 [[iHeartRadio Music Awards]], including [[IHeartRadio Music Award for Female Artist of the Year|Female Artist of the Year]].<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/billie-eilish-ariana-grande-shawn-mendes-2020-iheartradio-music-awards-nominees-935011/ |title=Billie Eilish, Ariana Grande, Shawn Mendes Lead iHeartRadio Music Awards Nominees |last=Blistering |first=Jon |magazine=[[Rolling Stone]] |access-date=January 8, 2020 |date=January 8, 2020 |archive-date=January 11, 2020 |archive-url=https://web.archive.org/web/20200111084621/https://www.rollingstone.com/music/music-news/billie-eilish-ariana-grande-shawn-mendes-2020-iheartradio-music-awards-nominees-935011/ |url-status=live}}</ref> At the [[62nd Annual Grammy Awards]], Grande performed a medley of "[[Imagine (Ariana Grande song)|Imagine]]", "[[My Favorite Things (song)|My Favorite Things]]", "7 Rings", and "Thank U, Next".<ref>{{Cite magazine |last=Spanos |first=Brittany |date=January 26, 2020 |title=Ariana Grande Performs 'Thank U, Next' Medley at the 2020 Grammy Awards |url=https://www.rollingstone.com/music/music-news/grammys-2020-ariana-grande-performance-thank-u-next-942130/ |access-date=October 10, 2024 |magazine=[[Rolling Stone]] |archive-date=January 27, 2020 |archive-url=https://web.archive.org/web/20200127053029/https://www.rollingstone.com/music/music-news/grammys-2020-ariana-grande-performance-thank-u-next-942130/ |url-status=live}}</ref> Her performance was ranked by various publications among the best of the ceremony.<ref>* {{Cite news |last=Ryan |first=Patrick |date=January 26, 2020 |title=Brutally honest reviews and rankings of every Grammys 2020 performance |url=https://www.usatoday.com/story/entertainment/music/2020/01/26/grammys-2020-brutally-honest-reviews-every-performance-ranked/4585087002/ |access-date=October 10, 2024 |work=[[USA Today]] |archive-date=August 21, 2023 |archive-url=https://web.archive.org/web/20230821235142/https://www.usatoday.com/story/entertainment/music/2020/01/26/grammys-2020-brutally-honest-reviews-every-performance-ranked/4585087002/ |url-status=live}}
* {{Cite news |last1=Yahr |first1=Emily |last2=Izadi |first2=Elahe |last3=Andrews |first3=Travis |date=January 27, 2020 |title=Grammy Awards 2020: The performances ranked, from best to worst |url=https://www.washingtonpost.com/arts-entertainment/2020/01/26/grammy-awards-2020-performances-ranked-best-worst/ |access-date=October 10, 2024 |newspaper=[[The Washington Post]]}}
* {{Cite magazine |last=Specter |first=Emma |date=January 27, 2020 |title=The 8 Best Performances From the 2020 Grammys |url=https://www.vogue.com/article/best-performances-grammy-awards-2020/ |access-date=October 10, 2024 |magazine=Vogue |archive-date=December 27, 2024 |archive-url=https://web.archive.org/web/20241227022243/https://www.vogue.com/article/best-performances-grammy-awards-2020 |url-status=live}}
* {{Cite news |last=Fenwick |first=George |date=January 27, 2020 |title=Grammys 2020: All the performances, ranked from worst to best |url=https://www.standard.co.uk/showbiz/celebrity-news/grammys-2020-performances-ranked-lizzo-tyler-the-creator-a4345711.html |access-date=October 10, 2024 |work=[[Evening Standard]] |archive-date=November 28, 2024 |archive-url=https://web.archive.org/web/20241128101558/https://www.standard.co.uk/showbiz/celebrity-news/grammys-2020-performances-ranked-lizzo-tyler-the-creator-a4345711.html |url-status=live}}
* {{Cite web |last1=Grady |first1=Constance |last2=Frank |first2=Allegra |last3=Abad-Santos |first3=Alex |date=January 27, 2020 |title=The 8 best performances from the 2020 Grammys |url=https://www.vox.com/culture/2020/1/26/21083012/2020-grammys-best-performances-lizzo-demi-lovato-video/ |access-date=October 10, 2024 |website=[[Vox (website)|Vox]] |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219040147/https://www.vox.com/culture/2020/1/26/21083012/2020-grammys-best-performances-lizzo-demi-lovato-video |url-status=live}}</ref> Grande received the third-most nominations (5), including her first nods for [[Grammy Award for Album of the Year|Album of the Year]] (''Thank U, Next'') and [[Record of the Year]] ("7 Rings").<ref>{{Cite news |last=Beaumont-Thomas |first=Ben |date=November 20, 2019 |title=Lizzo, Billie Eilish and Lil Nas X top 2020 Grammy nominations |url=https://www.theguardian.com/music/2019/nov/20/lizzo-billie-eilish-and-lil-nas-x-top-2020-grammy-nominations/ |access-date=October 10, 2024 |work=[[The Guardian]]}}</ref> She was named by ''Billboard'' and ''[[The Hollywood Reporter]]'' as one of the biggest snubs of the ceremony.<ref>{{Cite magazine |last=Grein |first=Paul |date=January 27, 2020 |title=Grammys 2020: The Biggest Snubs and Surprises |url=https://www.billboard.com/music/awards/grammys-2020-the-biggest-snubs-and-surprises-8549247/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 16, 2024 |archive-url=https://web.archive.org/web/20241216220727/https://www.billboard.com/music/awards/grammys-2020-the-biggest-snubs-and-surprises-8549247/ |url-status=live}}</ref><ref>{{Cite magazine |last=Lewis |first=Hilary |date=January 26, 2020 |title=Grammys Snubs: Ariana Grande and H.E.R. Shut Out |url=https://www.hollywoodreporter.com/news/music-news/grammys-2020-snubs-include-more-just-ariana-grande-1273550/ |access-date=October 10, 2024 |magazine=The Hollywood Reporter |archive-date=November 30, 2024 |archive-url=https://web.archive.org/web/20241130094208/https://www.hollywoodreporter.com/news/music-news/grammys-2020-snubs-include-more-just-ariana-grande-1273550/ |url-status=live}}</ref> Grande and Justin Bieber released a collaboration song titled "[[Stuck with U]]" on May 8, 2020; net proceeds from the sales of the song were donated to the First Responders Children's Foundation in light of the [[COVID-19 pandemic]].<ref name="Kaufman">{{cite magazine |url=https://www.billboard.com/music/pop/justin-bieber-ariana-grande-collaboration-details-9369900/ |title=Justin Bieber & Ariana Grande Are Collaborating For a Good Cause |last=Kaufman |first=Gil |magazine=[[Billboard (magazine)|Billboard]] |access-date=May 1, 2020 |date=May 7, 2020 |archive-date=May 1, 2020 |archive-url=https://web.archive.org/web/20200501212547/https://www.billboard.com/articles/columns/pop/9369900/justin-bieber-ariana-grande-collaboration-details |url-status=live}}</ref> The song debuted at number one on the ''Billboard'' Hot 100'','' becoming Grande's third chart-topping single. Alongside Bieber, both artists tied Mariah Carey and [[Aubrey Graham|Drake]] for the most songs to debut at number one on the Hot 100; Grande became the first artist to have her first three number ones debut at the top, following "Thank U, Next" and "7 Rings".<ref>{{cite magazine |title=Ariana Grande & Justin Bieber's "Stuck With U" Debuts at No. 1 on Hot 100 |url=http://www.billboard.com/articles/business/chart-beat/9379745/ariana-grande-justin-bieber-stuck-with-u-number-one |date=May 18, 2020 |magazine=[[Billboard (magazine)|Billboard]] |access-date=May 18, 2020 |archive-date=May 19, 2020 |archive-url=https://web.archive.org/web/20200519191240/http://www.billboard.com/articles/business/chart-beat/9379745/ariana-grande-justin-bieber-stuck-with-u-number-one |url-status=live}}</ref>
Grande appeared on [[Lady Gaga]]'s "[[Rain on Me (Lady Gaga and Ariana Grande song)|Rain on Me]]", the second single from Gaga's sixth studio album ''[[Chromatica]]''.<ref>{{cite web |url=https://www.billboard.com/articles/columns/pop/9379055/lady-gaga-ariana-grande-rain-on-me-release-date |title=Lady Gaga & Ariana Grande's 'Rain on Me' Collaboration Is Coming Really Soon |last=Aniftos |first=Rania |magazine=[[Billboard (magazine)|Billboard]] |date=May 15, 2020 |access-date=May 16, 2020 |archive-date=May 15, 2020 |archive-url=https://web.archive.org/web/20200515235931/https://www.billboard.com/articles/columns/pop/9379055/lady-gaga-ariana-grande-rain-on-me-release-date }}</ref> The song also debuted at number one on the ''Billboard'' Hot 100, becoming Grande's fourth number-one single and helping her break the record for the most number-one debuts on that chart.<ref name="Billboard">{{cite magazine |title=Lady Gaga & Ariana Grande's 'Rain on Me' Debuts at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/articles/business/chart-beat/9394719/rain-on-me-debuts-atop-hot-100-lady-gaga-ariana-grande |magazine=[[Billboard (magazine)|Billboard]] |date=June 2020 |access-date=June 1, 2020 |archive-date=June 3, 2020 |archive-url=https://web.archive.org/web/20200603055218/https://www.billboard.com/articles/business/chart-beat/9394719/rain-on-me-debuts-atop-hot-100-lady-gaga-ariana-grande |url-status=live}}</ref> It won the [[Best Pop Duo/Group Performance]] category at the [[63rd Annual Grammy Awards]].<ref>{{cite news |last=Shafer |first=Ellise |title=Grammys 2021 Winners List |url=https://variety.com/2021/music/news/2021-grammys-winners-list-1234926947/ |access-date=March 14, 2021 |work=[[Variety (magazine)|Variety]] |date=March 14, 2021 |archive-date=March 16, 2021 |archive-url=https://web.archive.org/web/20210316041012/https://variety.com/2021/music/news/2021-grammys-winners-list-1234926947/ |url-status=live}}</ref> In 2020, Grande became the highest-earning woman in music on ''[[Forbes]]''{{'}}s 2020 [[Celebrity 100]] list, placing 17th overall with $72 million.<ref>{{cite web |url=https://www.forbes.com/celebrities |title=The World's Highest Paid Celebrities |last=Greenburg |first=Zack O'Malley |date=June 4, 2020 |work=Forbes |access-date=June 4, 2020 |archive-date=June 28, 2004 |archive-url=https://web.archive.org/web/20040628043820/https://www.forbes.com/celebrities |url-status=live}}</ref> At the [[2020 MTV Video Music Awards]], she was nominated for nine awards for both "Stuck with U" (with Bieber) and "Rain on Me" (with Gaga). For the latter, Grande received her third consecutive nomination for [[MTV Video Music Award for Video of the Year|Video of the Year]]. She won four awards, including [[MTV Video Music Award for Song of the Year|Song of the Year]] for "Rain on Me".<ref name="auto">{{cite news |url=http://www.mtv.com/news/3169506/vmas-winners-list-2020/ |title=2020 MTV VMA Winners: see the full list |first=Patrick |last=Hosken |date=August 30, 2020 |access-date=August 30, 2020 |publisher=[[MTV News]] |archive-date=August 31, 2020 |archive-url=https://web.archive.org/web/20200831025120/http://www.mtv.com/news/3169506/vmas-winners-list-2020/ }} {{Webarchive|url=https://web.archive.org/web/20200831025120/http://www.mtv.com/news/3169506/vmas-winners-list-2020/ |date=August 31, 2020 }}</ref><ref>{{Cite magazine |last=Warner |first=Denise |date=August 30, 2020 |title=Here Are All the Winners From the 2020 MTV VMAs |url=https://www.billboard.com/music/awards/mtv-vmas-winners-list-2020-9442281/ |access-date=April 1, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 13, 2022 |archive-url=https://web.archive.org/web/20221013064642/https://www.billboard.com/music/awards/mtv-vmas-winners-list-2020-9442281/ |url-status=live}}</ref>
Grande's sixth studio album, ''[[Positions (album)|Positions]]'', was released on October 30, 2020.<ref>{{cite web |url=https://www.npr.org/2020/10/30/926671488/ariana-grande-releases-new-album-positions-her-most-explicit-to-date |title=Ariana Grande Releases New Album 'Positions,' Her Most Explicit To Date |date=October 30, 2020 |last=Harris |first=Latesha |access-date=October 31, 2020 |publisher=[[NPR]] |archive-date=October 30, 2020 |archive-url=https://web.archive.org/web/20201030170043/https://www.npr.org/2020/10/30/926671488/ariana-grande-releases-new-album-positions-her-most-explicit-to-date |url-status=live}}</ref> It debuted at number one on the [[Billboard 200|''Billboard'' 200]] with first-week sales of 174,000 units, becoming Grande's fifth number-one album.<ref name=":2">{{cite magazine |url=https://www.billboard.com/articles/business/chart-beat/9480311/ariana-grande-positions-tops-billboard-200/ |title=Ariana Grande Claims Fifth No. 1 Album on Billboard 200 Chart With 'Positions' |magazine=[[Billboard (magazine)|Billboard]] |first=Keith |last=Caulfield |date=November 8, 2020 |access-date=November 9, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108202106/https://www.billboard.com/articles/business/chart-beat/9480311/ariana-grande-positions-tops-billboard-200/ |url-status=live}}</ref> Her third chart-topping album in two years and three months, it marked the fastest accumulation of three number-oe albums by a woman at that time.<ref name=":2"/> Following its vinyl LPs release in April 2021, ''Positions'' achieved the largest vinyl sales week (32,000) by a female artist since [[MRC Data]]'s inauguration in 1991, at that time.<ref>{{cite magazine |title=Taylor Swift's 'Evermore' Breaks Modern-Era Record for Biggest Vinyl Album Sales Week |url=https://www.billboard.com/articles/news/9580407/taylor-swift-evermore-record-breaking-vinyl-album-sales-week |url-status=live |archive-url=https://web.archive.org/web/20210531190705/https://www.billboard.com/articles/news/9580407/taylor-swift-evermore-record-breaking-vinyl-album-sales-week/ |archive-date=May 31, 2021 |access-date=June 1, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> The [[Positions (song)|eponymous lead single]] was released on October 23.<ref>{{cite web |url=https://www.vulture.com/2020/10/ariana-grande-teases-release-of-new-single-positions.html |title=Get Into 'Position' for Ariana Grande's New Single |last=Sinha |first=Charu |website=[[Vulture (websitee)|Vulture]] |date=October 21, 2020 |access-date=October 22, 2020 |archive-date=October 21, 2020 |archive-url=https://web.archive.org/web/20201021100828/https://www.vulture.com/2020/10/ariana-grande-teases-release-of-new-single-positions.html |url-status=live}}</ref> It debuted atop the ''[[Billboard (magazine)|Billboard]]'' [[Hot 100]], becoming Grande's fifth chart-topping single and breaking numerous records. Grande became the first artist to have five number-one debuts on the Hot 100 and the first to have their first five number-ones debut at the top. "Positions" became her third number-one single in 2020 following "Stuck with U" and "Rain on Me", making Grande the first artist since Drake to have three number-one singles in a single calendar year and the first female artist to do so since [[Rihanna]] and Katy Perry in 2010.<ref name="billboardpositions">{{cite magazine |url=https://www.billboard.com/articles/business/chart-beat/9477041/ariana-positions-luke-combs-hot-100-number-one |title=Ariana Grande's 'Positions' Debuts at No. 1 on Hot 100, Luke Combs' 'Forever After All' Launches at No. 2 |last=Trust |first=Gary |magazine=[[Billboard (magazine)|Billboard]] |date=November 2, 2020 |access-date=November 2, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108154842/https://www.billboard.com/articles/business/chart-beat/9477041/ariana-positions-luke-combs-hot-100-number-one |url-status=live}}</ref> It topped the [[Pop Airplay]] chart for seven weeks, surpassing "7 Rings" (six weeks) as Grande's longest-running number-one on the chart.<ref name="popairplaytoptwo">{{cite magazine |url=https://www.billboard.com/articles/business/chart-beat/9522731/ariana-grande-34-35-tops-pop-airplay-chart |title=Ariana Grande Replaces Herself Atop Pop Airplay Chart as '34+35' Dethrones 'Positions' |magazine=[[Billboard (magazine)|Billboard]] |last=Trust |first=Gary |date=February 8, 2021 |access-date=October 10, 2024 |archive-date=October 19, 2021 |archive-url=https://web.archive.org/web/20211019232819/https://www.billboard.com/articles/business/chart-beat/9522731/ariana-grande-34-35-tops-pop-airplay-chart |url-status=live}}</ref>
Alongside the release of ''Positions'', the track "[[34+35]]" served as the second single off the album. Debuting at number eight, it became Grande's 18th top-ten single.<ref name="bil-1">{{cite magazine |last=Trust |first=Gary |date=November 9, 2020 |title=24kGoldn & Iann Dior's 'Mood' Swings Back to No. 1 on Hot 100; Ariana Grande, Bad Bunny & Jhay Cortez Debut in Top 10 |url=https://www.billboard.com/articles/business/chart-beat/9480738/24kgoldn-iann-dior-mood-number-one-third-week/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 11, 2020 |archive-date=November 15, 2020 |archive-url=https://web.archive.org/web/20201115150228/https://www.billboard.com/articles/business/chart-beat/9480738/24kgoldn-iann-dior-mood-number-one-third-week/ |url-status=live}}</ref> Grande released a "34+35" remix featuring American rappers [[Doja Cat]] and [[Megan Thee Stallion]] on January 15, 2021. The remix helped the song reach a new peak at number two, the highest-charting song credited to three or more female soloists on the Hot 100 since [[Christina Aguilera]], [[Mýa]], [[Pink (singer)|Pink]] and [[Lil' Kim]]'s "Lady Marmalade" in 2001.<ref>{{cite magazine |last=Trust |first=Gary |date=January 25, 2021 |title=Olivia Rodrigo's 'Drivers License' No. 1 on Hot 100 for 2nd Week, Ariana Grande's '34+35' Bounds to No. 2 |url=https://www.billboard.com/articles/business/chart-beat/9515956/olivia-rodrigo-drivers-license-number-one-second-week-hot-100/ |access-date=January 25, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 25, 2021 |archive-url=https://web.archive.org/web/20210125213933/https://www.billboard.com/articles/business/chart-beat/9515956/olivia-rodrigo-drivers-license-number-one-second-week-hot-100/ |url-status=live}}</ref> The remix was one of five bonus tracks included on the deluxe edition of ''Positions'', released on February 19, 2021.<ref>{{Cite web |last=Close |first=Paris |date=February 19, 2021 |title=Hear 5 New Songs From Ariana Grande's 'Positions' Deluxe Album |url=https://www.iheart.com/content/2021-02-19-hear-5-new-songs-from-ariana-grandes-positions-deluxe-album/ |access-date=April 2, 2025 |publisher=[[iHeart]] |archive-date=April 25, 2025 |archive-url=https://web.archive.org/web/20250425052616/https://www.iheart.com/content/2021-02-19-hear-5-new-songs-from-ariana-grandes-positions-deluxe-album/ |url-status=live}}</ref> On the Pop Airplay chart issue dated February 13, "34+35" replaced Grande's own "Positions" at number one, making her the first artist to replace herself at the summit as the only act credited on both tracks.<ref name="popairplaytoptwo"/> On the following chart issue, Grande occupied the top two of the chart with "34+35" and "Positions", becoming the first artist to simultaneously occupy the top two with two solo tracks.<ref name="popairplaytoptwo"/><ref name="popairplayfeb2021">{{Cite magazine |title=Pop Airplay: Week of February 20, 2021) |url=https://www.billboard.com/charts/pop-songs/2021-02-20 |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 3, 2021 |archive-url=https://web.archive.org/web/20210303092657/https://www.billboard.com/charts/pop-songs/2021-02-20 |url-status=live}}</ref> "34+35" remained at number one for three consecutive weeks;<ref>{{Cite magazine |title=''Billboard'' Pop Airplay Chart: Week of February 27, 2021 |url=https://www.billboard.com/charts/pop-songs/2021-02-27 |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 16, 2021 |archive-url=https://web.archive.org/web/20210316004218/https://www.billboard.com/charts/pop-songs/2021-02-27 |url-status=live}}</ref> it also topped the [[Rhythmic (chart)|Rhythmic]] airplay chart, marking Grande's third leader.<ref>{{Cite magazine |date=March 9, 2021 |title=Ariana Grande Rhythmic Airplay Chart History |url=https://www.billboard.com/artist/ariana-grande/chart-history/tfc/ |url-status=live |access-date=March 9, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 1, 2021 |archive-url=https://web.archive.org/web/20210301200146/https://www.billboard.com/music/ariana-grande/chart-history/TFC}}</ref> In March, the song "[[POV (song)|POV]]" was sent to radio as the album's third single. The song reached number 27 on the Hot 100 and the top ten on mainstream radio, making Grande the first artist to have three concurrent songs in the top ten on Pop Airplay; it later peaked at number three.<ref>{{cite magazine |last=Trust |first=Gary |date=May 10, 2021 |title=3 Top 10 'Positions': Ariana Grande Makes History on Pop Airplay Chart |url=https://www.billboard.com/pro/ariana-grande-makes-history-pop-airplay-chart-three-top-10-songs/ |access-date=February 11, 2023 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=February 11, 2023 |archive-url=https://web.archive.org/web/20230211072629/https://www.billboard.com/pro/ariana-grande-makes-history-pop-airplay-chart-three-top-10-songs/ |url-status=live}}</ref>
Grande was named the most-played artist on [[iHeartRadio]]'s stations in 2021, reaching 2.6 billion in audience.<ref>{{cite magazine |last1=Aswad |first1=Jem |title=Dua Lipa's 'Levitating,' Ariana Grande Top iHeartRadio's Most-Played Lists of 2021 |url=https://variety.com/2021/music/news/dua-lipa-levitating-ariana-grande-iheartradio-most-played-2021-1235120854/ |magazine=Variety |access-date=November 30, 2021 |date=November 29, 2021 |archive-date=November 29, 2021 |archive-url=https://web.archive.org/web/20211129214619/https://variety.com/2021/music/news/dua-lipa-levitating-ariana-grande-iheartradio-most-played-2021-1235120854/amp/ |url-status=live}}</ref> ''Positions'' ranked at number eight on the 2021 year-end ''Billboard'' 200 chart.<ref>{{Cite magazine |date= |title=Year-End Charts — ''Billboard'' 200 Albums: 2021 |url=https://www.billboard.com/charts/year-end/2021/top-billboard-200-albums/ |url-access=subscription |access-date=October 11, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2021 |archive-url=https://web.archive.org/web/20211203104042/https://www.billboard.com/charts/year-end/2021/top-billboard-200-albums/ |url-status=live}}</ref> On November 13, 2020, Grande made a surprise appearance on the [[Adult Swim]] Festival, performing music artist [[Thundercat (musician)|Thundercat]]'s song "Them Changes" alongside him, which Grande had previously covered.<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-them-changes-thundercat-adult-swim-festival-1090593/ |title=See Ariana Grande Perform 'Them Changes' With Thundercat at Adult Swim Festival |last=Kreps |first=Daniel |magazine=[[Rolling Stone]] |date=November 13, 2020 |access-date=December 3, 2020 |archive-date=May 17, 2021 |archive-url=https://web.archive.org/web/20210517235648/https://www.rollingstone.com/music/music-news/ariana-grande-them-changes-thundercat-adult-swim-festival-1090593/ |url-status=live}}</ref> Grande and [[Jennifer Hudson]] also featured on a remix of [[Mariah Carey]]'s 2010 Christmas song "[[Oh Santa!]]". The song was released on December 4, 2020, as part of ''[[Mariah Carey's Magical Christmas Special]]''.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/holiday/9493952/mariah-carey-ariana-grande-jennifer-hudson-oh-santa |title=Mariah Carey, Ariana Grande & Jennifer Hudson Have Blessed Us With 'Oh Santa!' |last=Aniftos |first=Rania |magazine=[[Billboard (magazine)|Billboard]] |date=December 3, 2020 |access-date=December 3, 2020 |archive-date=April 21, 2021 |archive-url=https://web.archive.org/web/20210421063358/https://www.billboard.com/articles/news/holiday/9493952/mariah-carey-ariana-grande-jennifer-hudson-oh-santa |url-status=live}}</ref> Grande released the concert film for her [[Sweetener World Tour]], ''[[Excuse Me, I Love You]],'' on December 21, 2020, exclusively on [[Netflix]].<ref>{{Cite magazine |last=Blistein |first=Jon |date=December 9, 2020 |title=Ariana Grande Announces 'Sweetener' Concert Film 'Excuse Me, I Love You' |url=https://www.rollingstone.com/music/music-news/ariana-grande-sweetener-concert-film-excuse-me-i-love-you-1101246/ |access-date=April 2, 2024 |magazine=[[Rolling Stone]] |archive-date=April 2, 2024 |archive-url=https://web.archive.org/web/20240402002736/https://www.rollingstone.com/music/music-news/ariana-grande-sweetener-concert-film-excuse-me-i-love-you-1101246/ |url-status=live}}</ref>
In April 2021, Grande was featured on a remix of [[the Weeknd]]'s "[[Save Your Tears]]".<ref>{{cite magazine |last=Mamo |first=Heran |date=April 23, 2021 |title=The Weeknd Drops 'Save Your Tears' Remix With Ariana Grande: Stream It Now |url=https://www.billboard.com/music/pop/the-weeknd-ariana-grande-save-your-tears-remix-stream-9561503/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=April 23, 2021 |archive-date=April 23, 2021 |archive-url=https://web.archive.org/web/20210423040929/https://www.billboard.com/articles/columns/pop/9561503/the-weeknd-ariana-grande-save-your-tears-remix-stream/ |url-status=live}}</ref> The remix reached number one on the ''Billboard'' Hot 100 and [[Canadian Hot 100]], becoming both artists' sixth number-one single on both charts.<ref>{{cite magazine |date=May 10, 2021 |title=Ariana Grande (Chart History): Canadian Hot 100 |url=https://www.billboard.com/artist/ariana-grande/chart-history/can/ |access-date=January 15, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 1, 2021 |archive-url=https://web.archive.org/web/20210301072014/https://www.billboard.com/music/ariana-grande/chart-history/CAN |url-status=live}}</ref> It also topped the ''Billboard'' Global 200, marking Grande's second number-one single on the chart; it made her the first woman to earn multiple leaders on the chart.<ref>{{cite magazine |last=McIntyre |first=Hugh |date=May 4, 2021 |title=Ariana Grande Joins BTS As The Only Musicians To Hit No. 1 On Billboard's Global Chart More Than Once |url=https://www.forbes.com/sites/hughmcintyre/2021/05/04/ariana-grande-joins-bts-as-the-only-musicians-to-hit-no-1-on-billboards-global-chart-more-than-once/ |access-date=September 6, 2024 |magazine=Forbes |archive-date=May 5, 2021 |archive-url=https://web.archive.org/web/20210505152917/https://www.forbes.com/sites/hughmcintyre/2021/05/04/ariana-grande-joins-bts-as-the-only-musicians-to-hit-no-1-on-billboards-global-chart-more-than-once/ |url-status=live}}</ref> She joined [[Paul McCartney]] as the only artists to earn three number-one duets on the Hot 100.<ref>{{cite magazine |last=Trust |first=Gary |date=May 3, 2021 |title=The Weeknd & Ariana Grande's 'Save Your Tears' Soars to No. 1 on Billboard Hot 100 |url=https://www.billboard.com/articles/news/9566597/the-weeknd-ariana-grande-save-your-tears-number-one-hot-100/ |access-date=May 3, 2021 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 9, 2021 |archive-url=https://web.archive.org/web/20211009233826/https://www.billboard.com/articles/news/9566597/the-weeknd-ariana-grande-save-your-tears-number-one-hot-100 |url-status=live}}</ref> With 69 weeks, the remix is among [[List of Billboard Hot 100 chart achievements and milestones#Most total weeks on the Hot 100|longest-charting songs]] on the Hot 100, and Grande's longest-charting song in the United States.<ref>{{Cite magazine |last=Zellner |first=Xander |date=October 17, 2022 |title=Glass Animals' 'Heat Waves' Is Now the Longest Charting Hot 100 Song of All Time |url=https://www.billboard.com/music/chart-beat/glass-animals-heat-waves-is-now-longest-charting-hot-100-song-1235157060/ |access-date=August 26, 2023 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 18, 2022 |archive-url=https://web.archive.org/web/20221018000513/https://www.billboard.com/music/chart-beat/glass-animals-heat-waves-is-now-longest-charting-hot-100-song-1235157060/ |url-status=live}}</ref> It ranked as the second best-performing song of the year on the ''Billboard'' [[Billboard Year-End Hot 100 singles of 2021|year-end Hot 100]], [[Billboard Year-End Global 200 singles of 2021|Global 200, and Global Excl. US charts]] of 2021.<ref>{{cite magazine |last1=Trust |first1=Gary |last2=Caulfield |first2=Keith |date=December 2, 2021 |title=The Year In Charts 2021: Dua Lipa's 'Levitating' Is the No. 1 Billboard Hot 100 Song of the Year |url=https://www.billboard.com/music/chart-beat/dua-lipa-levitating-2021-hot-100-top-song-year-in-charts-1235004941/ |access-date=January 15, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2021 |archive-url=https://web.archive.org/web/20211203190631/https://www.billboard.com/music/chart-beat/dua-lipa-levitating-2021-hot-100-top-song-year-in-charts-1235004941/ |url-status=live}}</ref><ref>{{Cite magazine |date=December 2, 2021 |title=''Billboard'' Global 200 – Year-End 2021 |url=https://www.billboard.com/charts/year-end/2021/billboard-global-200/ |access-date=September 6, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2021 |archive-url=https://web.archive.org/web/20211203103102/https://www.billboard.com/charts/year-end/2021/billboard-global-200/ |url-status=live}}</ref><ref>{{Cite magazine |last=Frankenberg |first=Eric |date=December 2, 2021 |title=The Year in Global Charts 2021: Dua Lipa, BTS & Olivia Rodrigo Lead Inaugural Year-End Rankings |url=https://www.billboard.com/music/chart-beat/global-charts-2021-year-end-ranking-1235005077/ |access-date=September 6, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 12, 2022 |archive-url=https://web.archive.org/web/20220112181325/https://www.billboard.com/music/chart-beat/global-charts-2021-year-end-ranking-1235005077/ |url-status=live}}</ref> Grande and the Weeknd performed "Save Your Tears" together at the [[2021 iHeartRadio Music Awards]].<ref>{{cite web |last=Bloom |first=Madison |date=May 27, 2021 |title=Watch the Weeknd and Ariana Grande Perform 'Save Your Tears' at 2021 iHeartRadio Music Awards |url=https://pitchfork.com/news/watch-the-weeknd-and-ariana-grande-perform-save-your-tears-at-2021-iheartradio-music-awards/ |access-date=July 8, 2021 |website=[[Pitchfork (website)|Pitchfork]] |archive-date=July 9, 2021 |archive-url=https://web.archive.org/web/20210709192806/https://pitchfork.com/news/watch-the-weeknd-and-ariana-grande-perform-save-your-tears-at-2021-iheartradio-music-awards/ |url-status=live}}</ref>
In June 2021, Grande featured on the song "I Don't Do Drugs" from Doja Cat's third studio album ''[[Planet Her]]''.<ref>{{cite magazine |last=Legaspi |first=Althea |date=June 9, 2021 |title=Doja Cat Enlists Ariana Grande, the Weeknd for New 'Planet Her' Album |url=https://www.rollingstone.com/music/music-news/doja-cat-ariana-grande-the-weeknd-planet-her-1181716/ |access-date=July 8, 2021 |magazine=[[Rolling Stone]] |archive-date=July 22, 2021 |archive-url=https://web.archive.org/web/20210722121929/https://www.rollingstone.com/music/music-news/doja-cat-ariana-grande-the-weeknd-planet-her-1181716/ |url-status=live}}</ref> Her contribution as a songwriter and featured artist on the song earned Grande a nomination for [[Grammy Award for Album of the Year|Album of the Year]] at the [[64th Annual Grammy Awards]]. In September 2021, she joined as a coach of the [[The Voice (American TV series) season 21|twenty-first season]] of ''[[The Voice (American TV series)|The Voice]]''; Grande became the highest-paid coach in the show's history, earning a reported $25 million for that season.<ref>{{cite web |last=Swaroop |first=Ananya |date=April 1, 2021 |title=Ariana Grande Is the Highest-Paid Coach in 'Voice' History—Here's Her Salary & Net Worth |url=https://www.yahoo.com/now/ariana-grande-highest-paid-coach-230007598.html |url-status=live |archive-url=https://web.archive.org/web/20211110145043/https://www.yahoo.com/now/ariana-grande-highest-paid-coach-230007598.html |archive-date=November 10, 2021 |access-date=January 19, 2022 |website=[[Yahoo!]]}}</ref> The season concluded in December 2021; Grande did not return for the next season.<ref>{{Cite magazine |last=Donaldson |first=Laura |date=September 19, 2022 |title='The Voice' 2022: Why Did Ariana Grande and Kelly Clarkson Leave NBC Show? |url=https://www.newsweek.com/voice-ariana-grande-kelly-clarkson-why-leave-not-left-what-happened-judges-coaches-1743667/ |access-date=September 17, 2024 |magazine=[[Newsweek]] |archive-date=November 30, 2024 |archive-url=https://web.archive.org/web/20241130100949/https://www.newsweek.com/voice-ariana-grande-kelly-clarkson-why-leave-not-left-what-happened-judges-coaches-1743667 |url-status=live}}</ref> Later in December, she appeared in [[Adam McKay]]'s film ''[[Don't Look Up]]'', alongside [[Leonardo DiCaprio]], [[Jennifer Lawrence]], and [[Meryl Streep]]. With streams of more than 152 million hours in a week, it broke the record for the biggest viewership week in [[Netflix]] history, at the time.<ref>{{cite magazine |last1=Yossman |first1=K. J. |title=Adam McKay's 'Don't Look Up' Smashes Netflix Viewing Records With Over 150 Million Hours Viewed |url=https://variety.com/2022/film/news/dont-look-up-netflix-weekly-viewing-records-1235147910/ |access-date=January 8, 2022 |magazine=Variety |date=January 6, 2022 |archive-date=January 7, 2022 |archive-url=https://web.archive.org/web/20220107000509/https://variety.com/2022/film/news/dont-look-up-netflix-weekly-viewing-records-1235147910/ |url-status=live}}</ref> To promote the film, Grande released the song "[[Just Look Up]]", in collaboration with rapper [[Kid Cudi]], on December 3, 2021.<ref>{{cite magazine |url=https://www.nme.com/news/music/ariana-grande-kid-cudi-collaboration-just-look-up-clip-listen-3098626%3fa |title=Hear Ariana Grande and Kid Cudi's new collaboration, 'Just Look Up' |last=Skinner |first=Tom |magazine=[[NME]] |date=December 3, 2021 |access-date=December 14, 2021 |archive-date=April 4, 2023 |archive-url=https://web.archive.org/web/20230404193403/https://www.nme.com/news/music/ariana-grande-kid-cudi-collaboration-just-look-up-clip-listen-3098626?a |url-status=live}}</ref> At the [[27th Critics' Choice Awards]], Grande received nominations in the categories [[Critics' Choice Movie Award for Best Song|Best Song]] and [[Critics' Choice Movie Award for Best Acting Ensemble|Best Acting Ensemble]], as a part of the cast.<ref>{{cite magazine |last=Nordyke |first=Kimberly |date=March 13, 2022 |title=Critics Choice Awards: Winners List |url=https://www.hollywoodreporter.com/movies/movie-news/critics-choice-awards-winners-list-full-1235110430/ |access-date=January 9, 2024 |magazine=[[The Hollywood Reporter]] |archive-date=January 19, 2023 |archive-url=https://web.archive.org/web/20230119112750/https://www.hollywoodreporter.com/movies/movie-news/critics-choice-awards-winners-list-full-1235110430/ |url-status=live}}</ref> She also received a nomination at the [[28th Screen Actors Guild Awards]] for [[Screen Actors Guild Award for Outstanding Performance by a Cast in a Motion Picture|Outstanding Performance by a Cast in a Motion Picture]].<ref>{{cite magazine |last=Nordyke |first=Kimberly |date=February 27, 2022 |title=SAG Awards: Winners List |url=https://www.hollywoodreporter.com/movies/movie-news/sag-awards-winners-2022-complete-list-1235100358/ |url-status=live |archive-url=https://web.archive.org/web/20220228001511/https://www.hollywoodreporter.com/movies/movie-news/sag-awards-winners-2022-complete-list-1235100358/ |archive-date=February 28, 2022 |access-date=January 9, 2024 |magazine=[[The Hollywood Reporter]]}}</ref>
On February 24, 2023, following months-long renewed interest in and virality of the Weeknd's 2016 song "Die for You", [[Die for You (The Weeknd song)#Ariana Grande remix|a remix]] of the song with Grande was released. It marked their fourth collaboration.<ref>{{cite web |last=Strauss |first=Matthew |date=February 24, 2023 |title=The Weeknd Enlists Ariana Grande for New "Die for You (Remix)" |url=https://pitchfork.com/news/the-weeknd-enlists-ariana-grande-for-new-die-for-you-remix-listen/ |access-date=June 21, 2023 |website=Pitchfork |archive-date=August 19, 2023 |archive-url=https://web.archive.org/web/20230819222159/https://pitchfork.com/news/the-weeknd-enlists-ariana-grande-for-new-die-for-you-remix-listen/ |url-status=live}}</ref> The remix topped the ''Billboard'' Hot 100 chart, becoming both artists' seventh number-one hit. Grande became the artist with the most number-one duets (four) on the chart, surpassing McCartney.<ref>{{cite magazine |last=Trust |first=Gary |date=March 6, 2023 |title=The Weeknd & Ariana Grande's 'Die for You' Leaps to No. 1 on Billboard Hot 100 |url=https://www.billboard.com/music/chart-beat/the-weeknd-ariana-grande-die-for-you-number-one-billboard-hot-100-1235280422/ |access-date=June 21, 2023 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 6, 2023 |archive-url=https://web.archive.org/web/20230306180602/https://www.billboard.com/music/chart-beat/the-weeknd-ariana-grande-die-for-you-number-one-billboard-hot-100-1235280422/ |url-status=live}}</ref> According to the [[International Federation of the Phonographic Industry]] (IFPI), it was the [[List of best-selling singles#Best-selling singles by year worldwide|fourth best-selling song of 2023]] globally.<ref>{{Cite magazine |last=Brandle |first=Lars |date=February 26, 2024 |title=Miley Cyrus' 'Flowers' Wins IFPI Global Single Award For 2023 |url=https://www.billboard.com/music/awards/miley-cyrus-flowers-ifpi-global-single-award-2023-1235614759/ |access-date=February 26, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=February 26, 2024 |archive-url=https://web.archive.org/web/20240226153802/https://www.billboard.com/music/awards/miley-cyrus-flowers-ifpi-global-single-award-2023-1235614759/ |url-status=live}}</ref> On August 25, 2023, Grande released a reissue of her debut studio album, ''[[Yours Truly (Ariana Grande album)#Yours Truly (Tenth Anniversary Edition)|Yours Truly (Tenth Anniversary Edition)]]''.<ref>{{cite web |last=Bloom |first=Madison |title=Ariana Grande Releasing ''Yours Truly'' 10th Anniversary Reissue Friday |date=August 19, 2023 |website=Pitchfork |url=https://pitchfork.com/news/ariana-grande-releasing-yours-truly-10th-anniversary-reissue-friday/ |access-date=August 26, 2023 |archive-date=August 25, 2023 |archive-url=https://web.archive.org/web/20230825112052/https://pitchfork.com/news/ariana-grande-releasing-yours-truly-10th-anniversary-reissue-friday/ |url-status=live}}</ref><ref>{{cite magazine |last=Kreps |first=Daniel |title=Ariana Grande Details Week's Worth of 'Yours Truly' 10th Anniversary Plans |date=August 19, 2023 |magazine=[[Rolling Stone]] |url=https://www.rollingstone.com/music/music-news/ariana-grande-yours-truly-10th-anniversary-1234809258/ |access-date=August 26, 2023 |archive-date=August 24, 2023 |archive-url=https://web.archive.org/web/20230824212444/https://www.rollingstone.com/music/music-news/ariana-grande-yours-truly-10th-anniversary-1234809258/ |url-status=live}}</ref> On December 9, 2023, Grande and Jennifer Hudson made a surprise appearance onstage to sing the "Oh Santa!" remix at Mariah Carey's show at the [[Madison Square Garden]], of her [[Merry Christmas One and All!]] tour.<ref>{{cite magazine |last=Russell |first=Shania |date=December 10, 2023 |title=Mariah Carey invites her 'Christmas angels' Ariana Grande and Jennifer Hudson onstage for 'Oh Santa' |url=https://ew.com/watch-mariah-carey-ariana-grande-jennifer-hudson-sing-oh-santa-8413972 |access-date=January 9, 2024 |magazine=[[Entertainment Weekly]] |archive-date=January 9, 2024 |archive-url=https://web.archive.org/web/20240109145933/https://ew.com/watch-mariah-carey-ariana-grande-jennifer-hudson-sing-oh-santa-8413972 |url-status=live}}</ref>
=== 2024–present: ''Eternal Sunshine'', ''Wicked'', and focus on acting ===
[[File:Ariana Grande Wicked Interview 2024 03.jpg|thumb|upright|left|Grande in 2024]]
Grande's seventh studio album, titled ''[[Eternal Sunshine (album)|Eternal Sunshine]]'', was released on March 8, 2024. It was preceded by its lead single, "[[Yes, And?]]", released on January 12.<ref>{{cite magazine |last1=Spanos |first1=Brittany |title=Ariana Grande Strikes A Pose With House Single 'Yes, And?' |url=https://www.rollingstone.com/music/music-news/ariana-grande-yes-and-song-release-1234945134/ |access-date=January 12, 2024 |magazine=[[Rolling Stone]] |archive-date=January 12, 2024 |archive-url=https://web.archive.org/web/20240112051751/https://www.rollingstone.com/music/music-news/ariana-grande-yes-and-song-release-1234945134/ |url-status=live}}</ref> The song debuted at number one on the ''Billboard'' Hot 100,<ref>{{cite magazine |last=Trust |first=Gary |date=January 22, 2024 |title=Ariana Grande's 'Yes, And?' Debuts at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-hot-100-number-one-debut-2-1235586226/ |url-status=live |archive-url=https://web.archive.org/web/20240122182312/https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-hot-100-number-one-debut-2-1235586226/ |archive-date=January 22, 2024 |access-date=January 22, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> topped the [[Billboard Global 200|''Billboard'' Global 200]] and Global Excl. US charts for two weeks,<ref>
* {{cite magazine |url=https://www.billboard.com/music/chart-beat/ariana-grande-yes-global-charts-number-one-debut-1235586270/ |title=Ariana Grande's 'Yes, And?' Launches at No. 1 on Billboard Global Charts |last=Trust |first=Gary |date=January 22, 2024 |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 31, 2024 |url-status=live |archive-date=January 22, 2024 |archive-url=https://web.archive.org/web/20240122200525/https://www.billboard.com/music/chart-beat/ariana-grande-yes-global-charts-number-one-debut-1235586270/}}
* {{Cite magazine |last=Trust |first=Gary |date=January 29, 2024 |title=Ariana Grande's 'Yes, And?' Adds Second Week at No. 1 on ''Billboard'' Global Charts |url=https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-global-charts-number-one-second-week-1235591406/ |access-date=January 31, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 30, 2024 |archive-url=https://web.archive.org/web/20240130022504/https://www.billboard.com/music/chart-beat/ariana-grande-yes-and-global-charts-number-one-second-week-1235591406/ |url-status=live}}</ref> and was followed by a remix featuring [[Mariah Carey]] on February 16.<ref>{{cite magazine |last=Lipshutz |first=Jason |date=February 16, 2024 |title=Friday Music Guide: New Music From Ariana Grande & Mariah Carey, Vampire Weekend, Dua Lipa and More |url=https://www.billboard.com/music/pop/friday-music-guide-ariana-grande-mariah-carey-vampire-weekend-dua-lipa-1235609648/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=February 25, 2024 |archive-url=https://web.archive.org/web/20240225003448/https://www.billboard.com/music/pop/friday-music-guide-ariana-grande-mariah-carey-vampire-weekend-dua-lipa-1235609648/ |url-status=live}}</ref> The second single, "[[We Can't Be Friends (Wait for Your Love)]]", was released in tandem with the album.<ref>{{Cite web |last=Gonzalez |first=Alex |date=March 8, 2024 |title=Ariana Grande Comes To A Heartbreaking Conclusion On Her New Single, 'We Can't Be Friends (Wait For Your Love)' |url=https://uproxx.com/pop/ariana-grande-we-cant-be-friends-wait-for-your-love/ |archive-url=https://web.archive.org/web/20240308130941/https://uproxx.com/pop/ariana-grande-we-cant-be-friends-wait-for-your-love/ |archive-date=March 8, 2024 |access-date=March 8, 2024 |website=[[Uproxx]]}}</ref> Grande's first album in over three years,<ref>{{Cite magazine |last=Mier |first=Tomás |date=March 8, 2024 |title=Ariana Grande Releases 'Eternal Sunshine', First Album in Over 3 Years |url=https://www.rollingstone.com/music/music-news/ariana-grande-eternal-sunshine-release-1234983201/ |url-access=subscription |access-date=March 8, 2024 |magazine=[[Rolling Stone]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308060209/https://www.rollingstone.com/music/music-news/ariana-grande-eternal-sunshine-release-1234983201/ |url-status=live}}</ref> ''Eternal Sunshine'' marked her first major foray into [[Dance music|dance]] and [[House music|house]] music.<ref>{{cite magazine |last=Spanos |first=Brittany |date=March 8, 2024 |title=Ariana Grande is Gorgeously Exposed on 'Eternal Sunshine' |url=https://www.rollingstone.com/music/music-album-reviews/ariana-grande-eternal-sunshine-review-1234983313/ |url-access=subscription |access-date=March 8, 2024 |magazine=[[Rolling Stone]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308092533/https://www.rollingstone.com/music/music-album-reviews/ariana-grande-eternal-sunshine-review-1234983313/ |url-status=live}}</ref><ref>{{Cite magazine |last=Denis |first=Kyle |date=March 8, 2024 |title=Ariana Grande's 'Eternal Sunshine': All 13 Tracks Ranked |url=https://www.billboard.com/lists/ariana-grande-eternal-sunshine-songs-ranked/ |access-date=March 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308125523/https://www.billboard.com/lists/ariana-grande-eternal-sunshine-songs-ranked/ |url-status=live}}</ref> Met with universal acclaim, critics dubbed it one of her most mature and sophisticated records yet.<ref>
* {{cite web |url=https://www.nme.com/reviews/album/ariana-grande-eternal-sunshine-lyrics-tracklist-3598038 |title=Ariana Grande – 'Eternal Sunshine' review: a compelling mood piece |website=[[NME]] |last=Levine |first=Nick |date=March 8, 2024 |access-date=March 8, 2024 |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308092649/https://www.nme.com/reviews/album/ariana-grande-eternal-sunshine-lyrics-tracklist-3598038 |url-status=live}}
* {{Cite web |last=Harrison |first=Emma |date=March 11, 2024 |title=Ariana Grande – Eternal Sunshine |url=https://www.clashmusic.com/reviews/ariana-grande-eternal-sunshine/ |access-date=March 12, 2024 |magazine=[[Clash (magazine)|Clash]] |archive-date=March 12, 2024 |archive-url=https://web.archive.org/web/20240312084232/https://www.clashmusic.com/reviews/ariana-grande-eternal-sunshine/ |url-status=live}}
* {{Cite news |last=Snapes |first=Laura |date=March 8, 2024 |title=Ariana Grande: Eternal Sunshine review – perceptive post-divorce album is nearly spotless |url=https://www.theguardian.com/music/2024/mar/08/ariana-grande-eternal-sunshine-album-review |url-status=live |archive-url=https://web.archive.org/web/20240308092534/https://www.theguardian.com/music/2024/mar/08/ariana-grande-eternal-sunshine-album-review |archive-date=March 8, 2024 |access-date=March 8, 2024 |newspaper=[[The Guardian]] |issn=0261-3077}}
* {{Cite news |last=Zoladz |first=Lindsay |date=March 8, 2024 |title=Ariana Grande Spins Heartbreak Into Gold on 'Eternal Sunshine' |url=https://www.nytimes.com/2024/03/08/arts/music/ariana-grande-eternal-sunshine-review.html |access-date=March 8, 2024 |newspaper=[[The New York Times]] |archive-date=March 8, 2024 |archive-url=https://web.archive.org/web/20240308170557/https://www.nytimes.com/2024/03/08/arts/music/ariana-grande-eternal-sunshine-review.html |url-status=live}}
* {{cite web |last=Tafoya |first=Harry |date=March 11, 2024 |title=Ariana Grande: eternal sunshine Album Review |url=https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/ |access-date=March 11, 2024 |website=[[Pitchfork (website)|Pitchfork]] |url-status=live |archive-date=March 11, 2024 |archive-url=https://web.archive.org/web/20240311041548/https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/}}</ref> Both the album and its second single debuted atop the ''Billboard'' 200 and the Hot 100 respectively,<ref name="wcbfES">{{Cite web |last=Garcia |first=Thania |date=March 18, 2024 |title=Ariana Grande Scores Sixth No. 1 Album and Launches 'We Can't Be Friends (Wait for Your Love)' to Top of Hot 100 |url=https://variety.com/2024/music/news/ariana-grande-eternal-sunshine-number-one-billboard-songs-albums-charts-1235944996/ |archive-url=https://web.archive.org/web/20240318201604/https://variety.com/2024/music/news/ariana-grande-eternal-sunshine-number-one-billboard-songs-albums-charts-1235944996/ |archive-date=March 18, 2024 |access-date=March 20, 2024 |website=[[Variety (magazine)|Variety]] |url-status=live}}</ref> achieving Grande's third-largest sales week (227,000 units) and making her the woman with the [[List of Billboard Hot 100 chart achievements and milestones#Most number-one debuts|most Hot 100 number-one debuts]] (7).<ref name="wcbfn1"/><ref>{{Cite magazine |last=Caulfield |first=Keith |date=March 17, 2024 |title=Ariana Grande Scores Sixth No. 1 Album on ''Billboard'' 200 With 'Eternal Sunshine' |url=https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-number-one-billboard-200-albums-chart-1235635290/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=July 15, 2024 |archive-url=https://web.archive.org/web/20240715181055/https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-number-one-billboard-200-albums-chart-1235635290/ |url-status=live}}</ref> Elsewhere, the album debuted at number one in thirteen countries, including Australia,<ref>{{cite magazine |last=Brandle |first=Lars |date=March 15, 2024 |title=Ariana Grande Shines at No. 1 In Australia With 'Eternal Sunshine' |url=https://www.billboard.com/music/chart-beat/ariana-grande-no-1-australia-eternal-sunshine-1235634094/ |url-status=live |archive-url=https://web.archive.org/web/20240319113853/https://www.billboard.com/music/chart-beat/ariana-grande-no-1-australia-eternal-sunshine-1235634094/ |archive-date=March 19, 2024 |access-date=March 19, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Canada,<ref>{{cite magazine |date=March 20, 2024 |title=Canadian Albums Chart (Week of March 23, 2024) |url=https://www.billboard.com/charts/canadian-albums/2024-03-23 |archive-url=https://web.archive.org/web/20240319205617/https://www.billboard.com/charts/canadian-albums/2024-03-23/ |archive-date=March 19, 2024 |access-date=March 20, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and the UK.<ref>{{Cite magazine |last=Brandle |first=Lars |date=March 18, 2024 |title=Ariana Grande's 'Eternal Sunshine' Glows at No. 1 In U.K. |url=https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-no-1-uk-1235634172/ |access-date=July 25, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=January 19, 2025 |archive-url=https://web.archive.org/web/20250119204456/https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-no-1-uk-1235634172/ |url-status=live}}</ref> With ''Eternal Sunshine'' and ''Thank U, Next'', Grande became the first woman to have two albums produce multiple number-one single debuts in the US.<ref name="wcbfES"/> It also marked her first instance of reaching the top of both the ''Billboard'' [[Billboard charts#Other charts|Hot 100 Songwriters and Hot 100 Producers]] charts.<ref>{{cite magazine |first=Xander |last=Zellner |title=Ariana Grande Rules Hot 100 Songwriters & Producers Charts for First Time |url=https://www.billboard.com/music/chart-beat/ariana-grande-hot-100-songwriters-producers-charts-first-time-1235637168/ |magazine=[[Billboard (magazine)|Billboard]] |date=March 20, 2024 |access-date=March 21, 2024 |archive-date=March 20, 2024 |archive-url=https://web.archive.org/web/20240320222341/https://www.billboard.com/music/chart-beat/ariana-grande-hot-100-songwriters-producers-charts-first-time-1235637168/ |url-status=live}}</ref> Topping the [[Pop Airplay]] chart for two weeks,<ref>{{Cite web |last=Cantor |first=Brian |date=May 26, 2024 |title=Ariana Grande's "We Can't Be Friends" Spends 2nd Week As Pop Radio's #1 Song |url=https://headlineplanet.com/home/2024/05/26/ariana-grandes-we-cant-be-friends-spends-2nd-week-as-pop-radios-1-song/ |access-date=October 10, 2024 |website=Headline Planet |archive-date=September 16, 2024 |archive-url=https://web.archive.org/web/20240916101138/https://headlineplanet.com/home/2024/05/26/ariana-grandes-we-cant-be-friends-spends-2nd-week-as-pop-radios-1-song/ |url-status=live}}</ref> "We Can't Be Friends (Wait for Your Love)" marked Grande's tenth number-one.<ref>{{Cite magazine |last=Trust |first=Gary |date=May 17, 2024 |title=Ariana Grande's 'We Can't Be Friends (Wait for Your Love)' Hits No. 1 on Pop Airplay Chart |url=https://www.billboard.com/music/chart-beat/ariana-grande-we-cant-be-friends-wait-for-your-love-number-one-pop-airplay-chart-1235686229/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 12, 2024 |archive-url=https://web.archive.org/web/20241212075736/https://www.billboard.com/music/chart-beat/ariana-grande-we-cant-be-friends-wait-for-your-love-number-one-pop-airplay-chart-1235686229/ |url-status=live}}</ref>
On May 6, 2024, Grande performed at the [[Met Gala]] and was joined on stage by [[Cynthia Erivo]] to close out her performance.<ref name="voguemet">{{cite magazine |url=https://www.vogue.com/article/ariana-grande-cynthia-erivo-performance-met-gala-2024 |title=Ariana Grande Closed Out the 2024 Met Gala With an Epic Performance—And a Special Guest Appearance From Cynthia Erivo |date=May 7, 2024 |magazine=[[Vogue (magazine)|Vogue]] |access-date=May 7, 2024 |archive-date=May 7, 2024 |archive-url=https://web.archive.org/web/20240507071546/https://www.vogue.com/article/ariana-grande-cynthia-erivo-performance-met-gala-2024 |url-status=live}}</ref> "[[The Boy Is Mine (Ariana Grande song)|The Boy Is Mine]]", which reached the top 20 on the Hot 100,<ref>{{cite magazine |last=Zellner |first=Xander |date=March 18, 2024 |title=Ariana Grande Charts 12 Songs on Hot 100 From New Album 'Eternal Sunshine' |url=https://www.billboard.com/music/chart-beat/ariana-grande-12-songs-hot-100-eternal-sunshine-1235636091/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 27, 2024 |archive-url=https://web.archive.org/web/20240327211415/https://www.billboard.com/music/chart-beat/ariana-grande-12-songs-hot-100-eternal-sunshine-1235636091/ |url-status=live}}</ref> was issued as the third ''Eternal Sunshine'' single in June;<ref>* {{Cite magazine |last=Dailey |first=Hannah |date=June 7, 2024 |title=Watch Brandy & Monica Make Surprise Cameos in Ariana Grande's 'The Boy Is Mine' Music Video |url=https://www.billboard.com/music/music-news/ariana-grande-boy-is-mine-video-brandy-monica-cameos-1235703500/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=September 13, 2024 |archive-url=https://web.archive.org/web/20240913222419/https://www.billboard.com/music/music-news/ariana-grande-boy-is-mine-video-brandy-monica-cameos-1235703500/ |url-status=live}}
* {{Cite magazine |title=YOUR RADIO ADD RECAPS |url=https://hitsdailydouble.com/pop_mart%26id%3D341561%26title%3DYOUR-RADIO-ADD-RECAPS |archive-url=https://web.archive.org/web/20240612000716/https://hitsdailydouble.com/pop_mart%26id%3D341561%26title%3DYOUR-RADIO-ADD-RECAPS |archive-date=June 12, 2024 |access-date=October 10, 2024 |magazine=[[Hits (magazine)|HITS Daily Double]] |url-status=live}}</ref> a remix featuring [[Brandy Norwood|Brandy]] and [[Monica (singer)|Monica]] followed later that month.<ref>{{cite web |url=https://www.nme.com/news/music/listen-to-ariana-grandes-the-boy-is-mine-remix-with-brandy-and-monica-3767507 |title=Listen to Ariana Grande's 'The Boy Is Mine' remix with Brandy and Monica |website=[[NME]] |last=Pilley |first=Max |date=June 21, 2024 |access-date=June 22, 2024 |archive-date=September 17, 2024 |archive-url=https://web.archive.org/web/20240917214826/https://www.nme.com/news/music/listen-to-ariana-grandes-the-boy-is-mine-remix-with-brandy-and-monica-3767507 |url-status=live}}</ref> On August 22, 2024, Grande released a reissue of her second studio album, ''My Everything'', for the tenth anniversary of the record.<ref>{{Cite magazine |last=Dailey |first=Hannah |date=August 22, 2024 |title=Ariana Grande Drops 'My Everything' 10th Anniversary Vinyl & Deluxe |url=https://www.billboard.com/music/music-news/ariana-grande-my-everything-10th-anniversary-vinyl-deluxe-1235758624/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 22, 2024 |archive-date=December 20, 2024 |archive-url=https://web.archive.org/web/20241220072709/https://www.billboard.com/music/music-news/ariana-grande-my-everything-10th-anniversary-vinyl-deluxe-1235758624/ |url-status=live}}</ref> Two extended editions of ''Eternal Sunshine'' containing the pre-released single remixes, guest vocals from [[Troye Sivan]], and live versions of several tracks, were [[Surprise album|surprise released]] in March and October 2024.<ref>{{Cite magazine |last=Kaufman |first=Gil |date=March 11, 2024 |title=Ariana Grande Releases 'Sightly Deluxe' Edition of 'Eternal Sunshine' With Mariah Carey, Troye Sivan Features |url=https://www.billboard.com/music/pop/ariana-grande-slightly-deluxe-edition-eternal-sunshine-mariah-carey-troye-sivan-1235629656/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 11, 2024 |archive-url=https://web.archive.org/web/20240311145032/https://www.billboard.com/music/pop/ariana-grande-slightly-deluxe-edition-eternal-sunshine-mariah-carey-troye-sivan-1235629656/ |url-status=live}}</ref><ref>{{Cite magazine |last=Dailey |first=Hannah |date=October 1, 2024 |title=Ariana Grande Surprise Drops 'Eternal Sunshine' Deluxe Featuring 7 Live Performances & Videos |url=https://www.billboard.com/music/music-news/ariana-grande-eternal-sunshine-deluxe-live-versions-1235789640/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=October 7, 2024 |archive-url=https://web.archive.org/web/20241007102933/https://www.billboard.com/music/music-news/ariana-grande-eternal-sunshine-deluxe-live-versions-1235789640/ |url-status=live}}</ref> Grande appeared as the musical guest on ''[[Saturday Night Live]]'' on [[Saturday Night Live season 49#ep962|March 9, 2024]], to promote ''Eternal Sunshine''.<ref>{{Cite magazine |last=Peters |first=Mitchell |date=March 10, 2024 |title=Ariana Grande Powerfully Delivers Two New 'Eternal Sunshine' Songs on 'SNL': Watch |url=https://www.billboard.com/music/music-news/ariana-grande-snl-eternal-sunshine-songs-performance-videos-1235628925/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 24, 2024 |archive-url=https://web.archive.org/web/20240324171019/https://www.billboard.com/music/music-news/ariana-grande-snl-eternal-sunshine-songs-performance-videos-1235628925/ |url-status=live}}</ref> She featured on the remix to "[[Sympathy Is a Knife#Ariana Grande remix|Sympathy Is a Knife]]" on [[Charli XCX]]'s remix album ''[[Brat and It's Completely Different but Also Still Brat]]'', released on October 11, 2024.<ref>{{Cite web |last=Chelosky |first=Danielle |date=October 11, 2024 |title=Stream Charli XCX's New ''Brat'' Remixes Feat. Ariana Grande, Bon Iver, The 1975, & More |url=https://www.stereogum.com/2283580/charli-xcx-brat-remixes-album/music/ |access-date=October 12, 2024 |website=[[Stereogum]] |archive-date=December 11, 2024 |archive-url=https://web.archive.org/web/20241211230534/https://www.stereogum.com/2283580/charli-xcx-brat-remixes-album/music/ |url-status=live}}</ref> On the ''[[Las Culturistas]]'' podcast, Grande acknowledged that she would likely scale back her pop music output compared to earlier in her career, shifting her focus more towards acting.<ref>{{Cite magazine |last=Dailey |first=Hannah |date=November 6, 2024 |title=Ariana Grande Reveals 'Scary' Plans to Scale Back Pop Star Career & Focus More on Musical Theater |url=https://www.billboard.com/music/music-news/ariana-grande-scale-back-pop-career-focus-musical-theater-1235821508/ |access-date=November 18, 2024 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219194326/https://www.billboard.com/music/music-news/ariana-grande-scale-back-pop-career-focus-musical-theater-1235821508/ |url-status=live}}</ref> ''Eternal Sunshine'' was ranked as 2024's thirteenth-best-selling and ninth-most-streamed album globally by the [[International Federation of the Phonographic Industry]] (IFPI).<ref name="ifpi2024">{{cite web |date=February 18, 2025 |title=Taylor Swift makes music history as IFPI's Biggest-Selling Global Recording Artist of the Year for the fifth time |url=https://www.ifpi.org/taylor-swift-makes-music-history-as-ifpis-biggest-selling-global-recording-artist-of-the-year-for-the-fifth-time |access-date=April 8, 2025 |publisher=[[International Federation of the Phonographic Industry]] (IFPI) |archive-date=April 3, 2025 |archive-url=https://web.archive.org/web/20250403103458/https://www.ifpi.org/taylor-swift-makes-music-history-as-ifpis-biggest-selling-global-recording-artist-of-the-year-for-the-fifth-time/ |url-status=live}}</ref>
At the [[67th Annual Grammy Awards]], Grande was nominated for [[Grammy Award for Best Pop Vocal Album|Best Pop Vocal Album]] (''Eternal Sunshine''), [[Grammy Award for Best Pop Duo/Group Performance|Best Pop Duo/Group Performance]] ("The Boy Is Mine" remix), and [[Grammy Award for Best Dance Pop Recording|Best Dance Pop Recording]] ("Yes, And?").<ref>{{Cite news |date=February 2, 2025 |title=All the winners and nominees at the 2025 Grammy Awards |url=https://www.bbc.com/news/articles/ckg0jg4n0z4o/ |access-date=February 5, 2025 |publisher=[[BBC News]] |archive-date=February 3, 2025 |archive-url=https://web.archive.org/web/20250203185610/https://www.bbc.com/news/articles/ckg0jg4n0z4o |url-status=live}}</ref> ''[[Eternal Sunshine Deluxe: Brighter Days Ahead]]'', a reissue of ''Eternal Sunshine'', was released on March 28, 2025.<ref>{{Cite magazine |last=Aniftos |first=Rania |date=March 28, 2025 |title=Ariana Grande Welcomes 'Brighter Days Ahead' With 'Eternal Sunshine' Deluxe Album: Stream It Now |url=https://www.billboard.com/music/pop/ariana-grande-eternal-sunshine-deluxe-brighter-days-ahead-1235933370/ |access-date=March 29, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 28, 2025 |archive-url=https://web.archive.org/web/20250328130116/https://www.billboard.com/music/pop/ariana-grande-eternal-sunshine-deluxe-brighter-days-ahead-1235933370/ |url-status=live}}</ref> Grande starred as the protagonist Peaches in the accompanying short film ''[[Brighter Days Ahead]]'', which she directed and wrote with [[Christian Breslauer]]; it was released on the same day. Her directorial debut,<ref>{{Cite magazine |last=Fell |first=Nicole |date=March 28, 2025 |title=Ariana Grande Revisits Love and Loss in Magical Short Film 'Brighter Days Ahead' |url=https://www.hollywoodreporter.com/news/music-news/ariana-grande-short-film-brighter-days-ahead-1236175163/ |access-date=March 29, 2025 |magazine=The Hollywood Reporter}}</ref> the short film won the [[MTV Video Music Award for Video of the Year|Video of the Year]] award at the [[2025 MTV Video Music Awards]].<ref>{{Cite magazine |last=Nordyke |first=Kimberly |date=September 7, 2025 |title=MTV VMAs: Winners List |url=https://www.hollywoodreporter.com/lists/mtv-vmas-2025-winners-list/ |url-status=live |archive-url=https://web.archive.org/web/20250907203537/https://www.hollywoodreporter.com/lists/mtv-vmas-2025-winners-list/ |archive-date=September 7, 2025 |access-date=September 7, 2025 |magazine=The Hollywood Reporter}}</ref> With the release of the reissue, ''Eternal Sunshine'' became Grande's longest-running number one album in the US (three weeks).<ref>{{Cite news |last=Thompson |first=Stephen |date=April 8, 2025 |title=Ariana Grande's 'Eternal Sunshine' takes a wicked leap to No. 1, a year after its release |url=https://www.npr.org/2025/04/08/g-s1-59035/ariana-grande-eternal-sunshine-deluxe-no-1-charts/ |access-date=April 20, 2025 |publisher=[[NPR]] |archive-date=April 22, 2025 |archive-url=https://web.archive.org/web/20250422220948/https://www.npr.org/2025/04/08/g-s1-59035/ariana-grande-eternal-sunshine-deluxe-no-1-charts |url-status=live}}</ref> Aided by ''Brighter Days Ahead'', the album returned to the top of the charts in Australia, Canada, Ireland, and New Zealand, over a year after its release.<ref>* {{Cite magazine |last=Lynch |first=Jessica |date=April 4, 2025 |title=Grande Larceny: Ariana Steals Back the ARIA No. 1 Spot |url=https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-returns-no-1-aria-chart-1235939255/ |access-date=April 4, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 4, 2025 |archive-url=https://web.archive.org/web/20250404092033/https://www.billboard.com/music/chart-beat/ariana-grande-eternal-sunshine-returns-no-1-aria-chart-1235939255/ |url-status=live}}
* {{Cite magazine |last=Cusson |first=Michael |date=January 2, 2013 |title=''Billboard'' Canadian Albums |url=https://www.billboard.com/charts/canadian-albums/ |access-date=April 12, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=March 31, 2022 |archive-url=https://web.archive.org/web/20220331124809/https://www.billboard.com/charts/canadian-albums/ |url-status=live}}
* {{cite web |date=April 3, 2025 |title=Official Irish Albums Chart (3 April 2025 - 10 April 2025) |url=https://www.officialcharts.com/charts/irish-albums-chart/20250403/ie7502/ |access-date=May 2, 2025 |publisher=[[Official Charts Company]]}}
* {{Cite web |title=Kōpae Tiketike 40 Ōkawa {{!}} Official Top 40 Albums |url=https://aotearoamusiccharts.co.nz/charts/albums |access-date=April 4, 2025 |publisher=[[Official Aotearoa Music Charts]] |archive-date=April 4, 2025 |archive-url=https://web.archive.org/web/20250404144738/https://aotearoamusiccharts.co.nz/charts/albums |url-status=live}}</ref> The bonus track "[[Twilight Zone (Ariana Grande song)|Twilight Zone]]" was released as the reissue's lead single in April 2025, reaching the top ten on the ''Billboard'' Global 200 and the UK singles chart.<ref>{{Cite magazine |last=Trust |first=Gary |date=April 7, 2025 |title=Lady Gaga & Bruno Mars' 'Die With a Smile' Tops Global 200 Chart for 15th Week |url=https://www.billboard.com/music/chart-beat/lady-gaga-bruno-mars-die-with-a-smile-global-200-number-one-15th-week-1235940912/ |access-date=May 3, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 7, 2025 |archive-url=https://web.archive.org/web/20250407190138/https://www.billboard.com/music/chart-beat/lady-gaga-bruno-mars-die-with-a-smile-global-200-number-one-15th-week-1235940912/ |url-status=live}}</ref><ref>{{Cite magazine |last=Smith |first=Thomas |date=April 4, 2025 |title=Alex Warren's 'Ordinary' Scores Third Week at No. 1 on U.K. Singles Chart |url=https://www.billboard.com/music/chart-beat/alex-warren-ordinary-third-week-number-1-uk-singles-chart-1235939354/ |access-date=May 3, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=April 10, 2025 |archive-url=https://web.archive.org/web/20250410200246/https://www.billboard.com/music/chart-beat/alex-warren-ordinary-third-week-number-1-uk-singles-chart-1235939354/ |url-status=live}}</ref> Later that month, Grande featured on [[Jeff Goldblum]] and the Mildred Snitzer Orchestra's jazz album ''Still Blooming'' for a rendition of the song "[[I Don't Know Why (I Just Do)]]".<ref>{{Cite magazine |last=Kelly |first=Tyler Damara |date=April 25, 2025 |title=Ariana Grande and Jeff Goldblum join forces on new single, "I Don't Know Why (I Just Do)" |url=https://www.thelineofbestfit.com/news/ariana-grande-and-jeff-goldblum-join-forces-on-new-single-i-dont-know-why-i-just-do/ |access-date=December 21, 2025 |magazine=[[The Line of Best Fit]] |archive-date=May 13, 2025 |archive-url=https://web.archive.org/web/20250513102444/https://www.thelineofbestfit.com/news/ariana-grande-and-jeff-goldblum-join-forces-on-new-single-i-dont-know-why-i-just-do |url-status=live}}</ref> She and Mariah Carey joined [[Barbra Streisand]] on "One Heart, One Voice" for Streisand's album ''[[The Secret of Life: Partners, Volume Two]]'', released on June 27, 2025.<ref>{{cite magazine |last=Lynch |first=Jessica |date=July 1, 2025 |title=Barbra Streisand Says Collab With Mariah Carey and Ariana Grande 'Felt Inevitable' |url=https://www.billboard.com/music/pop/barbra-streisand-mariah-carey-ariana-grande-collab-1236012363/ |access-date=July 17, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=July 24, 2025 |archive-url=https://web.archive.org/web/20250724014359/https://www.billboard.com/music/pop/barbra-streisand-mariah-carey-ariana-grande-collab-1236012363/ |url-status=live}}</ref> Whilst describing the three as "the holy trinity of glorious sound", Melissa Ruggieri of ''[[USA Today]]'' called the track an "otherwise generic ballad [that] showcases a trio steeped in restraint".<ref>{{Cite news |last=Ruggieri |first=Melissa |date=June 27, 2025 |title=Barbra Streisand swoons with McCartney, Dylan, Mariah on lush duets album: Review |url=https://www.usatoday.com/story/entertainment/music/2025/06/27/barbra-streisand-duets-album-review/84354045007/ |access-date=July 17, 2025 |work=[[USA Today]] |archive-date=July 24, 2025 |archive-url=https://web.archive.org/web/20250724211133/https://www.usatoday.com/story/entertainment/music/2025/06/27/barbra-streisand-duets-album-review/84354045007/ |url-status=live}}</ref>
Grande starred as [[Glinda#Wicked|Galinda Upland]] alongside [[Cynthia Erivo]] as [[Elphaba Thropp]] in the [[Wicked (film franchise)|two-part film adaptation]] of the fantasy musical ''[[Wicked (musical)|Wicked]]'', directed by [[Jon M. Chu]].<ref>{{Cite web |last=Garner |first=Glenn |date=November 3, 2024 |title=Ariana Grande Understands Fan Criticism Of Her 'Wicked' Casting: "I Get It" |url=https://deadline.com/2024/11/ariana-grande-understands-fan-criticism-wicked-casting-1236165900/ |access-date=November 4, 2024 |website=Deadline Hollywood |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219111414/https://deadline.com/2024/11/ariana-grande-understands-fan-criticism-wicked-casting-1236165900/ |url-status=live}}</ref> She was cast in November 2021 after auditioning five times for the role.<ref name="wickedcasting">{{cite magazine |last1=Shafer |first1=Ellise |last2=Donnelly |first2=Matt |title=Ariana Grande and Cynthia Erivo to Star in 'Wicked' Musical for Universal |url=https://variety.com/2021/film/news/ariana-grande-cynthia-erivo-wicked-musical-universal-1235105480/ |magazine=Variety |access-date=November 4, 2021 |date=November 4, 2021 |archive-date=June 15, 2022 |archive-url=https://web.archive.org/web/20220615170245/https://variety.com/2021/film/news/ariana-grande-cynthia-erivo-wicked-musical-universal-1235105480/ |url-status=live}}</ref> She was credited with her birth name Ariana Grande-Butera, which was her name when she first saw the stage musical at age ten.<ref>{{Cite magazine |first=Angelique |last=Jackson |date=November 4, 2024 |title=Ariana Grande Is Credited in 'Wicked' as 'Ariana Grande-Butera' Because 'That Was My Name When I Went to See the Show' at 10 Years Old |url=https://variety.com/2024/film/news/ariana-grande-wicked-credit-full-name-butera-1236198018/ |access-date=November 5, 2024 |magazine=[[Variety (magazine)|Variety]] |archive-date=July 10, 2025 |archive-url=https://web.archive.org/web/20250710013341/https://variety.com/2024/film/news/ariana-grande-wicked-credit-full-name-butera-1236198018/ |url-status=live}}</ref> Grande reported that she began taking acting and singing lessons months before she auditioned for the role of Glinda because she wanted to be cast "so badly".<ref>{{Cite web |date=June 17, 2024 |title=Ariana Grande took singing and acting lessons to prepare for Wicked audition |url=https://www.pearlanddean.com/ariana-grande-took-singing-and-acting-lessons-to-prepare-for-wicked-audition/ |access-date=March 17, 2025 |publisher=Pearl & Dean Cinemas |archive-date=May 23, 2025 |archive-url=https://web.archive.org/web/20250523142607/https://www.pearlanddean.com/ariana-grande-took-singing-and-acting-lessons-to-prepare-for-wicked-audition/ |url-status=live}}</ref> The first part, ''[[Wicked (2024 film)|Wicked]]'', was theatrically released in November 2024,<ref>{{cite web |last1=D'Alessandro |first1=Anthony |date=July 1, 2024 |title='Wicked' Shifts Earlier In November, Dates Against 'Gladiator II': Is Another 'Barbenheimer' Box Office Weekend In Store? |url=https://deadline.com/2024/07/wicked-release-date-change-moana-2-1235999048/ |access-date=October 10, 2024 |website=Deadline Hollywood |archive-date=July 1, 2024 |archive-url=https://web.archive.org/web/20240701230753/https://deadline.com/2024/07/wicked-release-date-change-moana-2-1235999048/ |url-status=live}}</ref> followed by the second part, ''[[Wicked: For Good]]'', in November 2025.<ref>{{Cite news |last=Ardrey |first=Taylor |date=November 19, 2025 |title='Wicked: For Good' debuts in theaters this week. See release date, cast, more. |url=https://www.usatoday.com/story/entertainment/movies/2025/11/19/wicked-for-good-theatrical-release-date/87337790007/ |access-date=November 21, 2025 |work=[[USA Today]] |archive-date=November 27, 2025 |archive-url=https://web.archive.org/web/20251127003735/https://www.usatoday.com/story/entertainment/movies/2025/11/19/wicked-for-good-theatrical-release-date/87337790007/ |url-status=live}}</ref> Critically acclaimed, ''Wicked'' was regarded amongst the best musical films of the 21st century and declared a pop culture phenomenon by various media.<ref>* {{cite web |date=July 2, 2025 |title=Readers Choose Their Top Movies of the 21st Century |url=https://www.nytimes.com/interactive/2025/movies/readers-movies-21st-century.html |access-date=July 2, 2025 |work=[[The New York Times]] |archive-date=July 3, 2025 |archive-url=https://web.archive.org/web/20250703010446/https://www.nytimes.com/interactive/2025/movies/readers-movies-21st-century.html |url-status=live}}
* {{Cite news |last1=Burr |first1=Ty |author-link=Ty Burr |last2=Kumar |first2=Naveen |date=February 27, 2025 |title=The 25 best movie musicals of the 21st century |url=https://www.washingtonpost.com/entertainment/movies/2025/02/27/best-musical-movies/ |access-date=April 12, 2025 |newspaper=The Washington Post |archive-date=April 5, 2025 |archive-url=https://web.archive.org/web/20250405160220/https://www.washingtonpost.com/entertainment/movies/2025/02/27/best-musical-movies/ |url-status=live}}
* {{cite web |date=December 15, 2024 |title=10 Best Fantasy Movies of the 2020s So Far, Ranked |url=https://collider.com/fantasy-movies-2020s-best-ranked/ |website=[[Collider (website)|Collider]] |access-date=July 25, 2025 |archive-date=December 17, 2024 |archive-url=https://web.archive.org/web/20241217220210/https://collider.com/fantasy-movies-2020s-best-ranked/ |url-status=live}}
* {{cite web |last=Ciriaco |first=Andrea |date=December 24, 2024 |title=The 12 Best Movie Musicals of the Last 25 Years, Ranked |url=https://collider.com/best-movie-musicals-last-25-years-ranked/ |access-date=January 31, 2025 |work=Collider |archive-date=December 28, 2024 |archive-url=https://web.archive.org/web/20241228151840/https://collider.com/best-movie-musicals-last-25-years-ranked/ |url-status=live}}
* {{cite web |date=November 26, 2024 |title=The 25 Best Musicals of the 21st Century, Ranked |url=https://collider.com/best-movie-musicals-of-the-21st-century/ |website=[[Collider (website)|Collider]]}}
* {{Cite web |last=Hemenway |first=Megan |date=February 21, 2025 |title=10 Best Fantasy Movies Of The 2020s (So Far), Ranked |url=https://screenrant.com/best-fantasy-movies-2020s-so-far-list/ |access-date=February 23, 2025 |website=Screen Rant |archive-date=July 18, 2025 |archive-url=https://web.archive.org/web/20250718172824/https://screenrant.com/best-fantasy-movies-2020s-so-far-list/ |url-status=live}}
* {{Cite web |date=March 3, 2025 |title=40 best movie musicals of all time |url=https://www.timeout.com/movies/best-movie-musicals-of-all-time |access-date=April 12, 2025 |website=Time Out |archive-date=July 28, 2025 |archive-url=https://web.archive.org/web/20250728203409/https://www.timeout.com/movies/best-movie-musicals-of-all-time |url-status=live}}
* {{Cite web |date=November 25, 2024 |title=The 22 Best Witch Movies of All Time |url=https://www.vulture.com/article/best-witch-movies.html |access-date=April 18, 2025 |website=[[Vulture (website)|Vulture]] |archive-date=July 15, 2025 |archive-url=https://web.archive.org/web/20250715023645/https://www.vulture.com/article/best-witch-movies.html |url-status=live}}</ref><ref>* {{cite magazine |date=November 27, 2024 |title=Why 'Wicked' Is What Society Needs Right Now |url=https://elle.com/uk/life-and-culture/culture/a63018974/wicked-representation |access-date=December 8, 2024 |magazine=[[Elle (magazine)|Elle]] |archive-date=December 7, 2024 |archive-url=https://web.archive.org/web/20241207060751/https://www.elle.com/uk/life-and-culture/culture/a63018974/wicked-representation/ |url-status=live}}
* {{Cite web |date=December 6, 2024 |title='Wicked' Choreographer Breaks Down Steps to Viral 'What Is This Feeling?' Dance |url=https://www.today.com/popculture/movies/what-is-this-feeling-loathing-dance-wicked-choreographer-rcna183164 |access-date=December 9, 2024 |website=[[Today (American TV program)|Today]] |archive-date=December 8, 2024 |archive-url=https://web.archive.org/web/20241208084716/https://www.today.com/popculture/movies/what-is-this-feeling-loathing-dance-wicked-choreographer-rcna183164 |url-status=live}}</ref> ''For Good'' was met with lukewarm reviews and less enthusiasm than its predecessor.<ref>* {{cite news |last1=McIntosh |first1=Steven |date=November 19, 2025 |title=Wicked sequel leaves critics less spellbound than first film |url=https://www.bbc.com/news/articles/c1m3ddkn3gdo |access-date=November 22, 2025 |publisher=[[BBC]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121173510/https://www.bbc.com/news/articles/c1m3ddkn3gdo |url-status=live}}
* {{cite magazine |last1=Murray |first1=Conor |date=November 18, 2025 |title='Wicked: For Good' Reviews Lag Behind Part One—But Still Expected To Thrive At Box Office |url=https://www.forbes.com/sites/conormurray/2025/11/18/wicked-for-good-reviews-lag-behind-part-one-but-still-expected-to-thrive-at-box-office/ |access-date=November 22, 2025 |magazine=[[Forbes]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121195136/https://www.forbes.com/sites/conormurray/2025/11/18/wicked-for-good-reviews-lag-behind-part-one-but-still-expected-to-thrive-at-box-office/ |url-status=live}}
* {{Cite news |last1=Whipp |first1=Glenn |date=November 21, 2025 |title=Why 'Wicked's' Oscar spell might be broken 'For Good' |url=https://www.latimes.com/entertainment-arts/awards/newsletter/2025-11-21/wicked-for-good-oscars-cynthia-erivo-ariana-grande |access-date=November 22, 2025 |work=[[Los Angeles Times]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121152135/https://www.latimes.com/entertainment-arts/awards/newsletter/2025-11-21/wicked-for-good-oscars-cynthia-erivo-ariana-grande |url-status=live}}
* {{cite magazine |last1=Carson |first1=Lexi |date=November 18, 2025 |title='Wicked: For Good' — What the Critics Are Saying |url=https://www.hollywoodreporter.com/movies/movie-news/wicked-for-good-reviews-what-critics-are-saying-1236430079/ |access-date=November 22, 2025 |magazine=[[The Hollywood Reporter]] |publisher=[[Penske Media Corporation]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121230046/https://www.hollywoodreporter.com/movies/movie-news/wicked-for-good-reviews-what-critics-are-saying-1236430079/ |url-status=live}}
* {{cite web |last1=Campbell |first1=Christopher |date=November 18, 2025 |title=''Wicked: For Good'' First Reviews: Darker, More Emotional, and Led by Stellar Performances |url=https://editorial.rottentomatoes.com/article/wicked-for-good-first-reviews/ |access-date=November 22, 2025 |publisher=[[Rotten Tomatoes]] |archive-date=November 23, 2025 |archive-url=https://web.archive.org/web/20251123194610/https://editorial.rottentomatoes.com/article/wicked-for-good-first-reviews/ |url-status=live}}
* {{cite web |last1=Lattanzio |first1=Ryan |last2=Thompson |first2=Anne |date=November 21, 2025 |title=Did Critics Burst the 'Wicked: For Good' Bubble? How Mixed Reviews Might Impact Its Oscar Fate |url=https://www.indiewire.com/features/podcast/wicked-for-good-reviews-mixed-oscars-1235162109/ |access-date=November 22, 2025 |website=[[IndieWire]] |publisher=[[Penske Media Corporation]] |archive-date=November 21, 2025 |archive-url=https://web.archive.org/web/20251121202557/https://www.indiewire.com/features/podcast/wicked-for-good-reviews-mixed-oscars-1235162109/ |url-status=live}}</ref> Both parts were listed among the top ten films of 2024 and 2025 by the [[American Film Institute]].<ref>{{Cite magazine |last=Hammond |first=Pete |date=2025-12-04 |title=AFI Awards Movie Top 10: 'Sinners', 'Avatar: Fire And Ash', 'Jay Kelly' Among Honorees |url=https://deadline.com/2025/12/afi-awards-2025-top-movies-list-1236636128/ |url-status=live |archive-url=https://web.archive.org/web/20251204212103/https://deadline.com/2025/12/afi-awards-2025-top-movies-list-1236636128/ |archive-date=December 4, 2025 |access-date=December 4, 2025 |magazine=[[Deadline Hollywood]]}}</ref> The two parts grossed $759 million and $539 million worldwide, becoming the highest-grossing and third-highest-grossing musical adaptation films of all time, respectively.<ref>{{Cite magazine |last=Grein |first=Paul |date=February 1, 2026 |title='Wicked: For Good' Tops $525 Million in Worldwide Grosses: Full List of Top-Grossing Film Adaptations of Broadway Musicals |url=https://www.billboard.com/lists/broadway-musical-films-biggest-box-office-wicked/ |access-date=February 2, 2026 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande's performance and comedic timing received praise from critics;<ref>* {{Cite news |last=Coscarelli |first=Joe |date=December 6, 2024 |title=Is the Real 'Wicked' Movie the Press Tour? |url=https://www.nytimes.com/2024/12/06/arts/music/wicked-movie-popcast-ariana-grande.html |url-access=subscription |archive-url=https://web.archive.org/web/20241207052640/https://www.nytimes.com/2024/12/06/arts/music/wicked-movie-popcast-ariana-grande.html |archive-date=December 7, 2024 |access-date=December 7, 2024 |newspaper=[[The New York Times]] |quote=Grande and Erivo have been praised for their performances onscreen}}
* {{Cite news |last=Welsh |first=Daniel |date=November 20, 2024 |title=Critics Have Their Say On Wicked – Does The Long-Awaited Movie Live Up To The Hype? |url=https://ca.news.yahoo.com/critics-wicked-does-long-awaited-082423692.html |access-date=November 28, 2024 |work=[[HuffPost]] |via=[[Yahoo News]] |quote=While it was Ariana who received initial Oscar buzz |archive-date=December 19, 2024 |archive-url=https://web.archive.org/web/20241219024752/https://ca.news.yahoo.com/critics-wicked-does-long-awaited-082423692.html |url-status=live}}
* {{Cite web |last=Handler |first=Rachel |date=November 27, 2024 |title=Some Unsolicited Ideas for Ariana Grande's Next Movie |url=https://www.vulture.com/article/some-unsolicited-ideas-for-ariana-grandes-next-movie.html |access-date=November 28, 2024 |website=[[Vulture (website)|Vulture]] |quote=glowing praise about Ariana Grande's performance as Glinda |archive-date=November 28, 2024 |archive-url=https://web.archive.org/web/20241128102323/https://www.vulture.com/article/some-unsolicited-ideas-for-ariana-grandes-next-movie.html |url-status=live}}</ref> she was nominated for supporting actress categories at the [[97th Academy Awards]], the [[82nd Golden Globe Awards|82nd]] and [[83rd Golden Globe Awards]], the [[30th Critics' Choice Awards|30th]] and [[31st Critics' Choice Awards]], the [[31st Screen Actors Guild Awards|31st]] and [[32nd Actor Awards]], and the [[78th British Academy Film Awards]].<ref name="WickedNoms">
* {{Cite news |last=Gonzalez |first=Shivani |date=March 2, 2025 |title=Oscars 2025 Winners: Full List |url=https://www.nytimes.com/2025/03/02/movies/oscars-winners-list.html |access-date=March 3, 2025 |newspaper=[[The New York Times]] |archive-date=March 3, 2025 |archive-url=https://web.archive.org/web/20250303005821/https://www.nytimes.com/2025/03/02/movies/oscars-winners-list.html |url-status=live}}
* {{Cite news |last=Lee |first=Benjamin |date=January 5, 2025 |title=Golden Globes 2025: the full list of winners |url=https://www.theguardian.com/film/2025/jan/05/golden-globes-winners-list/ |access-date=January 6, 2025 |newspaper=[[The Guardian]]}}
* {{Cite news |last=Ruggieri |first=Melissa |date=January 11, 2026 |title=Your complete list of Golden Globe 2026 winners |url=https://www.usatoday.com/story/entertainment/movies/2026/01/11/golden-globes-2026-winners-complete-list/88097085007/ |access-date=January 12, 2026 |work=[[USA Today]] |archive-date=January 12, 2026 |archive-url=https://web.archive.org/web/20260112060345/https://www.usatoday.com/story/entertainment/movies/2026/01/11/golden-globes-2026-winners-complete-list/88097085007/ |url-status=live}}
* {{cite magazine |last1=Nordyke |first1=Kimberly |last2=Lewis |first2=Hilary |date=February 7, 2025 |title=Critics Choice: 'Anora' Wins Best Picture; 'Emilia Pérez', 'Wicked' and 'The Substance' Take 3 Awards Each |url=https://www.hollywoodreporter.com/movies/movie-news/2025-critics-choice-awards-winners-list-1236128672/ |access-date=February 11, 2025 |magazine=[[The Hollywood Reporter]] |archive-date=February 16, 2025 |archive-url=https://web.archive.org/web/20250216031134/https://www.hollywoodreporter.com/movies/movie-news/2025-critics-choice-awards-winners-list-1236128672/ |url-status=live}}
* {{cite magazine |last=Nordyke |first=Kimberly |date=January 4, 2026 |title=Critics Choice Awards: Full Winners List |url=https://www.hollywoodreporter.com/lists/critics-choice-awards-2026-winners-list-full/best-actor-188/ |access-date=January 5, 2026 |magazine=The Hollywood Reporter}}
* {{Cite news |last=''Guardian'' film |date=February 16, 2025 |title=Baftas 2025: the full list of winners |url=https://www.theguardian.com/film/2025/feb/16/baftas-2025-the-full-list-of-winners-live/ |access-date=February 17, 2025 |work=[[The Guardian]]}}
* {{Cite magazine |last1=Moreau |first1=Jordan |last2=Lang |first2=Brent |last3=Earl |first3=William |date=February 23, 2025 |title=SAG Awards 2025 Full Winners List: 'Conclave', 'Only Murders in the Building' and 'Shōgun' Take Home Top Honors |url=https://variety.com/2025/film/news/sag-awards-winners-2025-1236313200/ |access-date=February 24, 2025 |magazine=Variety |archive-date=April 20, 2025 |archive-url=https://web.archive.org/web/20250420045405/https://variety.com/2025/film/news/sag-awards-winners-2025-1236313200/ |url-status=live}}
* {{cite magazine |url=https://variety.com/2026/film/awards/sag-actor-awards-winners-sinners-studio-pitt-1236672938/ |title=SAG's Actor Awards Winners: 'Sinners' Wins Top Prize, 'The Studio' and 'The Pitt' Lead for TV |last1=Lang |first1=Brent |last2=Moreau |first2=Jordan |magazine=[[Variety (magazine)|Variety]] |date=March 1, 2026 |access-date=March 1, 2026}}</ref>
The [[Wicked: The Soundtrack|films' soundtracks]] were co-billed to Grande, who performed several songs from the musical and an original track titled "[[The Girl in the Bubble]]", written by [[Stephen Schwartz]] for the [[Wicked: For Good – The Soundtrack|''Wicked: For Good'' soundtrack]].<ref>{{Cite magazine |last=Comiter |first=Jordana |date=November 22, 2025 |title=''Wicked: For Good''{{'}}s 2 New Songs: Everything to Know About the Original Tracks Sung by Cynthia Erivo and Ariana Grande |url=https://people.com/wicked-for-good-new-songs-what-to-know-11853864 |access-date=November 22, 2025 |magazine=[[People (magazine)|People]]}}
*{{cite magazine |last=Cremona |first=Patrick |title=Wicked movie soundtrack: All the songs featured in Part One |url=https://www.radiotimes.com/movies/wicked-movie-soundtrack-part-1/ |magazine=[[Radio Times]] |access-date=December 1, 2024 |date=December 1, 2024 |archive-date=December 3, 2024 |archive-url=https://web.archive.org/web/20241203233557/https://www.radiotimes.com/movies/wicked-movie-soundtrack-part-1/ |url-status=live}}
*{{Cite magazine |last=Cremona |first=Patrick |date=November 17, 2025 |title=''Wicked: For Good'' soundtrack – all the songs in Part Two including original compositions |url=https://www.radiotimes.com/movies/wicked-for-good-soundtrack/ |access-date=November 21, 2025 |magazine=Radio Times |archive-date=November 18, 2025 |archive-url=https://web.archive.org/web/20251118213655/https://www.radiotimes.com/movies/wicked-for-good-soundtrack/ |url-status=live}}</ref> Both albums received positive reviews and debuted at number two on the ''Billboard'' 200 with 139,000 and 122,000 units, tying for the highest debut for a soundtrack to a [[stage-to-film adaptation]].<ref>{{Cite magazine |last=Willman |first=Chris |date=November 23, 2024 |title='Wicked: The Soundtrack' Album Review: Stephen Schwartz's World-Beating Song Score Gets Its Due, and So Do the Divas Who Deliver It |url=https://variety.com/2024/music/album-reviews/wicked-soundtrack-album-review-stephen-schwartz-songs-score-ariana-grande-cynthia-erivo-1236219164/ |access-date=November 24, 2024 |magazine=[[Variety (magazine)|Variety]] |archive-date=November 23, 2024 |archive-url=https://web.archive.org/web/20241123235133/https://variety.com/2024/music/album-reviews/wicked-soundtrack-album-review-stephen-schwartz-songs-score-ariana-grande-cynthia-erivo-1236219164/ |url-status=live}}</ref><ref>{{cite magazine |last=Evans |first=Greg |title='Wicked' Soundtrack Debuts At No. 2 On Billboard 200 Chart, Making History For Broadway-To-Film Adaptations |url=https://deadline.com/2024/12/wicked-soundtrack-billboard-chart-1236191273/ |magazine=[[Deadline Hollywood]] |access-date=December 2, 2024 |date=December 2, 2024 |archive-date=December 3, 2024 |archive-url=https://web.archive.org/web/20241203013357/https://deadline.com/2024/12/wicked-soundtrack-billboard-chart-1236191273/ |url-status=live}}
*{{Cite magazine |last=Caulfield |first=Keith |date=December 2, 2025 |title='Wicked: For Good' Flies Into Top 10 on 7 Billboard Charts |url=https://www.billboard.com/music/chart-beat/wicked-for-good-soundtrack-top-10-seven-billboard-charts-1236126945/ |access-date=December 3, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-date=December 3, 2025 |archive-url=https://web.archive.org/web/20251203002228/https://www.billboard.com/music/chart-beat/wicked-for-good-soundtrack-top-10-seven-billboard-charts-1236126945/ |url-status=live}}</ref> Grande and her co-star Erivo's rendition of "[[Defying Gravity (song)|Defying Gravity]]" won [[Grammy Award for Best Pop Duo/Group Performance|Best Pop Duo/Group Performance]] at the [[68th Annual Grammy Awards]].<ref name="grammys2026">{{Cite web |url=https://pitchfork.com/news/ariana-grande-cynthia-erivo-win-best-pop-duo-group-performance-2026-grammys/ |title=Ariana Grande and Cynthia Erivo Win Best Pop Duo/Group Performance at 2026 Grammys |date=February 1, 2026 |access-date=February 2, 2026 |website=Pitchfork |last=Green |first=Walden |first2=Alex |last2=Suskind}}</ref> To promote the ''Wicked'' films, Grande hosted ''Saturday Night Live'' on [[Saturday Night Live season 50#ep971|October 12, 2024]] and [[Saturday Night Live season 51#ep997|December 20, 2025]].<ref>{{Cite magazine |last=Longeretta |first=Emily |date=March 10, 2024 |title='SNL': Ariana Grande Previews 'Wicked' Riff After Singing Medley of Hits by Taylor Swift, Jennifer Lopez and More With Bowen Yang |url=https://variety.com/2024/tv/news/snl-ariana-grande-wicked-riff-bowen-yang-skit-video-1235936464/ |access-date=October 10, 2024 |magazine=Variety |archive-date=December 17, 2024 |archive-url=https://web.archive.org/web/20241217132335/https://variety.com/2024/tv/news/snl-ariana-grande-wicked-riff-bowen-yang-skit-video-1235936464/ |url-status=live}}</ref><ref>{{Cite news |last=Vasquez |first=Zach |date=December 21, 2025 |title=Saturday Night Live: Ariana Grande returns to host a blockbuster episode |url=https://www.theguardian.com/tv-and-radio/2025/dec/21/saturday-night-live-ariana-grande-cher-bowen-yang/ |access-date=December 22, 2025 |work=The Guardian}}</ref> Her 2024 episode drew the show's highest ratings since May 2021, at the time, and became its most-watched episode on [[Peacock (streaming service)|Peacock]] and across social media;<ref>{{Cite magazine |last=Shanfeld |first=Ethan |date=October 16, 2024 |title=With Ariana Grande, 'SNL' Scores Most-Watched Episode Since Elon Musk Hosted in 2021 |url=https://variety.com/2024/music/news/ariana-grande-snl-episode-highest-ratings-elon-musk-1236180125/ |access-date=October 18, 2024 |magazine=Variety}}</ref> the 2025 episode was that year and [[Saturday Night Live season 51|season 51]]'s highest-rated and ''SNL''{{'}}s most-watched holiday episode since 2020.<ref>{{Cite magazine |last=Hailu |first=Selome |date=December 24, 2025 |title=Bowen Yang's 'SNL' Exit Is Most-Watched Episode in a Year |url=https://variety.com/2025/tv/news/bowen-yang-snl-exit-ratings-1236617144/ |access-date=December 27, 2025 |magazine=Variety}}</ref> She and Erivo opened the [[97th Academy Awards]] with a medley of "[[Over the Rainbow]]", "[[Home (The Wiz song)|Home]]", and "Defying Gravity".<ref>{{Cite magazine |last=Romano |first=Nick |date=March 2, 2025 |title=''Wicked'' stars Ariana Grande and Cynthia Erivo open 2025 Oscars with gravity-defying ''Wizard of Oz'' medley |url=https://ew.com/ariana-grande-cynthia-erivo-oscars-2025-wizard-of-oz-medley-11689202/ |access-date=March 3, 2025 |magazine=[[Entertainment Weekly]]}}</ref> In November 2025, Grande appeared in the special ''[[Wicked: One Wonderful Night]]'', performing music from the ''Wicked'' films alongside the cast;<ref>{{Cite magazine |last=Campione |first=Katie |date=October 22, 2025 |title='Wicked: One Wonderful Night' First-Look Photos Tease Swankified NBC Broadcast Special Featuring Cynthia Erivo, Ariana Grande & More |url=https://deadline.com/2025/10/wicked-one-wonderful-night-first-look-photos-cynthia-ariana-1236594175/ |access-date=November 19, 2025 |magazine=[[Deadline Hollywood]]}}</ref> a live album of the special was released in tandem with the broadcast.<ref>{{Cite magazine |last=Brandle |first=Lars |date=November 11, 2025 |title=Like Magic, 'Wicked: One Wonderful Night (Live)' Has Arrived: Stream It Now |url=https://www.billboard.com/music/pop/wicked-one-wonderful-night-live-stream-1236107430/ |access-date=November 19, 2025 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
She will embark on [[the Eternal Sunshine Tour]], her first concert tour since 2019, with 41 shows across North America and England, between June and September 2026.<ref name="ESTour1">{{Cite magazine |last=Garcia |first=Thania |date=August 28, 2025 |title=Ariana Grande Announces 2026 'Eternal Sunshine' Tour Dates |url=https://variety.com/2025/music/news/ariana-grande-2026-tour-dates-1236499995/ |access-date=August 28, 2025 |magazine=Variety}}</ref><ref>{{Cite magazine |last=Dailey |first=Hannah |date=September 16, 2025 |title=Ariana Grande Unveils Final Round of 2026 Eternal Sunshine Tour Dates, Adds 5 London Shows |url=https://www.billboard.com/music/pop/ariana-grande-final-eternal-sunshine-2026-tour-dates-london-1236067300/ |url-status=live |archive-url=https://web.archive.org/web/20250916174436/https://www.billboard.com/music/pop/ariana-grande-final-eternal-sunshine-2026-tour-dates-london-1236067300/ |archive-date=September 16, 2025 |access-date=September 16, 2025 |magazine=[[Billboard (magazine)|Billboard]] |issn=0006-2510 |oclc=732913734}}</ref> Grande's upcoming film projects include ''[[Focker-in-Law]]'' (2026)<ref>{{Cite web |last=Zhan |first=Jennifer |date=June 21, 2025 |title=Another Day, Another Introduction Gone Wrong With ''Meet the Fockers 4'' |url=https://www.vulture.com/article/meet-the-parents-4-cast-release-date-details.html |access-date=July 17, 2025 |website=[[Vulture (website)|Vulture]]}}</ref> and an animated film adaptation of [[Dr. Seuss]]'s 1990 book ''[[Oh, the Places You'll Go!]]'' (2028).<ref>{{Cite magazine |last=Grobar |first=Matt |date=July 15, 2025 |title=Ariana Grande & Josh Gad Join Warner Bros Pictures Animation's 'Oh, The Places You'll Go!' |url=https://deadline.com/2025/07/oh-the-places-youll-go-movie-casts-ariana-grande-josh-gad-1236458241/ |access-date=July 17, 2025 |magazine=Deadline Hollywood}}</ref> She will star in the thirteenth season of the horror anthology series ''[[American Horror Story]]'', slated for release in September 2026.<ref>{{Cite web |last=Omotade |first=Lade |date=April 10, 2026 |title=Epic 13-Part Horror Series Drops First Look at New Fantasy Sequel |url=https://collider.com/ryan-murphy-fantasy-series-american-horror-story-season-13-sarah-paulson-jessica-lange-first-images-release-window-september-2026/ |access-date=April 13, 2025 |website=[[Collider (website)|Collider]]}}</ref> In the summer of 2027, Grande will make her [[West End theatre#London's non-commercial theatres|London stage]] debut opposite her ''Wicked'' co-star [[Jonathan Bailey]] in [[Marianne Elliott]]'s [[Barbican Centre|Barbican Theatre]] production of ''[[Sunday in the Park with George]]''.<ref name=":4">{{Cite web |last=Shafer |first=Ellise |date=January 14, 2026 |title=Ariana Grande and Jonathan Bailey to Star in ''Sunday in the Park With George'' Revival in London |url=https://variety.com/2026/theater/global/ariana-grande-jonathan-bailey-sunday-in-the-park-with-george-revival-1236630839/ |access-date=January 14, 2025 |website=Variety |language=en-US}}</ref>
== Artistry ==
=== Musical style ===
Grande's music is generally [[Pop music|pop]] and [[Contemporary R&B|R&B]] with elements of [[Electronic dance music|EDM]], [[hip hop]],<ref>{{cite web |first=Amanda |last=Dobbins |url=https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |title=Ariana Grande 101: Is She Really the New Mariah |work=Vulture |date=September 4, 2013 |access-date=August 23, 2018 |archive-url=https://web.archive.org/web/20140214001723/https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |archive-date=February 14, 2014}}</ref><ref>{{cite web |url=https://www.vice.com/en/article/ariana-grandes-dangerous-woman-isnt-dangerous-or-womanly-so-what/ |title=Ariana Grande's 'Dangerous Woman' Isn't Dangerous Or Womanly... So What? |work=Noisey |date=May 23, 2016 |access-date=February 23, 2019 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213250/https://noisey.vice.com/en_au/article/rzedd4/ariana-grandes-dangerous-woman-isnt-dangerous-or-womanly-so-what |url-status=live}}</ref> and [[Trap music (hip hop)|trap]],<ref name="billboard4">{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-sweetener-uplifting-review-8470799/ |title=6 Reasons Ariana Grande's 'Sweetener' Is Her Most Uplifting Album Yet |magazine=[[Billboard (magazine)|Billboard]] |access-date=February 23, 2019 |archive-date=October 20, 2021 |archive-url=https://web.archive.org/web/20211020212945/https://www.billboard.com/articles/columns/pop/8470799/ariana-grande-sweetener-uplifting-review |url-status=live}}</ref> the latter first appearing prominently on her ''[[Christmas & Chill]]'' extended play. While consistently maintaining pop and R&B tones, she has increasingly incorporated trap into her music as her career has progressed,<ref name="RStrap-pop">{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838/ |title=Ariana Grande's 'Sweetener' Proves That Trap Is the New Pop |magazine=[[Rolling Stone]] |date=August 17, 2018 |access-date=January 27, 2020 |archive-date=December 6, 2019 |archive-url=https://web.archive.org/web/20191206102529/https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838/ |url-status=live}}</ref> thanks to her work with [[record producer]] Tommy Brown.<ref>{{cite magazine |last=Saponara |first=Michael |url=https://www.billboard.com/music/pop/tommy-brown-interview-ariana-grande-thank-u-next-album-8500741/ |title=Producer Tommy Brown Breaks Down Every Song He Produced on Ariana Grande's 'Thank U, Next' Album |magazine=[[Billboard (magazine)|Billboard]] |date=March 7, 2019 |access-date=January 26, 2020 |archive-date=September 11, 2019 |archive-url=https://web.archive.org/web/20190911055841/https://www.billboard.com/articles/columns/hip-hop/8500741/tommy-brown-interview-ariana-grande-thank-u-next-album |url-status=live}}</ref> She has collaborated with Brown on every album thus far and stated that "one of the things I love most about working with Tommy is that none of the beats he plays me ever sound the same."<ref>{{cite news |last=Tanzer |first=Myles |url=https://www.wsj.com/articles/ariana-grandes-new-album-positions-tommy-brown-interview-11604060104 |title=How Ariana Grande's New Album, 'Positions,' Was Made During Covid-19 |newspaper=The Wall Street Journal |date=October 30, 2020 |access-date=November 12, 2020 |archive-date=November 12, 2020 |archive-url=https://web.archive.org/web/20201112005043/https://www.wsj.com/articles/ariana-grandes-new-album-positions-tommy-brown-interview-11604060104 |url-status=live}}</ref> Grande learned how to [[sound engineer]] and produce her own vocals because she "love[s] being hands on" with every project, revealing that rapper [[Mac Miller]] first taught her how to use the [[digital audio workstation]] [[Pro Tools]].<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/qa-ariana-grande-on-yours-truly-and-judging-miley-cyrus-190517/ |title=Grande on 'Yours Truly' and Miley Cyrus |magazine=[[Rolling Stone]] |date=September 11, 2013 |access-date=November 11, 2020 |archive-date=November 27, 2020 |archive-url=https://web.archive.org/web/20201127070808/https://www.rollingstone.com/music/music-news/qa-ariana-grande-on-yours-truly-and-judging-miley-cyrus-190517/ |url-status=live}}</ref> Collaborator [[Justin Tranter]] remarked that he felt inspired seeing how involved Grande is in creating her music "from the writing to the vision to the storytelling and to even engineering and comping her own vocals."<ref>{{cite web |url=https://www.npr.org/2019/02/09/691376280/thank-u-text-ariana-grandes-collaborators-break-down-the-artist-s-latest-album |title='Thank U' Text: Ariana Grande's Collaborators Break Down The Artist's Latest Album |publisher=[[NPR]] |date=February 9, 2019 |access-date=November 12, 2020 |archive-date=November 16, 2020 |archive-url=https://web.archive.org/web/20201116053408/https://www.npr.org/2019/02/09/691376280/thank-u-text-ariana-grandes-collaborators-break-down-the-artist-s-latest-album |url-status=live}}</ref> She has co-written songs addressing a wide variety of themes, such as love, sex, wealth, breakups, independence, empowerment, self-love and moving on from the past.<ref name="billboard6">{{cite magazine |first=Rania |last=Aniftos |url=https://www.billboard.com/articles/news/8497210/ariana-grande-thank-u-next-most-heartbreaking-lyrics |title=Ariana Grande's 'Thank U, Next' Album: 5 Most Heartbreaking Lyrics |magazine=[[Billboard (magazine)|Billboard]] |date=February 8, 2019 |access-date=January 26, 2020 |archive-date=July 17, 2019 |archive-url=https://web.archive.org/web/20190717053442/https://www.billboard.com/articles/news/8497210/ariana-grande-thank-u-next-most-heartbreaking-lyrics |url-status=live}}</ref>
Grande's debut album ''Yours Truly'' was complimented for recreating the R&B "vibe and feel of the 90s" with the help of songwriter and producer [[Babyface (musician)|Babyface]].<ref>{{cite web |url=https://www.allmusic.com/album/my-everything-mw0002698499 |title=My Everything – Ariana Grande |last=Erlewine |first=Stephen Thomas |website=[[AllMusic]] |date=August 25, 2014 |access-date=September 1, 2014 |archive-date=February 24, 2022 |archive-url=https://web.archive.org/web/20220224200234/https://www.allmusic.com/album/my-everything-mw0002698499 |url-status=live}}</ref> Her follow-up record, ''My Everything'', explored EDM and [[electropop]] genres.<ref name="RSMyETReview">{{cite magazine |url=https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 |title=Ariana Grande My Everything |last=Sheffield |first=Rob |date=August 26, 2014 |magazine=[[Rolling Stone]] |access-date=August 28, 2014 |archive-date=June 17, 2018 |archive-url=https://web.archive.org/web/20180617093135/https://www.rollingstone.com/music/albumreviews/ariana-grande-my-everything-20140826 }}</ref> Grande expanded the pop and R&B sound on her third album, ''Dangerous Woman'', which was praised by the ''[[Los Angeles Times]]'' for integrating elements of different styles, such as [[reggae]]-pop ("Side to Side"), dance-pop ("Be Alright"), and [[guitar]]-trap fusion ("Sometimes").<ref>{{cite web |last=Wood |first=Mikael |url=https://www.latimes.com/entertainment/music/la-et-ms-ariana-grande-dangerous-woman-review-20160517-snap-story.html |title=Review: Ariana Grande leaves the princess image behind with ''Dangerous Woman'' |work=[[Los Angeles Times]] |date=May 18, 2016 |access-date=April 20, 2020 |archive-date=February 23, 2017 |archive-url=https://web.archive.org/web/20170223153551/http://www.latimes.com/entertainment/music/la-et-ms-ariana-grande-dangerous-woman-review-20160517-snap-story.html |url-status=live}}</ref> Trap-pop was more heavily featured on her fourth and fifth studio albums, ''Sweetener'' and ''Thank U, Next''.<ref name="RStrap-pop"/> Elias Leight of ''[[Rolling Stone]]'' opined that Grande "set her sights on conquering trap, savage basslines and jittery swarms of drum programming" and "embrace[d] the sound of hard-bitten Southern hip-hop" on ''Sweetener'', exploring [[funk]] music with themes of love and prosperity.<ref name="RSnew-pop">{{cite magazine |last=Leight |first=Elias |date=August 17, 2018 |title=Ariana Grande's ''Sweetener'' Proves That Trap Is the New Pop |url=https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838 |magazine=[[Rolling Stone]] |access-date=August 18, 2018 |archive-date=October 4, 2018 |archive-url=https://web.archive.org/web/20181004042008/https://www.rollingstone.com/music/music-news/ariana-grandes-sweetener-proves-that-trap-is-the-new-pop-712838/ |url-status=live}}</ref><ref name="billboard5"/> Craig Jenkins of ''[[New York (magazine)|Vulture]]'' noted that she embraced trap and hip hop with undertones of R&B on ''Thank U, Next'',<ref>{{cite web |last=Jenkins |first=Craig |url=https://www.vulture.com/2019/02/ariana-grande-thank-u-next-album-review.html |title=Thank U, Next Is a Phoenix Moment for Ariana Grande |work=[[Vulture (blog)|Vulture]] |date=February 8, 2019 |access-date=February 22, 2019 |archive-date=December 29, 2019 |archive-url=https://web.archive.org/web/20191229154414/https://www.vulture.com/2019/02/ariana-grande-thank-u-next-album-review.html |url-status=live}}</ref> with lyrics about breakups, empowerment, and self-love.<ref name="billboard5"/> Her sixth album, ''Positions'', further emphasized the R&B and trap-pop sound of its two predecessors, with lyrics discussing sex and romance.<ref name="slant">{{cite web |last=Camp |first=Alexa |date=October 30, 2020 |title=Review: Ariana Grande's Positions Too Often Defaults to a Familiar Pose |url=https://www.slantmagazine.com/music/review-ariana-grande-positions-too-often-defaults-to-a-familiar-pose/ |url-status=live |archive-url=https://web.archive.org/web/20201030081531/https://www.slantmagazine.com/music/review-ariana-grande-positions-too-often-defaults-to-a-familiar-pose/ |archive-date=October 30, 2020 |access-date=October 30, 2020 |website=[[Slant Magazine]]}}</ref><ref name="Consequence">{{cite web |last=Siroky |first=Mary |date=October 30, 2020 |title=Ariana Grande's Positions Is a 2020 Pop Fairytale: Review |url=https://consequence.net/2020/10/album-review-ariana-grande-positions/ |url-status=live |archive-url=https://web.archive.org/web/20201101020934/https://consequence.net/2020/10/album-review-ariana-grande-positions/ |archive-date=November 1, 2020 |access-date=October 30, 2020 |website=[[Consequence of Sound]]}}</ref>
=== Influences ===
{{multiple image
| footer = Grande credits [[Mariah Carey]] (''left'') and [[Whitney Houston]] (''right'') as her major vocal influences.
| image1 = Mariah Carey13 Edwards Dec 1998.jpg
| width1 = 155
| alt1 = Mariah Carey
| image2 = Whitney Houston Welcome Home Heroes 1 cropped.jpg
| width2 = 155
| alt2 = Whitney Houston
| align = right
}}
Grande grew up listening mainly to [[urban pop]] and [[1990s music]].<ref name="TheBillboard">{{cite news |last=Lipshutz |first=Jason |date=March 28, 2013 |title=Ariana Grande Talks Breakout Hit 'The Way': Watch New Music Video |url=https://www.billboard.com/music/music-news/ariana-grande-talks-breakout-hit-the-way-watch-new-music-video-1554921/ |url-status=live |archive-url=https://web.archive.org/web/20190626213147/https://www.billboard.com/articles/columns/pop-shop/1554921/ariana-grande-talks-breakout-hit-the-way-watch-new-music-video |archive-date=June 26, 2019 |access-date=March 28, 2013}}</ref> She credited [[Gloria Estefan]] with inspiring her to pursue a music career after Estefan saw and complimented Grande's performance on a cruise ship when she was eight years old.<ref>{{cite web |date=January 26, 2013 |title=Nickelodeon Kids |url=http://nick-kids.net/post/74685927172/when-i-was-eight-years-old-i-was-on-a-cruise-ship |archive-url=https://web.archive.org/web/20141001071524/http://nick-kids.net/post/74685927172/when-i-was-eight-years-old-i-was-on-a-cruise-ship |archive-date=October 1, 2014 |access-date=January 26, 2013 |publisher=Nickelodeon Kids}}</ref> [[Mariah Carey]] and [[Whitney Houston]] are her primary vocal influences: "I love Mariah Carey. She is literally my favorite human being on the planet. And of course Whitney [Houston] as well. As far as vocal influences go, Whitney and Mariah pretty much cover it."<ref>{{cite news |url=http://www.rap-up.com/2014/03/07/ariana-grande-covers-whitney-houston-at-the-white-house/#more-181197 |title=Ariana Grande Covers Whitney Houston at the White House |newspaper=Rap-Up |access-date=August 9, 2014 |archive-date=June 29, 2019 |archive-url=https://web.archive.org/web/20190629135139/https://www.rap-up.com/2014/03/07/ariana-grande-covers-whitney-houston-at-the-white-house/#more-181197 |url-status=live}}</ref> Grande was also influenced vocally by [[Destiny's Child]], [[Celine Dion]], [[Christina Aguilera]], and [[Madonna]].<ref>{{cite web |url=https://www.teenvogue.com/story/ariana-grande-opens-mac-miller-life-music |title=Ariana Grande Opens Up About Mac Miller's Life and Music |website=Teen Vogue |date=May 14, 2020 |access-date=May 14, 2020 |archive-date=June 10, 2020 |archive-url=https://web.archive.org/web/20200610204020/https://www.teenvogue.com/story/ariana-grande-opens-mac-miller-life-music |url-status=live}}</ref><ref>{{cite tweet |user=arianagrande |number=27637810617913344 |title=My biggest musical influences are Imogen Heap, Christina Aguilera, MJ and Rihanna |date=January 19, 2011 |access-date=June 19, 2024}}</ref> She reflected on her childhood by posting videos of herself singing songs from Dion's 1997 album ''[[Let's Talk About Love]]'' on her social media.<ref>{{cite web |url=https://www.elle.com/culture/celebrities/a25664687/ariana-grande-toddler-sing-celine-dion-video/ |title=Watch Ariana Grande Absolutely Nail A Celine Dion Song As A Toddler |last=Rhue |first=Holly |work=[[Elle (magazine)|Elle]] |date=December 23, 2018 |access-date=November 17, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108104657/https://www.elle.com/culture/celebrities/a25664687/ariana-grande-toddler-sing-celine-dion-video/ |url-status=live}}</ref> Grande credits Madonna with "pav[ing] the way for me and also every other female artist" and admitted to being "obsessed with [[Madonna albums discography|her entire discography]]".<ref>{{cite magazine |url=https://www.rollingstone.com/music/music-news/ariana-grande-anxiety-bbc-751525/ |archive-url=https://web.archive.org/web/20201204055609/https://www.rollingstone.com/music/music-news/ariana-grande-anxiety-bbc-751525/ |archive-date=December 4, 2020 |url-access=subscription |title=Watch Ariana Grande Talk Anxiety, Perform 'Sweetener' Songs on BBC Special |magazine=[[Rolling Stone]] |first=Daniel |last=Kreps |date=November 2, 2018 |access-date=July 26, 2023}}</ref><ref>{{cite web |url=https://apnews.com/article/ddd0ce3ae98e4317afbbfeb07685a97c |archive-url=https://web.archive.org/web/20220814204321/https://apnews.com/article/ddd0ce3ae98e4317afbbfeb07685a97c |archive-date=August 14, 2022 |title=Madonna inspires Ariana Grande |work=[[Associated Press News]] |date=March 2, 2017 |access-date=July 26, 2023}}</ref>
Musically, Grande admires [[India Arie]] because her "music makes me feel like everything is going to be okay", loves [[Brandy Norwood]]'s songs because "her [[riff]]s are incredibly on point", and praised [[Imogen Heap]]'s "intricate" song structure.<ref name="billboard5"/> Heap in particular Grande has said is her favorite musician, songwriter, and producer of all time.<ref name="k750">{{cite magazine |title=Ariana Grande on Landing 'Wicked': "Everything's Going to Be Okay Forever Now" |magazine=[[W (magazine)|W]] |date=January 3, 2025 |url=https://www.wmagazine.com/culture/ariana-grande-wicked-cover-interview-2024 |access-date=February 25, 2025}}</ref><ref name="h805">{{cite magazine |last=Williams |first=Sophie |title=Imogen Heap on Viral 'Headlock' Success, AI and Ariana Grande: 'There's a New Type of Energy This Time' |magazine=[[Billboard (magazine)|Billboard]] |date=January 29, 2025 |url=https://www.billboard.com/music/pop/imogen-heap-headlock-success-ai-and-ariana-grande-1235886471/ |access-date=February 25, 2025}}</ref> Grande also named [[Judy Garland]] as a childhood influence, admiring her ability to tell "a story when she sings".<ref name="billboard5">{{cite magazine |url=https://www.billboard.com/music/music-news/gimme-five-ariana-grandes-most-inspirational-female-singers-5748215/ |title=Gimme Five: Ariana Grande's Most Inspirational Female Singers |magazine=[[Billboard (magazine)|Billboard]] |date=October 9, 2013 |access-date=July 28, 2014 |archive-date=July 14, 2014 |archive-url=https://web.archive.org/web/20140714114319/http://www.billboard.com/articles/columns/pop-shop/5748215/gimme-five-ariana-grandes-most-inspirational-female-singers? |url-status=live}}</ref> Ahead of the release of her debut album, Grande says its sound was inspired by Heap, Carey, [[Fergie (singer)|Fergie]], and Houston.<ref>{{Cite web |last=Corner |first=Lewis |date=April 18, 2013 |title=Ariana Grande: 'Fergie's Clumsy always gives me inspiration' |url=https://www.digitalspy.com/music/a474265/ariana-grande-fergies-clumsy-always-gives-me-inspiration/ |access-date=May 1, 2025 |publisher=[[Digital Spy]]}}</ref> Music producer and collaborator [[Savan Kotecha]] stated that he and Grande were influenced by [[Lauryn Hill]] when creating her fourth album [[Sweetener (album)|''Sweetener'']] and its lead single "[[No Tears Left to Cry]]".<ref>{{cite magazine |date=February 18, 2019 |title=How Ariana Grande Scored Two Number One Albums in Just Six Months |url=https://www.rollingstone.com/music/music-features/ariana-grande-thank-u-next-savan-kotecha-interview-791280/ |access-date=July 8, 2022 |magazine=[[Rolling Stone]] |archive-date=March 31, 2019 |archive-url=https://web.archive.org/web/20190331104143/https://www.rollingstone.com/music/music-features/ariana-grande-thank-u-next-savan-kotecha-interview-791280/ |url-status=live}}</ref> Kotecha told [[Variety (magazine)|''Variety'']], "we were listening to Lauryn Hill about chord changes and why we stick to four chords all the time".<ref>{{cite web |last=LeDonne |first=Rob |date=August 23, 2018 |title=Songwriter Savan Kotecha on the Making of Ariana Grande's Sweetener |url=https://www.vulture.com/2018/08/how-ariana-grandes-sweetener-came-together.html |access-date=July 8, 2022 |website=Vulture |archive-date=October 1, 2020 |archive-url=https://web.archive.org/web/20201001142925/https://www.vulture.com/2018/08/how-ariana-grandes-sweetener-came-together.html |url-status=live}}</ref>
Grande expressed admiration for rappers' unconventional music release strategy. She told ''[[Billboard (magazine)|Billboard]]'', "My dream has always been to be—obviously not a rapper, but, like, to put out music in the way that a rapper does. I feel like there are certain standards that pop women are held to that men aren't ... It's just like, 'Bruh, I just want to ... drop [music] the way these boys do."<ref name="rollingstone1">{{cite magazine |title=Ariana Grande Wants to Release Music Like a Rapper |url=https://www.rollingstone.com/music/music-news/ariana-grande-new-release-strategy-thank-u-next-763458/ |url-status=live |archive-url=https://web.archive.org/web/20191223232431/https://www.rollingstone.com/music/music-news/ariana-grande-new-release-strategy-thank-u-next-763458/ |archive-date=December 23, 2019 |access-date=February 23, 2019 |magazine=[[Rolling Stone]]}}</ref> It inspired her to release "Thank U, Next" without any prior announcement, which ''[[The Ringer (website)|The Ringer]]'' called "more of a [[Drake (musician)|Drake]] move than an Ariana Grande move".<ref>{{cite web |url=https://www.theringer.com/music/2018/12/5/18126526/year-in-singles-ariana-grande-thank-u-next-drake-in-my-feelings |title=Thank U, Next: How Ariana Grande and Drake Accelerated the Pop Music Life Cycle |date=December 5, 2018 |work=The Ringer |first=Lindsay |last=Zoladz |access-date=November 18, 2020 |archive-date=November 8, 2020 |archive-url=https://web.archive.org/web/20201108104755/https://www.theringer.com/music/2018/12/5/18126526/year-in-singles-ariana-grande-thank-u-next-drake-in-my-feelings |url-status=live}}</ref>
=== Voice ===
Grande has been described as a [[soprano]],<ref>{{cite web |url=https://www.vox.com/2014/8/19/6030479/ariana-grande-who-is-pop-star-vmas |title=9 Questions You're Too Embarrassed To Ask About Ariana Grande |date=July 8, 2015 |website=Vox |first=Kelsey |last=McKinney |access-date=February 2, 2018 |archive-date=February 3, 2018 |archive-url=https://web.archive.org/web/20180203180909/https://www.vox.com/platform/amp/2014/8/19/6030479/ariana-grande-who-is-pop-star-vmas |url-status=live}}</ref><ref>{{cite news |url=https://www.theguardian.com/music/2017/may/21/ariana-grande-review-pop-flops-genting-arena-birmingham-dangerous-woman |title=Ariana Grande review – pop it till it flops |newspaper=[[The Guardian]] |date=May 21, 2017 |access-date=February 12, 2018 |first=Kitty |last=Empire |archive-date=September 27, 2017 |archive-url=https://web.archive.org/web/20170927112039/https://www.theguardian.com/music/2017/may/21/ariana-grande-review-pop-flops-genting-arena-birmingham-dangerous-woman |url-status=live}}</ref><ref>{{cite news |url=https://www.telegraph.co.uk/culture/music/live-music-reviews/11644279/Ariana-Grande-O2-review-spectacle-but-no-soul.html |title=Ariana Grande, O2, review: 'spectacle but no soul' |work=[[The Daily Telegraph]] |date=June 2, 2015 |access-date=February 12, 2018 |first=Alice |last=Vincent |archive-date=February 13, 2018 |archive-url=https://web.archive.org/web/20180213021939/http://www.telegraph.co.uk/culture/music/live-music-reviews/11644279/Ariana-Grande-O2-review-spectacle-but-no-soul.html |url-status=live}}</ref> possessing a four-octave [[vocal range]]<ref name="Savage"/><ref>{{cite web |url=https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |title=Ariana Grande 101: Is She Really the New Mariah? |website=Vulture |date=September 4, 2013 |access-date=March 11, 2015 |archive-date=February 14, 2014 |archive-url=https://web.archive.org/web/20140214001723/https://www.vulture.com/2013/09/ariana-grande-101-is-she-really-the-new-mariah.html |url-status=live}}</ref> and a [[whistle register]].<ref>{{cite web |url=http://www.vh1.com/news/51492/ariana-grande-yours-truly |title=Ariana Grande: Five Things To Know About The Little Girl Behind That Big Voice |publisher=VH1 |date=September 6, 2013 |access-date=October 11, 2017 |archive-date=August 22, 2015 |archive-url=https://web.archive.org/web/20150822101609/http://www.vh1.com/news/51492/ariana-grande-yours-truly/ }}</ref> With the release of ''Yours Truly'', critics compared Grande's wide vocal range and music to those of Mariah Carey.<ref name="Entertainmentweekly">{{cite magazine |url=http://music-mix.ew.com/2013/07/22/ariana-grande-new-single-baby-i |title=Ariana Grande's new single 'Baby I': Hear it here |magazine=Entertainment Weekly |access-date=February 18, 2014 |archive-date=October 6, 2014 |archive-url=https://web.archive.org/web/20141006110542/http://music-mix.ew.com/2013/07/22/ariana-grande-new-single-baby-i/ |url-status=live}}</ref><ref name="StopComparing">{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-mariah-carey-comparisons-6229461/ |title=It's Time to Stop Comparing Ariana Grande to Mariah Carey |last=Horowitz |first=Steven J. |magazine=[[Billboard (magazine)|Billboard]] |date=August 27, 2014 |access-date=September 1, 2014 |archive-date=April 6, 2018 |archive-url=https://web.archive.org/web/20180406125138/https://www.billboard.com/articles/columns/pop-shop/6229461/ariana-grande-mariah-carey-comparisons |url-status=live}}</ref> Julianne Escobedo Shepherd of ''Billboard'' wrote that both Carey and Grande have "the talent to let their vocals do the talking ... that's not where the similarities end. ... Grande is subverting it with cute, comfortable, and on-trend dresses with a feminine slant."<ref name="Shepherd">{{cite magazine |url=https://www.billboard.com/music/music-news/ariana-grande-fashion-style-my-everything-6229387/ |title=Ariana Grande's Fashion Focus: Breaking Down Her Many Confident Looks |last=Shepherd |first=Julianne Escobedo |magazine=[[Billboard (magazine)|Billboard]] |date=August 26, 2014 |access-date=September 2, 2014 |archive-date=August 31, 2014 |archive-url=https://web.archive.org/web/20140831033945/http://www.billboard.com/articles/columns/pop-shop/6229387/ariana-grande-fashion-style-my-everything |url-status=live}}</ref>
Mark Savage of BBC News named Grande "one of pop's most intriguing and gifted singers" and complimented her "unrivalled vocal control".<ref name="Savage"/> In ''The New York Times'', [[Jon Pareles]] noted that Grande's voice "can be silky, breathy or cutting, swooping through long melismas or jabbing out short R&B phrases; it's always supple and airborne, never forced."<ref>{{cite news |last=Pareles |first=Jon |url=https://www.nytimes.com/2018/08/29/arts/music/ariana-grande-sweetener-review.html |title=Ariana Grande Sails Above Sorrow on ''Sweetener'' |newspaper=The New York Times |date=August 29, 2018 |access-date=August 30, 2018 |archive-date=August 29, 2018 |archive-url=https://web.archive.org/web/20180829230135/https://www.nytimes.com/2018/08/29/arts/music/ariana-grande-sweetener-review.html |url-status=live}}</ref> Composer and playwright [[Jason Robert Brown]] wrote in a 2016 ''Time'' magazine article, "[N]o matter how much you are underestimated ... you are going to open your mouth and that unbelievable sound is going to come out. That [...] instrument [...] allows you to shut down every objection and every obstacle."<ref name="Time100">{{cite magazine |last=Brown |first=Jason Robert |author-link=Jason Robert Brown |url=http://time.com/4299766/ariana-grande-2016-time-100 |title=The World's Most Influential People: Ariana Grande |magazine=[[Time (magazine)|Time]] |date=April 21, 2016 |access-date=April 21, 2016 |archive-date=June 26, 2019 |archive-url=https://web.archive.org/web/20190626184549/https://time.com/4299766/ariana-grande-2016-time-100/ |url-status=live}}</ref>
Grande's [[enunciation]] has drawn some criticism,<ref>{{Cite web |last=DeVille |first=Chris |date=October 29, 2020 |title=Premature Evaluation: Ariana Grande Positions |url=https://www.stereogum.com/2104172/ariana-grande-positions-review/reviews/premature-evaluation/ |archive-url=https://web.archive.org/web/20240420110026/https://www.stereogum.com/2104172/ariana-grande-positions-review/reviews/premature-evaluation/ |archive-date=April 20, 2024 |access-date=May 5, 2025 |website=[[Stereogum]] |quote=She also seems to have cleaned up the slurred enunciation that was once the subject of wisecracks}}</ref> particularly on her earlier recordings.<ref>{{Cite news |last=Cragg |first=Michael |date=February 8, 2019 |title=Ariana Grande: Thank U, Next review – a break-up album of wit and wonder |url=https://www.theguardian.com/music/2019/feb/08/ariana-grande-thank-u-next-review |archive-url=https://web.archive.org/web/20241202233051/https://www.theguardian.com/music/2019/feb/08/ariana-grande-thank-u-next-review |archive-date=December 2, 2024 |access-date=May 5, 2025 |newspaper=[[The Guardian]]}}</ref><ref>{{Cite news |last=Hunt |first=Elle |date=December 26, 2018 |title=Ariana Grande: a beacon of resilience in her worst and biggest year |url=https://www.theguardian.com/music/2018/dec/26/ariana-grande-resilience |archive-url=https://web.archive.org/web/20241203200622/https://www.theguardian.com/music/2018/dec/26/ariana-grande-resilience |archive-date=December 3, 2024 |access-date=May 5, 2025 |newspaper=[[The Guardian]]}}</ref><ref name=":3">{{Cite magazine |last=Williams |first=Sophie |date=January 12, 2024 |title=Ariana Grande's 'Yes, And?' is a bitingly catchy and self-aware comeback |url=https://www.nme.com/features/music-features/ariana-grande-new-single-yes-and-lyrics-video-review-3569651 |archive-url=https://web.archive.org/web/20250205093815/https://www.nme.com/features/music-features/ariana-grande-new-single-yes-and-lyrics-video-review-3569651 |archive-date=February 5, 2025 |access-date=May 5, 2025 |magazine=[[NME]] |quote=For an artist that has previously been criticised for poor enunciation}}</ref> Grande herself has acknowledged this on multiple occasions, admitting in 2015 that pronunciation was something she hoped to improve.<ref>{{Cite news |last=Keeley |first=Matt |date=May 5, 2022 |title='Cat in an Elevator?': Benedict Cumberbatch Baffled by Ariana Grande Lyrics |url=https://www.newsweek.com/cat-elevator-benedict-cumberbatch-baffled-ariana-grande-lyrics-1704042 |archive-url=https://web.archive.org/web/20230825041525/https://www.newsweek.com/cat-elevator-benedict-cumberbatch-baffled-ariana-grande-lyrics-1704042 |archive-date=August 25, 2023 |access-date=May 5, 2025 |work=[[Newsweek]]}}</ref> However, several critics noted a marked improvement on ''Eternal Sunshine'',<ref name=":3"/><ref>{{Cite news |last=Tafoya |first=Harry |date=March 11, 2024 |title=eternal sunshine |url=https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/ |archive-url=https://web.archive.org/web/20250313003149/https://pitchfork.com/reviews/albums/ariana-grande-eternal-sunshine/ |archive-date=March 13, 2025 |access-date=May 5, 2025 |website=[[Pitchfork (website)|Pitchfork]]}}</ref> with some attributing the clearer diction to her extensive vocal training for ''Wicked''.<ref>{{Cite news |last=Bryant |first=Danica |date=2024 |title=Ariana Grande Finds Eternal Sunshine |url=https://umusic.co.nz/umusic/ariana-grande-finds-eternal-sunshine/ |archive-url=https://web.archive.org/web/20250214050334/https://umusic.co.nz/umusic/ariana-grande-finds-eternal-sunshine/ |archive-date=February 14, 2025 |access-date=May 5, 2025 |publisher=[[Universal Music New Zealand]]}}</ref><ref>{{Cite news |last=Olivieri |first=Kevin |date=March 19, 2024 |title=Ariana Grande Comes Back with Her Best Album Yet |url=https://themontclarion.org/entertainment/ariana-grande-comes-back-with-her-best-album-yet/ |archive-url=https://web.archive.org/web/20250427113945/https://themontclarion.org/entertainment/ariana-grande-comes-back-with-her-best-album-yet/ |archive-date=April 27, 2025 |access-date=May 5, 2025 |work=[[Montclair State University|The Montclarion]]}}</ref>
== Public image ==
[[File:Ariana Grande - Madame Tussauds Bangkok (cropped).jpg|thumb|upright|Waxwork of Grande at [[Madame Tussauds]], Bangkok]]
Grande cited [[Audrey Hepburn]] as a major style influence in her early career; however, she later found emulating Hepburn's style "a little boring".<ref name="Grazia">{{cite news |url=https://graziadaily.co.uk/fashion/news/ariana-grande-look-back-things-wore-yesterday-cringe/ |title=Ariana Grande: 'I Look Back At Things I Wore Yesterday And Cringe' |first=Louby |last=McLoughlin |work=[[Grazia]] |date=August 20, 2014 |access-date=August 20, 2014 |archive-date=May 7, 2019 |archive-url=https://web.archive.org/web/20190507120435/https://graziadaily.co.uk/fashion/news/ariana-grande-look-back-things-wore-yesterday-cringe/ |url-status=live}}</ref> She also drew inspiration from actresses of the 1950s and 1960s, such as [[Ann-Margret]], [[Nancy Sinatra]], and [[Marilyn Monroe]].<ref name="Grazia"/> Grande's modest look early in her career was described as "age appropriate" in comparison to contemporary artists who grew up in the public eye.<ref name="Shepherd"/> Jim Farber of New York's ''[[New York Daily News]]'' wrote in 2014 that Grande received less attention "for how little she wears or how graphically she moves than for how she sings."<ref name="NYDNsingSex">{{cite web |url=https://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-sex-appeal-article-1.1902829 |title=Ariana Grande owes her stardom to singing, not sex appeal |first=Jim |last=Farber |newspaper=[[New York Daily News]] |url-status=live |date=August 14, 2014 |access-date=March 19, 2024 |archive-date=October 5, 2014 |archive-url=https://web.archive.org/web/20141005224931/http://www.nydailynews.com/entertainment/ariana-grande-owes-stardom-singing-sex-appeal-article-1.1902829}}</ref> That year, she abandoned her earlier style in favor of short skirts and [[crop tops]] with [[knee-high boot]]s in live performances and red carpet events.<ref>{{cite web |url=http://style.mtv.com/2014/04/23/ariana-grande-nancy-sinatra |title=Ariana Grande Is Totally Having a Nancy Sinatra Moment |last=Morton |first=Caitlin |publisher=[[MTV]] |date=April 23, 2014 |access-date=September 2, 2014 |archive-url=https://web.archive.org/web/20140903120634/http://style.mtv.com/2014/04/23/ariana-grande-nancy-sinatra/ |archive-date=September 3, 2014}}</ref> She also began regularly wearing cat and bunny ears and, subsequently, oversized jackets and hoodies through the late 2010s—the latter articles became largely associated with her persona.<ref>{{cite magazine |last=Piwowarski |first=Allison |date=February 3, 2021 |title=What's Up With The Cat Ears? |url=https://www.bustle.com/articles/41944-whats-up-with-ariana-grandes-cat-ears-an-exploration-of-her-history-as-a-fan-of |url-status=live |archive-url=https://web.archive.org/web/20210207080834/https://www.bustle.com/articles/41944-whats-up-with-ariana-grandes-cat-ears-an-exploration-of-her-history-as-a-fan-of |archive-date=February 7, 2021 |access-date=February 3, 2021 |magazine=Bustle}}</ref><ref>{{cite magazine |last=Jackson |first=Vannessa |date=February 3, 2021 |title=What Does Ariana Grande's Bunny Mask Mean |url=https://www.bustle.com/articles/148764-what-does-ariana-grandes-bunny-mask-mean-the-dangerous-woman-cover-art-is-mysterious |url-status=live |archive-url=https://web.archive.org/web/20201222082425/https://www.bustle.com/articles/148764-what-does-ariana-grandes-bunny-mask-mean-the-dangerous-woman-cover-art-is-mysterious |archive-date=December 22, 2020 |access-date=February 3, 2021 |magazine=Bustle}}</ref> Grande later stated that owing to her mental health struggles at the time, she regularly wore variations of the oversized sweatshirt-boots outfit as she preferred to "hide away in something really cozy" and "did not have the mental energy to consider clothing".<ref>{{cite magazine |last=Mohammed |first=Leyla |date=January 28, 2026 |title=People Are Heartbroken After Discovering The Real Reason Ariana Grande Always Used To Wear Oversized Sweatshirts And Thigh-High Boots |url=https://www.buzzfeed.com/leylamohammed/why-ariana-grande-wore-oversized-sweatshirts-high-boots |url-status=live |access-date=January 30, 2026 |publisher=[[BuzzFeed]]}}</ref> Grande's style is often imitated by social media influencers and celebrities.<ref>{{cite magazine |last=Anfitos |first=Rania |url=https://www.billboard.com/music/music-news/celebrity-doppelgangers-tiktok-8550677/ |title=These 8 Celebrity Doppelgangers on TikTok Will Have You Seeing Double |magazine=[[Billboard (magazine)|Billboard]] |date=February 2, 2020 |access-date=April 1, 2021 |archive-date=July 15, 2021 |archive-url=https://web.archive.org/web/20210715173059/https://www.billboard.com/amp/articles/news/8550677/celebrity-doppelgangers-tiktok |url-status=live}}</ref><ref name=StopCopy>{{cite web |url=https://www.capitalfm.com/news/madison-beer-ariana-grande-copying-claims/ |title=Madison Beer Asks People To Stop The 'Hurtful' Ariana Grande 'Copying' Claims |publisher=[[Capital (radio network)|Capital FM]] |date=November 19, 2020 |access-date=April 1, 2021 |archive-date=June 12, 2021 |archive-url=https://web.archive.org/web/20210612232815/https://www.capitalfm.com/news/madison-beer-ariana-grande-copying-claims/ |url-status=live}}</ref> After years of dyeing her hair red for her role as Cat Valentine on Nickelodeon, Grande wore extensions as her hair recovered from damage.<ref name="Fader2018">{{cite web |last=Tanzer |first=Myles |url=http://www.thefader.com/2018/05/30/ariana-grande-cover-story |title=Ariana Grande |magazine=[[The Fader]] |date=May 30, 2018 |access-date=May 31, 2018 |archive-date=January 29, 2020 |archive-url=https://web.archive.org/web/20200129023634/http://www.thefader.com/2018/05/30/ariana-grande-cover-story |url-status=live}}</ref> Anne T. Donahue of [[MTV News]] noted that her "iconic" high ponytail has received more attention than her fashion choices.<ref>{{cite news |last=Donahue |first=Anne T. |url=http://www.mtv.com/news/2869190/do-not-be-distracted-by-ariana-grandes-ponytail |title=Do Not Be Distracted by Ariana Grande's Ponytail |publisher=MTV News |date=April 18, 2016 |access-date=April 18, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213326/http://www.mtv.com/news/2869190/do-not-be-distracted-by-ariana-grandes-ponytail/ }} {{Webarchive|url=https://web.archive.org/web/20190319213326/http://www.mtv.com/news/2869190/do-not-be-distracted-by-ariana-grandes-ponytail/ |date=March 19, 2019 }}</ref>
Although Grande drew criticism for alleged impolite interactions with reporters and fans in 2014,<ref>{{cite magazine |url=https://www.billboard.com/music/pop/ariana-grande-controversies-6620402/ |title=Ariana Grande's Donut Video & 5 More Controversies |magazine=[[Billboard (magazine)|Billboard]] |date=July 8, 2015 |access-date=April 20, 2020 |archive-date=April 30, 2020 |archive-url=https://web.archive.org/web/20200430073405/https://www.billboard.com/articles/columns/pop-shop/6620402/ariana-grande-controversies |url-status=live}}</ref> she dismissed the reports as "weird, inaccurate depictions".<ref name=CoolDiva/> ''Rolling Stone'' wrote: "Some may cry 'diva', but it's also Grande just taking a stand to not allow others to control her image."<ref>{{cite magazine |last=Castillo |first=Arielle |url=https://www.rollingstone.com/music/pictures/ariana-grande-five-great-scandals-20160518/ariana-vs-the-press-2014-20160518 |title=Ariana Grande: Five Great 'Scandals' – Ariana vs. the Press, 2014 |magazine=[[Rolling Stone]] |date=May 18, 2016 |access-date=August 24, 2017 |archive-date=October 25, 2017 |archive-url=https://web.archive.org/web/20171025190012/https://www.rollingstone.com/music/pictures/ariana-grande-five-great-scandals-20160518/ariana-vs-the-press-2014-20160518 }}</ref> In July 2015, Grande sparked controversy after being seen on surveillance video in a doughnut shop licking doughnuts that were on display and saying "I hate Americans. I hate America. This is disgusting", referring to a tray of doughnuts.<ref>{{cite magazine |last=Lipshutz |first=Jason |url=https://www.billboard.com/music/pop/demi-lovato-ariana-grande-mlb-all-star-game-concert-6620351/ |title=Demi Lovato to Replace Ariana Grande at MLB All-Star Game Concert |magazine=[[Billboard (magazine)|Billboard]] |date=July 8, 2015 |access-date=April 20, 2020 |archive-date=January 31, 2020 |archive-url=https://web.archive.org/web/20200131031812/https://www.billboard.com/articles/columns/pop-shop/6620351/demi-lovato-ariana-grande-mlb-all-star-game-concert |url-status=live}}; and {{cite news |last=Yahr |first=Emily |url=https://www.washingtonpost.com/blogs/style-blog/wp/2015/07/08/ariana-grandes-doughnut-scandal-is-an-important-reminder-the-cameras-are-always-watching |title=Ariana Grande's doughnut scandal is an important reminder: The cameras are always watching |newspaper=The Washington Post |date=July 8, 2015 |access-date=August 24, 2017 |archive-date=July 12, 2015 |archive-url=https://web.archive.org/web/20150712164002/http://www.washingtonpost.com/blogs/style-blog/wp/2015/07/08/ariana-grandes-doughnut-scandal-is-an-important-reminder-the-cameras-are-always-watching/ |url-status=live}}</ref> She subsequently apologized, saying that she is "extremely proud to be an American" and that her comments rather referred to [[obesity in the United States]].<ref>{{cite news |last=Ramisetti |first=Kirthana |url=http://www.nydailynews.com/entertainment/gossip/ariana-grande-cancels-mlb-concert-video-backlash-article-1.2285483 |title=Ariana Grande apologizes for 'I hate America' comments in video: 'I am extremely proud to be an American' |newspaper=New York Daily News |date=July 8, 2015 |access-date=July 8, 2015 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213303/https://www.nydailynews.com/entertainment/gossip/ariana-grande-cancels-mlb-concert-video-backlash-article-1.2285483 |url-status=live}}</ref> She later released a video apology for "behaving poorly".<ref>{{cite magazine |last=Strecker |first=Erin |url=https://www.billboard.com/music/pop/ariana-grande-apology-video-america-6627181/ |title=Ariana Grande Shares Apology Video: 'I'm Going to Learn From My Mistakes' |magazine=[[Billboard (magazine)|Billboard]] |date=July 9, 2015 |access-date=April 20, 2020 |archive-date=April 30, 2020 |archive-url=https://web.archive.org/web/20200430073617/https://www.billboard.com/articles/columns/pop-shop/6627181/ariana-grande-apology-video-america |url-status=live}}</ref> The incident was parodied by ''[[The Muppets (TV series)|The Muppets]]''.<ref>{{cite web |last=Gomez |first=Patrick |url=http://www.people.com/article/muppets-swedish-chef-ariana-grande-donut-video |archive-url=https://web.archive.org/web/20160514100428/http://www.people.com/article/muppets-swedish-chef-ariana-grande-donut-video |archive-date=2016-05-14 |title=''The Muppets''<nowiki/>' Swedish Chef Licks Doughnuts à la Ariana Grande |magazine=[[People (People)|People]] |date=October 11, 2015 |access-date=March 19, 2024}}</ref> Grande herself poked fun at the incident while hosting ''Saturday Night Live'' in 2016, saying, "A lot of kid stars end up doing drugs, or in jail, or pregnant, or get caught licking a doughnut they didn't pay for."<ref name="Savage"/><ref>{{cite magazine |url=https://www.billboard.com/articles/columns/pop/7246933/ariana-grande-scandal-snl-monologue-watch |title=Ariana Grande Sings About Wanting an Adult Scandal in 'SNL' Monologue |magazine=[[Billboard (magazine)|Billboard]] |date=March 13, 2016 |access-date=April 20, 2020 |archive-date=August 19, 2020 |archive-url=https://web.archive.org/web/20200819165649/https://www.billboard.com/articles/columns/pop/7246933/ariana-grande-scandal-snl-monologue-watch }}</ref> In 2020, she admitted to refraining from interviews for a while out of fear of being labeled a "diva" and that her words would be misconstrued.<ref>{{cite web |last=Ahlgrim |first=Callie |title=Ariana Grande says being called a diva forced her to 'quiet down a little bit' and stop doing interviews |url=https://www.insider.com/ariana-grande-diva-sexism-interviews-apple-music-zane-lowe-2020-5 |access-date=July 6, 2020 |publisher=Insider Inc. |date=February 9, 2019 |archive-date=May 25, 2024 |archive-url=https://web.archive.org/web/20240525093742/https://www.businessinsider.com/ariana-grande-diva-sexism-interviews-apple-music-zane-lowe-2020-5 |url-status=live}}</ref>
With a large following on social media, Grande is one of the most influential celebrities on the internet.<ref>{{cite web |last=Jensen |first=Erin |title=Harry and Meghan, Ariana Grande on Time's list of most influential people on the internet |url=https://usatoday.com/story/entertainment/celebrities/2019/07/16/ariana-grande-duchess-meghan-among-most-influential-internet/1743191001/ |access-date=August 9, 2022 |website=Today |archive-date=May 24, 2022 |archive-url=https://web.archive.org/web/20220524011639/https://www.usatoday.com/story/entertainment/celebrities/2019/07/16/ariana-grande-duchess-meghan-among-most-influential-internet/1743191001/ |url-status=live}}</ref><ref name="amassed">{{cite magazine |last=Duboff |first=Josh |date=March 9, 2017 |title=How Ariana Grande Amassed Her 100 Million Instagram Followers |url=https://www.vanityfair.com/style/2017/03/ariana-grande-instagram-analysis-social-studies |access-date=March 16, 2017 |magazine=[[Vanity Fair (magazine)|Vanity Fair]] |archive-date=August 8, 2020 |archive-url=https://web.archive.org/web/20200808052845/https://www.vanityfair.com/style/2017/03/ariana-grande-instagram-analysis-social-studies |url-status=live}}</ref> {{As of|2025|{{CURRENTMONTHNAME}}}}, her YouTube channel has over 57 million subscribers, making her the [[List of most-subscribed YouTube channels|third-most-subscribed female solo act and fourth-most-subscribed woman]] on the platform.<ref name="ytsubs">{{Cite web |title=YouTube Records: All-Time Most Subscribed Official Artist Channel |url=https://www.youtube.com/trends/records/?record=most-subscribed-artists/ |access-date=September 17, 2024 |publisher=[[YouTube|YouTube Culture and Trends]]}}</ref> Her channel has received over 31 billion views; eight of Grande's music videos have over one billion views on YouTube,<ref>{{cite web |title=Ariana Grande |url=https://www.youtube.com/user/osnapitzari/about |access-date=September 18, 2025 |via=YouTube}}{{cbignore}}</ref><ref name="focus1bn">{{Cite magazine |last=Dailey |first=Hannah |date=March 13, 2024 |title=Ariana Grande's 'Focus' Music Video Surpasses 1 Billion Views on YouTube |url=https://www.billboard.com/music/music-news/ariana-grande-focus-music-video-one-billion-views-you-tube-1235632113/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> of which two have surpassed two billion views,<ref name="bangbang2bn">{{Cite web |date=July 3, 2024 |title="Bang Bang" into the record books: Jessie/Ari/Nicki collab hits new YouTube milestone |url=https://www.ks95.com/bang-bang-into-the-record-books-jessie-ari-nicki-collab-hits-new-youtube-milestone/ |access-date=October 9, 2024 |publisher=[[KSTP-FM]]}}</ref> with her highest-viewed video having over 2.4 billion views.<ref>{{Cite AV media |url=https://youtube.com/watch/SXiSVQZLje8/ |title=Ariana Grande ft. Nicki Minaj – Side to Side (Official Video) |date=August 30, 2016 |last=Grande |first=Ariana |type=Music video |access-date=October 9, 2024 |via=YouTube}}</ref> Her Spotify profile has over 110 million followers,<ref>{{cite web |title=Ariana Grande |url=https://open.spotify.com/artist/66CXWjxzNUsdJxJ2JdwvnR |access-date=September 17, 2025 |via=Spotify}}</ref> making her the [[List of most-streamed artists on Spotify#Most followers|seventh-most-followed artist and third-most-followed woman]].<ref name=":0"/> She is the [[List of most-followed Instagram accounts|sixth-most-followed individual on Instagram]],<ref>{{Cite magazine |date=September 23, 2024 |title=The 10 most followed Instagram accounts in the world in 2024 |url=https://www.forbesindia.com/article/explainers/most-followed-instagram-accounts-world/85649/1 |access-date=October 19, 2024 |magazine=[[Forbes India]]}}</ref> and was the first woman to surpass 150 million and 200 million followers on the platform.<ref>{{Cite magazine |last=Eldor |first=Karin |date=March 31, 2019 |title=Ariana Grande Is The New Queen Of Instagram: What Can We Learn From Her Strategy? |url=https://www.forbes.com/sites/karineldor/2019/03/31/ariana-grande-is-the-new-queen-of-instagram-what-can-we-learn-from-her-strategy/ |access-date=October 9, 2024 |magazine=Forbes}}</ref><ref>{{Cite magazine |last=Harmata |first=Claudia |date=August 31, 2020 |title=Ariana Grande Becomes First Woman to Reach 200 Million Followers on Instagram |url=https://people.com/music/ariana-grande-first-woman-to-reach-200-million-followers-instagram/ |access-date=October 9, 2024 |magazine=[[People (magazine)|People]]}}</ref> She was the most-followed woman on the platform from February 2019 to January 2022.<ref>{{Cite news |last=Ng |first=Kate |date=January 13, 2022 |title=Kylie Jenner is the first woman to reach 300m Instagram followers |url=https://www.independent.co.uk/life-style/kylie-jenner-300-million-instagram-followers-b1992320.html |access-date=October 19, 2024 |newspaper=[[The Independent]]}}</ref><ref>{{Cite news |last=Yan |first=Lim Ruey |date=September 2, 2020 |title=Singer Ariana Grande is the most followed woman on Instagram |url=https://www.straitstimes.com/lifestyle/entertainment/singer-ariana-grande-is-the-most-followed-woman-on-instagram |access-date=October 19, 2024 |newspaper=[[The Straits Times]]}}</ref> In December 2021, Grande deleted her Twitter account, which was one of the most-followed accounts on the platform.<ref>{{Cite magazine |last=Wynne |first=Kelly |date=December 24, 2021 |title=Ariana Grande Deletes Twitter Account, Shares Christmas Wishes on Instagram |url=https://people.com/music/ariana-grande-deletes-twitter-account-shares-christmas-wishes-on-instagram/ |access-date=October 19, 2024 |magazine=[[People (magazine)|People]]}}</ref><ref>{{Cite magazine |last=Mulshine |first=Molly |date=April 26, 2022 |title=How Twitter Became Celebrities' Least Favorite Social Platform |url=https://www.newsweek.com/twitter-celebrities-least-favorite-social-platform-elon-musk-buy-1701104 |access-date=October 19, 2024 |magazine=[[Newsweek]]}}</ref> She explained that she "always wanted to say things to [her] fans that were meant for just [her] fans [...] sometimes it would travel in a way that it wasn't intended to [...] where people who don't speak our language would kind of become involved in a weird, strange way. I think I was just so sensitive [and] it started taking toll on my relationship to work. I wanted to prioritize being an artist and having a healthy relationship to my fans and to art".<ref name="elletwitter">{{Cite magazine |last=Bailey |first=Alyssa |date=July 9, 2024 |title=Ariana Grande on Why She Quit Twitter and Chooses Not to Respond to Comments About Her |url=https://www.elle.com/culture/celebrities/a61546061/ariana-grande-shut-up-evan-interview/ |access-date=October 19, 2024 |magazine=[[Elle (magazine)|Elle]]}}</ref>
Often regarded as a [[pop icon]] and [[wikt:triple threat|triple threat]] entertainer,<ref>{{cite web |date=October 27, 2021 |title=How Ariana Grande Went From Nickelodeon Star to Pop Icon |url=https://www.yahoo.com/lifestyle/ariana-grande-went-nickelodeon-star-145446469.html |access-date=October 31, 2021 |publisher=[[Yahoo]] |archive-date=November 1, 2021 |archive-url=https://web.archive.org/web/20211101162940/https://www.yahoo.com/amphtml/lifestyle/ariana-grande-went-nickelodeon-star-145446469.html |url-status=live}}</ref><ref>{{cite magazine |date=March 29, 2022 |title=Women's History Month: Triple Threat Female Artists Who Sing, Write, and Act (Part 2) |url=https://americansongwriter.com/womens-history-month-triple-threat-female-artists-who-sing-write-and-act-part-2/ |access-date=June 25, 2022 |magazine=[[American Songwriter]] |archive-date=June 25, 2022 |archive-url=https://web.archive.org/web/20220625192844/https://americansongwriter.com/womens-history-month-triple-threat-female-artists-who-sing-write-and-act-part-2/ |url-status=live}}</ref> [[wax figure]]s of Grande are found at [[Madame Tussauds]] museums in various cities around the world, including [[New York City]],<ref>{{cite news |title=At Madame Tussauds New York, attend the "Met Gala" with "Katy Perry," "Lady Gaga," "Justin Bieber" and more |url=https://www.wrmf.com/at-madame-tussauds-new-york-attend-the-met-gala-with-katy-perry-lady-gaga-justin-bieber-and-more/ |access-date=December 3, 2022 |work=97.9 WRMF |date=June 23, 2022 |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023632/https://www.wrmf.com/at-madame-tussauds-new-york-attend-the-met-gala-with-katy-perry-lady-gaga-justin-bieber-and-more/ |url-status=live}}</ref> [[Orlando, Florida]],<ref>{{cite magazine |last1=Aniftos |first1=Rania |title=Ariana Grande Gets Madame Tussauds Wax Figure in Orlando |url=https://www.billboard.com/music/pop/ariana-grande-madame-tussauds-wax-figure-orlando-1235042845/ |access-date=December 3, 2022 |magazine=[[Billboard (magazine)|Billboard]] |date=March 10, 2022 |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023626/https://www.billboard.com/music/pop/ariana-grande-madame-tussauds-wax-figure-orlando-1235042845/ |url-status=live}}</ref> [[Amsterdam]],<ref>{{cite news |last1=Westland |first1=Evie |title=Ariana Grande in Madame Tussauds Amsterdam |url=https://www.metronieuws.nl/in-het-nieuws/binnenland/2017/04/ariana-grande-in-madame-tussauds-amsterdam/ |access-date=December 3, 2022 |work=Metronieuws.nl |date=April 6, 2017 |language=nl |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023628/https://www.metronieuws.nl/in-het-nieuws/binnenland/2017/04/ariana-grande-in-madame-tussauds-amsterdam/ |url-status=live}}</ref> [[Bangkok]],<ref>{{cite news |title=Ariana melts hearts in wax |url=https://www.nationthailand.com/life/30357430 |access-date=December 3, 2022 |work=The Nation Thailand |date=October 29, 2018 |archive-date=December 3, 2022 |archive-url=https://web.archive.org/web/20221203023642/https://www.nationthailand.com/life/30357430 |url-status=live}}</ref> [[Sydney]],<ref>{{cite web |title=Ariana Grande's Madame Tussauds Wax Figure Brutally Mocked |date=December 13, 2023 |url=https://www.newsweek.com/ariana-grande-madame-tussauds-wax-figure-sydney-1851981 |work=Newsweek |access-date=December 14, 2023 |archive-date=December 14, 2023 |archive-url=https://web.archive.org/web/20231214043606/https://www.newsweek.com/ariana-grande-madame-tussauds-wax-figure-sydney-1851981 |url-status=live}}</ref> [[Berlin]],<ref>{{cite web |title=Ariana Grande bekommt Wachsfigur bei Madame Tussauds |date=May 7, 2021 |url=https://www.bz-berlin.de/archiv-artikel/ariana-grande-bekommt-neue-wachsfigur-bei-madame-tussauds |publisher=BZ-Berlin |access-date=December 14, 2023 |archive-date=December 14, 2023 |archive-url=https://web.archive.org/web/20231214170153/https://www.bz-berlin.de/archiv-artikel/ariana-grande-bekommt-neue-wachsfigur-bei-madame-tussauds |url-status=live}}</ref> [[London]],<ref>{{cite web |title=Ariana Grande |url=https://www.madametussauds.com/london/whats-inside/zones/impossible-festival/ariana-grande/ |publisher=Madame Tussauds London |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406182938/https://www.madametussauds.com/london/whats-inside/zones/impossible-festival/ariana-grande/ |url-status=live}}</ref> [[Vienna]],<ref>{{cite web |title=Ariana Grande |url=https://www.madametussauds.com/wien/themenbereiche/musik/ariana-grande/ |publisher=Madame Tussauds Vienna |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406155916/https://www.madametussauds.com/wien/themenbereiche/musik/ariana-grande/ |url-status=live}}</ref> [[Hollywood, Los Angeles|Hollywood]],<ref>{{cite magazine |title=Ariana Grande Wax Figure at Madame Tussauds Hollywood |url=https://www.billboard.com/music/pop/ariana-grande-wax-figure-madame-tussauds-hollywood-9568495/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=April 6, 2024 |archive-date=October 4, 2023 |archive-url=https://web.archive.org/web/20231004062410/https://www.billboard.com/music/pop/ariana-grande-wax-figure-madame-tussauds-hollywood-9568495/ |url-status=live}}</ref> [[Hong Kong]],<ref>{{cite web |title=Sing with Ariana Grande at Madame Tussauds Hong Kong |url=https://www.madametussauds.com/hong-kong/en/information/latest-news/attention-to-all-arianators-calling-you-to-sing-with-your-idol-this-summer/ |publisher=Madame Tussauds Hong Hong |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406162920/https://www.madametussauds.com/hong-kong/en/information/latest-news/attention-to-all-arianators-calling-you-to-sing-with-your-idol-this-summer/ |url-status=live}}</ref> and [[Blackpool]].<ref>{{cite web |title=Ariana Grande at Madame Tussauds Blackpool |url=https://www.madametussauds.com/blackpool/information/latest-news/ariana-makes-a-grande-appearance/ |publisher=Madame Tussauds Blacpool |access-date=April 6, 2024 |archive-date=April 6, 2024 |archive-url=https://web.archive.org/web/20240406160643/https://www.madametussauds.com/blackpool/information/latest-news/ariana-makes-a-grande-appearance/ |url-status=live}}</ref>
== Recognition ==
{{Main|List of awards and nominations received by Ariana Grande}}
[[File:Ariana Grande (32426961944) (cropped).jpg|thumb|upright|Grande performing on the [[Dangerous Woman Tour]]|alt=Grande in 2017]]
In 2016 and 2019, Grande was named one of ''Time''{{'}}s [[Time 100|100 most influential people in the world]].<ref name="Time100"/><ref name="Time100-2019">{{cite magazine |last=Sivan |first=Troye |author-link=Troye Sivan |date=April 17, 2019 |title=The World's Most Influential People: Ariana Grande |url=https://time.com/collection/100-most-influential-people-2019/5567873/ariana-grande/ |magazine=[[Time (magazine)|Time]] |access-date=April 17, 2019 |archive-date=March 21, 2020 |archive-url=https://web.archive.org/web/20200321114131/https://time.com/collection/100-most-influential-people-2019/5567873/ariana-grande/}}</ref> In 2017, Celia Almeida of the ''[[Miami New Times]]'' wrote that of all the biggest pop stars of the past 20 years, Grande made the most convincing transition "from ingénue to an independent female artist".<ref>{{cite web |last=Almeida |first=Celia |date=April 11, 2017 |title=Ariana Grande Is Not Your Sex Kitten |url=http://www.miaminewtimes.com/music/ariana-grande-dangerous-woman-tour-at-american-airlines-arena-april-14-9268375 |work=[[Miami New Times]] |access-date=April 12, 2017 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213253/https://www.miaminewtimes.com/music/ariana-grande-dangerous-woman-tour-at-american-airlines-arena-april-14-9268375 |url-status=live}}</ref> [[Bloomberg News]] named her the "first pop diva of the streaming generation" in 2020.<ref>{{cite news |last=Shaw |first=Lucas |date=December 11, 2020 |title=Ariana Grande Is the Biggest Pop Star in the World |url=https://www.bloomberg.com/graphics/pop-star-ranking/2020-december/ariana-grande-is-the-biggest-pop-star-in-the-world.html |publisher=[[Bloomberg News]] |access-date=December 14, 2020 |archive-date=December 11, 2020 |archive-url=https://web.archive.org/web/20201211222456/https://www.bloomberg.com/graphics/pop-star-ranking/2020-december/ariana-grande-is-the-biggest-pop-star-in-the-world.html |url-status=live}}</ref> Regarded as a [[pop icon]], Grande was nicknamed "[[Princess of Pop]]" by ''[[Guinness World Records]]''.<ref>{{Cite web |date=February 2, 2021 |title=Ariana Grande shatters her 20th Guinness World Records title following success of hit single 'Positions' |url=https://www.guinnessworldrecords.com/news/2021/2/ariana-grande-shatters-20th-guinness-world-records-title-following-success-of-hit-647433 |url-status=live |archive-url=https://web.archive.org/web/20210202165717/https://www.guinnessworldrecords.com/news/2021/2/ariana-grande-shatters-20th-guinness-world-records-title-following-success-of-hit-647433 |archive-date=February 2, 2021 |access-date=July 29, 2023 |website=[[Guinness World Records]]}}</ref> Due to her 2014 song "Santa Tell Me" becoming a 21st-century Christmas standard and having a lasting impact, Grande was dubbed the "Princess of Christmas".<ref>{{Cite magazine |date=December 22, 2021 |title=Camila Cabello Heats the White House With 'I'll Be Home For Christmas' Performance: Watch |url=https://www.billboard.com/music/latin/camila-cabello-white-house-christmas-performance-1235013252/ |access-date=November 20, 2022 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{Cite magazine |last=Bell |first=Sadie |date=November 28, 2023 |title=Ariana Grande Celebrates 'Santa Tell Me' Anniversary by Sharing Behind-the-Scenes Footage: 'Tis the Season!' |url=https://people.com/ariana-grande-celebrates-santa-tell-me-anniversary-tiktok-8407591 |access-date=December 17, 2023 |magazine=[[People (magazine)|People]]}}</ref>
Grande was also included in ''[[Pitchfork (website)|Pitchfork]]'s'' list of "The 200 Most Important Artists of Pitchfork's First 25 Years" for "emerging with music that pushed her artistry further as it asserted a magical trifecta of hope, joy, and a powerhouse voice".<ref>{{cite web |date=October 4, 2021 |title=The 200 Most Important Artists of Pitchfork's First 25 Years |url=https://pitchfork.com/features/lists-and-guides/most-important-artists/ |website=[[Pitchfork (website)|Pitchfork]] |access-date=October 4, 2021 |archive-date=July 30, 2022 |archive-url=https://web.archive.org/web/20220730052606/https://pitchfork.com/features/lists-and-guides/most-important-artists/ |url-status=live}}</ref> Her song "Thank U, Next" was ranked number 137 in ''Rolling Stone''{{'s}} 2021 revision of their [[500 Greatest Songs of All Time]],<ref>{{cite magazine |date=September 15, 2021 |title=The 500 Greatest Songs of All Time |url=https://www.rollingstone.com/music/music-lists/best-songs-of-all-time-1224767/ariana-grande-thank-u-next-5-1225201/ |url-status=live |archive-url=https://web.archive.org/web/20210915162053/https://www.rollingstone.com/music/music-lists/best-songs-of-all-time-1224767/ |archive-date=September 15, 2021 |access-date=October 5, 2021 |magazine=[[Rolling Stone]]}}</ref> while its parent album was ranked number 61 in their "250 Greatest Albums of the 21st Century".<ref>{{Cite magazine |date=January 10, 2025 |title=The 250 Greatest Albums of the 21st Century So Far |url=https://www.rollingstone.com/music/music-lists/best-albums-21st-century-1235177256/ariana-grande-thank-u-next-6-1235185233/ |access-date=January 11, 2025 |magazine=[[Rolling Stone]]}}</ref> In 2023, the magazine ranked Grande among the 200 Greatest Singers of All Time, at number 43.<ref name="200-greatest">{{cite magazine |url=https://www.rollingstone.com/music/music-lists/best-singers-all-time-1234642307/ariana-grande-8-1234643145/ |date=January 1, 2023 |title=The 200 Greatest Singers of All Time |access-date=September 7, 2023 |magazine=[[Rolling Stone]] |archive-date=July 19, 2023 |archive-url=https://web.archive.org/web/20230719045545/https://www.rollingstone.com/music/music-lists/best-singers-all-time-1234642307/ariana-grande-8-1234643145/ |url-status=live}}</ref> ''[[The Hollywood Reporter]]'' named her as one of its "Platinum Power Players" in music in 2024.<ref>{{Cite magazine |last=Fekadu |first=Mesfin |date=September 6, 2024 |title=Music's Platinum Players: From Beyoncé to Chappell Roan, Meet the 25 Stars Who Are Setting the Culture Afire |url=https://www.hollywoodreporter.com/lists/music-power-players-2024/ariana-grande/ |access-date=October 11, 2024 |magazine=[[The Hollywood Reporter]]}}</ref> In May that year, [[Katy Perry]] declared Grande to be "the best singer of our generation".<ref name="Ledbetter_5/23/20242">{{cite web |last=Ledbetter |first=Carly |date=May 23, 2024 |title=Katy Perry Praises The 'Best Singer Of Our Generation' |url=https://www.huffpost.com/entry/katy-perry-ariana-grande-voice-generation_n_664f440ae4b042129b89ca7b |access-date=May 24, 2024 |newspaper=[[HuffPost]]}}</ref> ''Billboard'' ranked Grande at number nine on its 2024 "[[Billboard's Greatest Pop Stars of the 21st Century|Greatest Pop Stars of the 21st Century]]" list,<ref>{{cite magazine |last=Daw |first=Stephen |date=October 17, 2024 |title=''Billboard''{{'}}s Greatest Pop Stats of the 21st Century: No. 9 — Ariana Grande |url=https://www.billboard.com/music/pop/ariana-grande-greatest-pop-stars-21st-century-1235804073/ |access-date=October 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and at number eight on its 2025 list of the "Top 100 Women Artists of the 21st Century".<ref>{{cite magazine |first1=Trevor |last1=Anderson |first2=Jim |last2=Asker |first3=Pamela |last3=Bustios |first4=Keith |last4=Caulfield |first5=Eric |last5=Frankenberg |first6=Kevin |last6=Rutherford |first7=Gary |last7=Trust |first8=Xander |last8=Zellner |date=March 19, 2025 |title=''Billboard''<nowiki/>'s Top 100 Women Artists of the 21st Century Chart: Nos. 100-1 |url=https://www.billboard.com/lists/top-women-artists-21st-century-chart/no-8-ariana-grande/ |access-date=March 19, 2025 |magazine=[[Billboard (magazine)|Billboard]] |archive-url=https://web.archive.org/web/20250319183615/https://www.billboard.com/lists/top-women-artists-21st-century-chart/ |url-status=live |archive-date=March 19, 2025}}</ref> The magazine ranked her album ''Thank U, Next'' at number 144 out of 200 on its "Top 200 ''Billboard'' 200 Albums of the 21st Century" in 2025.<ref>{{Cite magazine |date=January 9, 2025 |title=Top ''Billboard'' 200 Albums of the 21st Century |url=https://www.billboard.com/charts/top-billboard-200-albums-of-the-21st-century/ |access-date=December 27, 2025 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
Recording artists who have cited Grande as an influence or inspiration include <!-- Artists' names are arranged in alphabetical order; [[WP:NEUTRAL]].--> [[Billie Eilish]],<ref>{{cite web |title=Ariana sei Dank – Billie Eilish hat wieder Lust auf Musik |url=https://www.zeit.de/zustimmung?url=https%3A%2F%2Fwww.zeit.de%2Fnews%2F2019-08%2F19%2Fariana-sei-dank-billie-eilish-hat-wieder-lust-auf-musik |work=Die Zeit |access-date=August 19, 2019 |archive-date=January 8, 2022 |archive-url=https://web.archive.org/web/20220108160623/https://www.zeit.de/zustimmung?url=https%3A%2F%2Fwww.zeit.de%2Fnews%2F2019-08%2F19%2Fariana-sei-dank-billie-eilish-hat-wieder-lust-auf-musik }}</ref> [[Breanna Yde]],<ref>{{cite web |title=YDE Talks About Her New EP 'Send Help', Taking Inspiration From Olivia Rodrigo, Ariana Grande, Miley Cyrus & More |date=September 9, 2022 |url=https://www.yahoo.com/entertainment/yde-talks-her-ep-send-222227240.html |publisher=[[Yahoo!]] |access-date=January 22, 2023}}</ref> [[Bryson Tiller]],<ref>{{cite web |title=Bryson Tiller Announces A 'Special' Christmas Project Inspired By Justin Bieber And Ariana Grande |date=November 10, 2021 |url=https://uproxx.com/music/bryson-tiller-announces-a-different-chrtistmas/ |website=[[Uproxx]] |access-date=January 22, 2023}}</ref> [[Chappell Roan]],<ref>{{Cite magazine |last=Dailey |first=Hannah |date=August 29, 2024 |title=Chappell Roan Praises Ariana Grande's 'Eternal Sunshine', Reveals She's 'So Excited' for 'Wicked' |url=https://www.billboard.com/music/music-news/chappell-roan-praises-ariana-grande-wicked-1235763528/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> [[Charlie Puth]],<ref>{{cite web |title=Charlie Puth: Inspiration durch Ariana Grande |date=May 10, 2018 |url=https://www.rtl.de/cms/charlie-puth-inspiration-durch-ariana-grande-4160617.html |publisher=[[RTL Group]] |access-date=January 22, 2023 |archive-date=January 22, 2023 |archive-url=https://web.archive.org/web/20230122122244/https://www.rtl.de/cms/charlie-puth-inspiration-durch-ariana-grande-4160617.html }}</ref> [[Giselle (singer)|Giselle]] of [[Aespa]],<ref>{{cite magazine |title='The First Time': Aespa Talks Inspiration From Fashion, Harry Styles, Grimes, Ariana Grande |date=December 2, 2021 |url=https://www.rollingstone.com/music/music-news/the-first-time-aespa-1266093/ |magazine=[[Rolling Stone]] |access-date=January 22, 2023}}</ref> [[Grace VanderWaal]],<ref>{{cite magazine |title=Grace VanderWaal Fangirls Over Ariana Grande, Talks Tour With Imagine Dragons on BBMA Red Carpet: Watch |date=May 21, 2018 |url=https://www.billboard.com/music/awards/grace-vanderwaal-interview-ariana-grande-imagine-dragons-tour-8457114/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 22, 2023}}</ref> [[Jungkook]] of [[BTS]],<ref>{{cite web |title=BTS' Jungkook says watching Ariana Grande perform live "really stayed" with him |date=May 18, 2021 |url=https://www.nme.com/news/music/bts-jungkook-ariana-grande-inspired-him-to-grow-2942958 |work=[[NME]] |access-date=May 18, 2021 |archive-date=May 18, 2021 |archive-url=https://web.archive.org/web/20210518074850/https://www.nme.com/news/music/bts-jungkook-ariana-grande-inspired-him-to-grow-2942958 |url-status=live}}</ref> [[Lana Del Rey]],<ref>{{cite magazine |title=Lana Del Rey stans Ariana Grande |date=October 16, 2019 |url=https://www.wmagazine.com/story/lana-del-rey-compliments-ariana-grande-stans/ |magazine=[[W (magazine)|W]] |access-date=January 30, 2023}}</ref> [[Madison Beer]],<ref name="StopCopy"/> [[Maggie Lindemann]],<ref>{{cite web |title=Interview: Maggie Lindemann Is Out To Inspire The Next Generation Of Women |date=January 20, 2017 |url=https://www.iheart.com/content/2017-01-20-interview-maggie-lindemann-is-out-to-inspire-the-next-generation-of-women/ |publisher=[[iHeartRadio]] |access-date=January 22, 2023}}</ref> [[Meghan Trainor]],<ref>{{cite magazine |title=Meghan Trainor Is All About that Bass, T-Pain, and Drunk Texting |date=September 10, 2014 |url=https://www.out.com/entertainment/music/2014/09/10/meghan-trainor-all-about-bass-t-pain-drunk-texting |magazine=Out |access-date=September 10, 2014 |archive-date=April 2, 2019 |archive-url=https://web.archive.org/web/20190402233520/https://www.out.com/entertainment/music/2014/09/10/meghan-trainor-all-about-bass-t-pain-drunk-texting |url-status=live}}</ref> [[Melanie Martinez]],<ref>{{cite magazine |title=Melanie Martinez on 'Cry Baby,' Not Wanting to Be a Role Model & What She Learned From 'The Voice' |url=https://www.billboard.com/media/videos/melanie-martinez-cry-baby-role-model-the-voice-6685879/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=April 4, 2015 |archive-date=April 12, 2022 |archive-url=https://web.archive.org/web/20220412205245/https://www.billboard.com/media/videos/melanie-martinez-cry-baby-role-model-the-voice-6685879/ |url-status=live}}</ref> [[Michelle Zauner]] of [[Japanese Breakfast]],<ref>{{cite web |title=Japanese Breakfast's Michelle Zauner On Her Wild Year And Winning The 2021 Uproxx Music Critics Poll |date=December 16, 2021 |url=https://uproxx.com/indie/japanese-breakfast-interview-2021-critics-poll/ |website=[[Uproxx]] |access-date=January 22, 2023}}</ref> [[Sufjan Stevens]],<ref>{{cite magazine |title=Sufjan Stevens on Making Pop Music in a Crisis |date=September 24, 2020 |url=https://www.vanityfair.com/style/2020/09/sufjan-stevens-the-ascension-interview |magazine=[[Vanity Fair (magazine)|Vanity Fair]] |access-date=September 24, 2020 |archive-date=October 20, 2020 |archive-url=https://web.archive.org/web/20201020182127/https://www.vanityfair.com/style/2020/09/sufjan-stevens-the-ascension-interview |url-status=live}}</ref> [[Tate McRae]],<ref>{{cite web |url=https://youtube.com/watch?v=F-Dq7717bWw |title=Tate McRae Celebrates Going #1 With Greedy |publisher=Ask Anything Chat |via=[[YouTube]] |date=December 10, 2023 |access-date=December 10, 2023 |archive-date=December 10, 2023 |archive-url=https://web.archive.org/web/20231210214512/https://www.youtube.com/watch?v=F-Dq7717bWw |url-status=live}}</ref> [[Troye Sivan]],<ref>{{cite magazine |title=Troye Sivan Said Ariana Grande Is 'Breaking the Rules' in His Essay for Her Time 100 Honor |date=April 17, 2019 |url=https://www.teenvogue.com/story/troye-sivan-ariana-grande-essay-time-100 |magazine=Teen Vogue |access-date=September 17, 2019 |archive-date=May 11, 2019 |archive-url=https://web.archive.org/web/20190511095906/https://www.teenvogue.com/story/troye-sivan-ariana-grande-essay-time-100 |url-status=live}}</ref> and [[Zara Larsson]].<ref>{{cite web |url=https://nation.com.pk/26-Mar-2017/zara-larsson-inspired-by-beyonce |title=Zara Larsson inspired by Beyonce |date=March 25, 2017 |website=The Nation |access-date=January 22, 2023 |archive-date=December 7, 2020 |archive-url=https://web.archive.org/web/20201207060636/https://nation.com.pk/26-Mar-2017/zara-larsson-inspired-by-beyonce |url-status=live}}</ref>
== Achievements ==
{{Main|List of awards and nominations received by Ariana Grande}}
Grande has sold over 90 million records worldwide,<ref>{{Cite magazine |last1=Verhoeven |first1=Beatrice |date=December 4, 2024 |title='Wicked' Star Ariana Grande to Receive Rising Star Award at Palm Springs International Film Festival |url=https://www.hollywoodreporter.com/movies/movie-news/wicked-ariana-grande-rising-star-award-palm-springs-international-film-festival-1236076275/ |magazine=[[The Hollywood Reporter]] |access-date=September 20, 2025 |archive-date=December 8, 2024 |archive-url=https://web.archive.org/web/20241208015916/https://www.hollywoodreporter.com/movies/movie-news/wicked-ariana-grande-rising-star-award-palm-springs-international-film-festival-1236076275/ |url-status=live}}</ref> making her one of the [[List of best-selling music artists|best-selling music artists]] of all time. All of Grande's studio albums have been certified platinum or higher by the [[Recording Industry Association of America]] (RIAA) and have spent at least one year charting on the [[Billboard 200|''Billboard'' 200]] chart. Her highest-certified album by the RIAA is ''[[My Everything (Ariana Grande album)|My Everything]]'', at quadruple platinum,<ref>{{cite web |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&se=Ariana+Grande |title=Ariana Grande |publisher=Recording Industry Association of America |access-date=September 17, 2024}}</ref> whilst her longest-charting album, ''Thank U, Next'', has spent 185 non-consecutive weeks on the chart.<ref>{{Cite magazine |date= |title=Ariana Grande (Chart History): ''Billboard'' 200 |url=https://www.billboard.com/artist/ariana-grande/chart-history/tlp/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande has accumulated 15 million albums and 124 million digital singles units as a lead artist in the United States,<ref name="RIAA Certifications">{{cite web |url=https://www.riaa.com/gold-platinum/?tab_active=default-award&ar=ARIANA+GRANDE&ti=&lab=&genre=&format=&date_option=release&from=&to=&award=&type=&category=&adv=SEARCH#search_section |title=RIAA Searchable Database: Ariana Grande |publisher=[[Recording Industry Association of America]] |access-date=March 24, 2026}}</ref> making her the 13th-highest-certified artist and fourth-highest-certified female artist on RIAA's [[List of highest-certified music artists in the United States#Top 50 certified music artists (digital singles)|Top Artists (Digital Singles)]] ranking.<ref>{{cite web |title=Gold & Platinum – Top Artists (Digital Singles) |url=https://www.riaa.com/gold-platinum/?tab_active=top_tallies&ttt=TAS |access-date=March 24, 2026 |publisher=[[Recording Industry Association of America]]}}</ref> With 139 million units combined (songs and albums), she is the 21st-highest-certified artist, overall, and sixth-highest among women.<ref name="RIAAranking">{{Cite web |title=Gold & Platinum — Artists |url=https://www.riaa.com/gold-platinum/?tab_active=awards_by_artist#search_section |access-date=March 24, 2026 |publisher=[[Recording Industry Association of America]] (RIAA)}}</ref> In the US, Grande has moved 22.4 million album units, and garnered over 23.6 billion streams across lead artist credits, as of 2023, according to [[Luminate (company)|Luminate]].<ref name="bbupdate">{{cite magazine |last1=Trust |first1=Gary |title='Such a Breath of Fresh Air': Ariana Grande's 'Yours Truly' Collaborators Reflect on 10 Years of Her Debut Album |url=https://www.billboard.com/music/pop/ariana-grande-yours-truly-collaborators-debut-album-anniversary-1235399838/ |magazine=[[Billboard (magazine)|Billboard]] |access-date=August 27, 2023 |date=August 25, 2023 |archive-url=https://web.archive.org/web/20230825153706/https://www.billboard.com/music/pop/ariana-grande-yours-truly-collaborators-debut-album-anniversary-1235399838/ |archive-date=August 25, 2023 |url-status=live}}</ref><ref>{{cite magazine |last=Haven |first=Lyndsey |date=December 10, 2023 |title=Ariana Grande Signs With New Management |url=https://www.billboard.com/business/management/ariana-grande-new-management-brandon-creed-good-world-1235549272/ |access-date=December 10, 2023 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Two of her songs have been certified diamond by the RIAA: "Bang Bang" (with [[Jessie J]] and [[Nicki Minaj]]) and "7 Rings".<ref name=":1">{{Cite magazine |last=McIntyre |first=Hugh |date=February 14, 2025 |title=Ariana Grande Scores A New Diamond Single With One Of Her Classics |url=https://www.forbes.com/sites/hughmcintyre/2025/02/14/ariana-grande-scores-a-new-diamond-single-with-one-of-her-classics/ |access-date=February 22, 2025 |magazine=Forbes}}</ref>
Having surpassed 98 billion streams globally as of 2021, Grande is one of the most-streamed artists of all time and was the first female artist to surpass 90 billion streams.<ref name="wickedcasting"/><ref>{{cite magazine |title=HYBE, Formerly Big Hit, Merges With Scooter Braun's Ithaca Holdings, Bringing Together BTS, Justin Bieber, Big Machine (EXCLUSIVE) |url=https://variety.com/2021/digital/news/hybe-formerly-big-hit-entertainment-acquires-scooter-brauns-ithaca-holdings-bringing-together-bts-justin-bieber-big-machine-1234943092/ |access-date=April 2, 2021 |magazine=[[Variety (magazine)|Variety]] |date=April 2, 2021}}</ref> She was the most-streamed female artist of the 2010s decade on [[Spotify]], being the only woman in the overall top five.<ref name="moststreamed2010s2"/> She was also the most-streamed female act of the 2010s decade on [[Apple Music]], and was the first female act to reach 3 billion total streams on the platform.<ref name="am_2010s">{{cite magazine |last=Burch |first=Sean |title=Ariana Grande Tops List of Most Streamed Female Artists on Apple Music (Exclusive) |url=https://www.thewrap.com/apple-music-most-streamed-females-ariana-grande-taylor-swift/ |access-date=November 17, 2023 |magazine=[[TheWrap]] |date=March 8, 2019}}</ref> In the US, Grande was the most-streamed female artist and fourth-most-streamed artist overall of the 2010s decade, across audio and video streams, being the only woman and non-rapper in the top five.<ref>{{Cite web |last=Zhang |first=Charlie |date=January 11, 2021 |title=Drake, Post Malone, Eminem and Others Named Most Streamed Artists of the 2010s |url=https://hypebeast.com/2021/1/drake-post-malone-eminem-future-most-streamed-artists-2010s-info/ |access-date=October 19, 2024 |publisher=[[Hypebeast (company)|Hypebeast]]}}</ref> She became the most-streamed female artist of all time on Spotify in 2020, surpassing [[Rihanna]], and held the record for over two years.<ref>{{cite magazine |last=Reilly |first=Nick |date=August 19, 2020 |title=Ariana Grande pleads with Rihanna to 'drop her album' after breaking streaming record |url=https://www.nme.com/news/music/ariana-grande-pleads-with-rihanna-to-drop-her-album-after-breaking-streaming-record-2732175 |access-date=August 20, 2024 |magazine=[[NME]]}}</ref> As of January 2026, Grande is the second-most-streamed woman and the sixth-most-streamed act on Spotify, with over 63 billion streams across all credits (including 52 billion streams as a lead artist). She is the second woman in the platform's history to surpass 60 billion total streams.<ref>{{cite web |last=Newman |first=Tom |date=October 24, 2024 |title=Top 10 most-streamed artists of all-time on Spotify in 2024 |url=https://routenote.com/blog/most-streamed-artists-all-time-spotify/ |access-date=December 17, 2024 |work=RouteNote}}</ref> Her songs and albums are [[List of most-streamed songs on Spotify|some of the most-streamed of all time]]. Grande became the first woman with one and two billion streams with one album,<ref>{{cite web |url=https://www.inquisitr.com/5358991/ariana-grande-2-billion-spotify-streams |title=Ariana Grande Becomes First Female Artist To Surpass 2 Billion Spotify Streams With Three Albums |website=[[Inquisitr]] |date=March 25, 2019}}</ref> 3.5 billion streams on three separate albums,<ref>{{cite web |url=https://www.nme.com/news/music/ariana-grande-first-female-artist-spotify-streams-three-albums-2604140/ |title=Ariana Grande becomes first female artist with 3.5 billion streams on three separate albums |website=[[NME]] |date=February 2, 2020}}</ref> and the first artist to have five albums with four billion streams.<ref>{{cite web |url=https://uproxx.com/pop/ariana-grande-positions-4-billion-spotify-streams/ |title=Ariana Grande's 'Positions' Surpassed 4 Billion Spotify Streams, Her Fifth Album To Do So |website=[[Uproxx]] |date=December 4, 2022}}</ref> Grande has 22 songs with over one billion streams on Spotify, making her the female artist with the most songs to have achieved the feat;<ref>{{cite web |title=BILLIONS CLUB |url=https://open.spotify.com/playlist/37i9dQZF1DX7iB3RCnBnN4 |access-date=July 27, 2025 |publisher=[[Spotify]]}}</ref> she was the first woman to have 22 songs surpass the mark.<ref>{{cite magazine |last=Madarang |first=Charisma |url=https://www.rollingstone.com/music/music-news/ariana-grande-spotify-billions-club-episode-watch-1234962711/ |title=Ariana Grande Reveals Why Her Label Didn't Approve Original 'Santa Tell Me' Video |magazine=[[Rolling Stone]] |date=February 6, 2024 |access-date=October 19, 2024}}</ref><ref>{{Cite news |last=Kessler |first=Siena |date=April 1, 2025 |title=Album review: Ariana Grande delivers emotional journey with 'Eternal Sunshine Deluxe: Brighter Days Ahead' |url=https://www.thelantern.com/2025/04/album-review-ariana-grande-delivers-emotional-journey-with-eternal-sunshine-deluxe-brighter-days-ahead/ |access-date=April 2, 2025 |work=[[The Lantern]] |quote=Grande became the first female artist to have 20 songs reach one billion streams each on Spotify — a feat that cements her as one of the most influential streaming artists of all time.}}</ref>
In December 2025, she became her monthly listeners on Spotify surpassed 126.8 million monthly listeners, a new record for a female act.<ref>{{Cite web |last=Ileyah |date=December 26, 2025 |title=Ariana Grande Breaks All-Time Spotify Record for Monthly Listeners Among Female Artists |url=https://ratingsgamemusic.com/2025/12/26/ariana-grande-breaks-all-time-spotify-record-for-monthly-listeners-among-female-artists/ |access-date=December 27, 2025 |website=Ratings Game Music}}</ref> She has also topped Spotify's monthly listener ranking the most times (5) among women.<ref>{{Cite web |last=Galante |first=Grace |date=December 25, 2025 |title=Ariana Grande Breaks Spotify Record on Christmas Eve |url=https://parade.com/news/ariana-grande-breaks-spotify-record-christmas-eve/ |access-date=December 27, 2025 |website=[[Parade (magazine)|Parade]]}}</ref> Grande is the [[List of most-streamed artists on Spotify#Most-followed artists|seventh-most-followed artist and fourth-most-followed female artist]] on Spotify, with over 110 million followers;<ref name=":0">{{Cite web |title=Most Followed Artists on Spotify |url=https://volt.fm/most-followed-artists/ |access-date=January 6, 2026 |website=Volt.FM}}</ref> she is the fourth artist in the streaming service's history to surpass 100 million followers.<ref>{{Cite web |last=Newman |first=Tom |date=October 24, 2024 |title=The 10 biggest artists on Spotify in 2024 |url=https://routenote.com/blog/biggest-artists-on-spotify/ |access-date=November 16, 2024 |website=RouteNote}}</ref> Her 2014 single "Santa Tell Me" is the most-streamed Christmas song released in the 2010s—and third-most-streamed overall—on Spotify; the most successful holiday song released in the 21st century; and the eighth-most-popular holiday song of all time.<ref>
* {{Cite web |last=Mulka |first=Angela |date=December 5, 2023 |title=These Christmas songs make the most money |url=https://www.bigrapidsnews.com/news/article/christmas-songs-that-earn-most-money-spotify-18535033.php |archive-url=https://web.archive.org/web/20231217125207/https://www.bigrapidsnews.com/news/article/christmas-songs-that-earn-most-money-spotify-18535033.php |archive-date=December 17, 2023 |access-date=December 17, 2023 |website=Big Rapids Pioneer}}
* {{Cite magazine |last=Edwards |first=Clayton |date=December 9, 2024 |title=The 5 Highest-Earning Christmas Songs of the Streaming Age |url=https://americansongwriter.com/the-5-highest-earning-christmas-songs-streaming-age/ |access-date=December 23, 2024 |website=American Songwriter}}
* {{Cite web |date=December 23, 2024 |title=Spotify reveals the most-streamed Christmas songs from each era and of all time |url=https://community.designtaxi.com/topic/7202-spotify-reveals-the-most-streamed-christmas-songs-from-each-era-and-of-all-time/ |access-date=December 23, 2024 |website=DesignTAXI Community: Creative Connections, Conversations and Collaborations}}</ref><ref>{{Cite magazine |last=[[People (magazine)|People]]s |first=Thomas |date=December 19, 2024 |title=The 25 Most Popular Christmas Songs Released in the Last 25 Years, Ranked by Streams & Sales |url=https://www.billboard.com/lists/most-popular-christmas-songs-21st-century-streams-sales/2-kelly-clarkson-underneath-the-tree-2010/ |access-date=December 27, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande is the third-most-subscribed female soloist on YouTube, with over 57 million subscribers.<ref name="ytsubs"/> Eight of her music videos have surpassed over one billion views; two of them have received over two billion views on the app.<ref name="focus1bn"/><ref name="bangbang2bn"/>
Grande has won three [[Grammy Award]]s,<ref>{{cite web |url=https://www.grammy.com/artists/ariana-grande/18441 |title=Ariana Grande {{!}} Artist |access-date=February 2, 2026 |website=grammy.com}}</ref> one [[Brit Award]],<ref>{{cite web |url=https://www.theguardian.com/music/2019/feb/20/full-list-of-brit-awards-2019-winners-as-they-happen |title=Full list of Brit awards 2019 winners – as they happen |website=[[The Guardian]] |date=February 20, 2019}}</ref> thirteen [[MTV Video Music Award]]s (the fifth-most wins among women),<ref>{{cite magazine |last=Green |first=Walden |date=September 7, 2025 |title=MTV VMAs 2025 Winners: See the Full List Here |url=https://pitchfork.com/news/mtv-vmas-2025-winners-see-the-full-list-here/ |magazine=[[Pitchfork (magazine)|Pitchfork]] |access-date=September 8, 2025}}</ref><ref>{{Cite web |last=Montgomery |first=Daniel |date=September 11, 2024 |title=VMAs biggest winners of all time: Taylor Swift, BTS and Beyonce among top MTV Video Music Awards champs ever |url=https://www.goldderby.com/gallery/most-vmas-biggest-winners-mtv-video-music-awards/ariana-grande-10/ |access-date=September 17, 2024 |publisher=GoldDerby}}</ref> three [[MTV Europe Music Awards]],<ref>{{cite web |last=Wright |first=Tolly |url=https://www.vulture.com/2016/11/canadians-win-big-at-2016-mtv-emas.html |title=MTV's 2016 European Music Awards Honored Europe's Favorite Singing Canadians |website=Vulture.com |date=November 6, 2016}}</ref> and three [[American Music Award]]s.<ref>{{cite web |last=Park |first=Andrea |url=https://www.cbsnews.com/news/amas-2016-highlights-and-winners-at-the-american-music-awards |title=AMAs 2016: Highlights and winners at the American Music Awards |publisher=CBS News |date=November 20, 2016}}</ref> She has received 42 [[Billboard Music Award|''Billboard'' Music Award]] nominations and won 2 in 2019, including [[Billboard Music Award for Top Female Artist|Top Female Artist]].<ref name="billboard_8509655"/> Grande has won eleven [[Nickelodeon Kids' Choice Awards]], including one in [[2014 Kids' Choice Awards|2014]] for [[Kids' Choice Award for Favorite Female TV Star|Favorite TV Actress]] for her performance on ''Sam & Cat'',<ref>{{cite news |last=Wahlberg |first=Mark |title=Nickelodeon's Kids' Choice Awards: The Winners |url=https://www.hollywoodreporter.com/news/kids-choice-awards-2014-winners-692089 |access-date=July 2, 2015 |work=The Hollywood Reporter |date=March 29, 2014}}</ref> and one in [[2025 Kids' Choice Awards|2025]] for [[Kids' Choice Award for Favorite Movie Actress|Favorite Movie Actress]] for her performance in ''Wicked''.<ref>{{cite magazine |last1=Grein |first1=Paul |title=Sabrina Carpenter, SZA, Ariana Grande Win Multiple Awards at 2025 Kids' Choice Awards (Full Winners List) |url=https://www.billboard.com/music/awards/2025-kids-choice-awards-winners-list-1236004651/ |access-date=June 22, 2025 |magazine=[[Billboard (magazine)|Billboard]] |date=June 21, 2025}}</ref> She has received three [[People's Choice Award]]s.<ref>{{cite news |url=http://www.mtv.com/news/1720133/peoples-choice-awards-2014-winners-list/ |archive-url=https://web.archive.org/web/20150107230536/http://www.mtv.com/news/1720133/peoples-choice-awards-2014-winners-list/ |archive-date=January 7, 2015 |title=2014 People's Choice Awards: The Complete Winners List |publisher=[[MTV]] |date=January 8, 2014 |access-date=January 31, 2014 }} {{Webarchive|url=https://web.archive.org/web/20150107230536/http://www.mtv.com/news/1720133/peoples-choice-awards-2014-winners-list/ |date=January 7, 2015 }}</ref> In 2014, she received the Breakthrough Artist of the Year Award from the Music Business Association<ref name=BillArtist13/> and Best Newcomer at the [[Bambi Awards]].<ref>{{cite web |title=Newcomer BAMBI goes to Ariana Grande |url=http://www.bambi-awards.com/newcomer-bambi-goes-to-ariana-grande/22249 |website=Bambi}}</ref> She has won six [[iHeartRadio Music Awards]]<ref>{{cite web |title=Ariana Grande Performs "Problem" ft. Iggy Azalea at the iHeartRadio Music Awards |url=http://news.iheart.com/articles/iheartradio-music-awards-483670/ariana-grande-performs-problem-ft-iggy-12310729/ |publisher=iHeartRadio |access-date=December 27, 2014 |archive-url=https://web.archive.org/web/20150706084430/http://news.iheart.com/articles/iheartradio-music-awards-483670/ariana-grande-performs-problem-ft-iggy-12310729/ |archive-date=July 6, 2015 }}</ref> and twelve [[Teen Choice Awards]].<ref>{{cite web |date=August 16, 2015 |title=2015 Teen Choice Award Winners – Full List |url=https://variety.com/2015/tv/news/teen-choice-awards-winners-2015-full-list-1201571268/ |access-date=August 17, 2015 |work=Variety}}</ref> She was named ''Billboard'' Women in Music's Rising Star in 2014<ref>{{cite magazine |last=Lynch |first=Joe |url=https://www.billboard.com/articles/events/women-in-music-2014/6405617/ariana-grande-rising-star-women-in-music |title=Women in Music's Rising Star Ariana Grande Shares Her Mother's Most Important Lesson |magazine=[[Billboard (magazine)|Billboard]] |date=December 12, 2014}}</ref> and [[Billboard Women in Music|Woman of the Year]] in 2018,<ref name="Aniftos">{{cite magazine |last=Aniftos |first=Rania |url=https://www.billboard.com/articles/events/women-in-music/8483492/ariana-grande-billboard-2018-woman-of-the-year |title=Ariana Grande Is Billboard's 2018 Woman of the Year |magazine=[[Billboard (magazine)|Billboard]] |access-date=November 6, 2018}}</ref> the greatest pop star of 2019, with honorable mentions in 2014 and 2018; and the most successful female artist to debut in the 2010s by ''[[Billboard (magazine)|Billboard]]''.<ref name="billboard.com">{{cite magazine |url=https://www.billboard.com/charts/decade-end/top-artists |title=Decade-End Charts Top Artists 2010s |magazine=[[Billboard (magazine)|Billboard]] |access-date=December 4, 2019}}</ref><ref>{{cite magazine |url=https://www.billboard.com/greatest-pop-star-every-year/?_gl=1*dl8i7y*_ga*YW1wLUxfSTlTay1vMWg0LU51YUpuLThNU3QyWXZKSnpsUnJGdU8zVDJSQmFYd3BZSUw4RGZwdElDcEtHQUs0dExVRW4 |title=The Greatest Pop Star By Year |magazine=[[Billboard (magazine)|Billboard]] |access-date=January 21, 2023}}</ref> Grande was named one of the ten best-selling [[Global Recording Artist of the Year|global recording artists]] of 2018, 2019, and 2020 by the [[International Federation of the Phonographic Industry]] (IFPI), being the highest-ranked woman of 2018 (number eight).<ref>{{cite magazine |last=Paine |first=Andrew |date=February 26, 2019 |title=Drake named IFPI's global recording artist of 2018 |url=https://www.musicweek.com/talent/read/drake-named-ifpi-s-global-recording-artist-of-2018/075443 |access-date=October 10, 2024 |magazine=[[Music Week]]}}</ref><ref>{{cite magazine |last=Cirisano |first=Tatiana |date=March 2, 2020 |title=Taylor Swift Crowned IFPI's Global Best-Selling Artist of 2019 |url=https://www.billboard.com/pro/taylor-swift-ifpi-global-best-selling-artist-2019/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite magazine |last=Brandle |first=Lars |date=March 4, 2021 |title=BTS Crowned IFPI Global Recording Artist of 2020 |url=https://www.billboard.com/pro/bts-ifpi-global-recording-artist-2020/ |access-date=October 10, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> The IFPI ranked her as 2024 and 2025's eleventh-best-selling recording artist globally.<ref name="ifpi2024"/><ref>{{Cite magazine |last=Smith |first=Thomas |date=February 18, 2026 |title=Taylor Swift Named IFPI's Biggest-Selling Global Artist in 2025, Her Fourth Year in a Row |url=https://www.billboard.com/music/chart-beat/taylor-swift-biggest-selling-artist-globally-2025-ifpi-list-1236181162/ |access-date=February 20, 2026 |magazine=Billboard}}</ref> For acting, Grande has been nominated for an [[Academy Award]], two [[Golden Globe Awards]], two [[Critics' Choice Movie Awards|Critics' Choice]] awards, and a [[British Academy Film Awards|BAFTA Award]], [[Screen Actors Guild Awards|Screen Actors Guild Award]], and [[Satellite Award for Best Actress in a Supporting Role|Satellite Award]] each.<ref name="WickedNoms"/>
Nine singles by Grande have topped the [[List of Billboard Hot 100 chart achievements and milestones|''Billboard'' Hot 100]], her most recent being "[[We Can't Be Friends (Wait for Your Love)]]".<ref name="wcbfn1">{{Cite magazine |last=Trust |first=Gary |date=March 18, 2024 |title=Ariana Grande's 'We Can't Be Friends' Debuts at No. 1 on Billboard Hot 100 |url=https://www.billboard.com/lists/ariana-grande-we-cant-be-friends-hot-100-number-one-debut/streams-airplay-sales-3/ |access-date=March 18, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> Grande has a total of twenty-three top-ten songs on the chart, which includes sixteen top-ten debuts thus far, beginning with her first single "[[The Way (Ariana Grande song)|The Way]]"; the lead single from each of her first seven studio albums have debuted in the top ten, making her the only artist to achieve this.<ref>{{cite web |url=https://www.stereogum.com/2022487/ariana-grande-thank-u-next-number-1-debut/news/ |title=Ariana Grande's "thank u, next" Debuts At #1 |date=November 12, 2018 |website=Stereogum |access-date=November 14, 2018}}</ref> In 2020, she became the first act to have her first five number-one singles, "[[Thank U, Next (song)|Thank U, Next]]", "[[7 Rings]]", "[[Stuck With U]]", "[[Rain on Me (Lady Gaga and Ariana Grande song)|Rain on Me]]", and "[[Positions (song)|Positions]]" debut at number one; that year, Grande also broke the record for the most number one debuts and became the first female artist topping [[Billboard Global 200|Global 200, Global 200 Excl. US and Hot 100 simultaneously]].<ref name="Billboard"/> Grande would also become the first artist to have three singles debut at number one on a single calendar year.<ref name="billboardpositions"/> She later broke the record for most simultaneously charting songs on the top 40 of the Hot 100 for a female artist with the release of her fifth studio album, ''[[Thank U, Next]]'', when eleven of the twelve tracks charted within the region (later surpassed by [[Billie Eilish]]).<ref name=MostTop40/>
The three singles from ''Thank U, Next'', "7 Rings", "[[Break Up with Your Girlfriend, I'm Bored]]", and "Thank U, Next" charted at numbers one, two, and three respectively on the week of February 23, 2019, making Grande the first solo artist to occupy the top three spots of the ''Billboard'' Hot 100 and the first artist to do so since the Beatles in 1964.<ref name="B19"/> With her album ''Thank U, Next'', Grande set the record for the largest streaming week for a pop album and for a female artist at the time, with 307 million on-demand audio streams.<ref name="BB2002"/> With "Die for You" with [[the Weeknd]] reaching number one, she surpassed Paul McCartney as the artist with the most number-one duets in Hot 100 history, with four songs. In December 2025, Grande became the third woman in history to chart eight albums simultaneously on the ''Billboard'' 200, joining [[Taylor Swift]] and [[Whitney Houston]].<ref>{{Cite web |date=December 17, 2025 |title=Ariana Grande Makes ''Billboard'' 200 History With Eight Albums Charting at Once |url=https://inmusicblog.com/ariana-grande-seven-albums-billboard-200-history/ |access-date=January 7, 2026 |website=InMusic Blog}}</ref> {{As of|2026|{{CURRENTMONTHNAME}}}}, Grande has 98 chart entries—the fourth-most among women—on the Hot 100.<ref>{{cite magazine |date=January 7, 2026 |title=Ariana Grande (Chart History): ''Billboard'' Hot 100 |url=https://www.billboard.com/artist/ariana-grande/ |access-date=January 7, 2026 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> She is the female artist with the second-most number-one debuts on the Hot 100 (7).<ref>{{cite magazine |url=https://www.billboard.com/lists/taylor-swift-hot-100-top-14-fortnight-post-malone-record/swifts-12th-hot-100-no-1/ |title=Taylor Swift Claims Record Top 14 Spots on Billboard Hot 100, Led by 'Fortnight' With Post Malone |magazine=[[Billboard (magazine)|Billboard]] |last=Trust |first=Gary |date=April 29, 2024 |access-date=October 7, 2024}}</ref> On the ''Billboard'' [[Pop Airplay]] chart, Grande has 10 number-ones and 23 top-ten songs.<ref name="popairplay">{{cite web |url=https://www.billboard.com/artist/ariana-grande/chart-history/tfm/ |title=Ariana Grande Chart History (Pop Airplay) |magazine=[[Billboard (magazine)|Billboard]] |access-date=October 10, 2024}}</ref> She was also named the ''Billboard'' year-end Top Female Artist of 2017 and 2019 and was ranked sixth among women (twelfth overall) on the magazine's decade-end Top Artists Chart for the 2010s, the highest for any female act to have debuted that decade.<ref>{{cite news |title=Year-End Charts Top Artists – Female (2017) |url=https://www.billboard.com/charts/year-end/2017/top-artists-female/ |access-date=June 11, 2022 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite news |title=Year-End Charts Top Artists – Female (2019) |url=https://www.billboard.com/charts/year-end/2019/top-artists-female/ |access-date=June 11, 2022 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite news |title=Decade-End Charts Top Artists (2010s) |url=https://www.billboard.com/charts/decade-end/top-artists/ |access-date=November 25, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> The magazine also ranked her as the sixth-greatest pop star of 2024,<ref>{{Cite magazine |last=Unterberger |first=Andrew |date=December 23, 2024 |title=''Billboard'' Staff's 10 Greatest Pop Stars of 2024 (Full List) |url=https://www.billboard.com/lists/greatest-pop-stars-2024-full-list |access-date=December 29, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{Cite magazine |last=Denis |first=Kyle |date=December 18, 2024 |title=''Billboard'' Staff's Greatest Pop Stars of 2024: No. 6 — Ariana Grande |url=https://www.billboard.com/music/pop/ariana-grande-greatest-pop-stars-2024-1235860692/ |access-date=December 29, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> 78th on the "Greatest of All Time Hot 100 Artists" chart,<ref>{{cite news |title=Greatest of All Time Hot 100 Artists |url=https://www.billboard.com/charts/greatest-hot-100-artists/ |access-date=November 25, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref><ref>{{cite magazine |date=November 23, 2021 |title=The Weeknd's 'Blinding Lights' Is the New No. 1 Billboard Hot 100 Song of All Time |url=https://www.billboard.com/music/chart-beat/the-weeknd-blinding-lights-all-time-hot-100-1235001770/ |access-date=November 25, 2021 |magazine=[[Billboard (magazine)|Billboard]]}}</ref> and 19th on their "Top Artists of the 21st Century" list.<ref>{{Cite magazine |date=January 8, 2025 |title=Top Artists of the 21st Century |url=https://www.billboard.com/charts/top-artists-of-the-21st-century/ |url-access=subscription |access-date=January 11, 2025 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
As of 2025, Grande has broken 40 ''[[Guinness World Records]]''.<ref name="Higgins">{{cite web |first=Cole |last=Higgins |title=Ariana Grande just earned her 20th Guinness World Records title |url=https://www.cnn.com/2021/02/07/entertainment/ariana-grande-20th-guinness-world-records-tnd/index.html |access-date=February 9, 2021 |publisher=CNN |date=February 8, 2021}}</ref><ref>{{Cite web |last=Newman |first=Vicki |date=January 16, 2025 |title=Ariana Grande takes huge Spotify record from Taylor Swift amid Wicked box office success |url=https://www.guinnessworldrecords.com/news/2025/1/ariana-grande-takes-huge-spotify-record-from-taylor-swift-amid-wicked-box-office-success/ |access-date=January 25, 2025 |website=[[Guinness World Records]]}}</ref> These records included the most songs to debut at number one on the ''Billboard'' Hot 100, most followers on Spotify (female), most monthly listeners on Spotify (female), most-streamed act on Spotify (female), most streamed track in one week by a female artist on the Billboard charts, fastest hat-trick of UK No. 1 singles by a female artist, first female artist to replace herself at No. 1 on UK singles chart, first solo artist to replace themselves at No. 1 on UK singles chart for two consecutive weeks, most subscribers for a musician on YouTube (female), most streamed album by a female artist in one week (UK), among others. Eleven records were achieved from the success of her album ''Thank U, Next'' which was featured in the 2020 edition.
== Philanthropy and activism ==
At age ten, Grande co-founded the South Florida youth singing group Kids Who Care, which performed at charitable fund-raisers and raised over $500,000 in 2007 alone.<ref name="AboutAriana">{{cite web |title=Ariana Grande – About Ariana |url=http://www.arianagrande.info/about.php |publisher=OfficalArianaGrande |access-date=October 29, 2016 |archive-url=https://web.archive.org/web/20140212053628/http://www.arianagrande.info/about.php |archive-date=February 12, 2014}}</ref> In 2009, as a member of the charitable organization Broadway in South Africa, she and her brother Frankie performed and taught music and dance to children in [[Gugulethu]], South Africa.<ref name="Backstage">{{cite web |last=Nikutopia |title=Ariana Grande's Brother Frankie to Play Cat's Brother in Upcoming "Victorious" Episode? |url=http://www.nickutopia.com/2011/11/15/ariana-grandes-brother-frankie-to-play-cats-brother-in-upcoming-victorious-episode/ |access-date=July 17, 2013 |archive-url=https://web.archive.org/web/20131017234719/http://www.nickutopia.com/2011/11/15/ariana-grandes-brother-frankie-to-play-cats-brother-in-upcoming-victorious-episode/ |archive-date=October 17, 2013}}</ref><ref>{{cite web |title=Ariana Grande on PIX Morning News (April 30, 2010) |url=https://www.youtube.com/watch?v=9YhZQiGJHnw |archive-url=https://ghostarchive.org/varchive/youtube/20211220/9YhZQiGJHnw |archive-date=December 20, 2021 |url-status=live |via=YouTube |date=October 2010}}{{cbignore}}</ref>
She was featured with [[Bridgit Mendler]] and [[Kat Graham]] in ''[[Seventeen (American magazine)|Seventeen]]'' magazine in a 2013 public campaign to end [[online bullying]] called "Delete Digital Drama".<ref>{{cite web |url=http://www.seventeen.com/entertainment/features/delete-digital-drama-quotes-bridgit-mendler#slide-1 |title=Spread Love, Not Hate |work=Seventeen Magazine |access-date=July 8, 2012}}</ref> After watching the film ''[[Blackfish (film)|Blackfish]]'' that year, she urged fans to stop supporting [[SeaWorld]].<ref name="DailyNews1"/> In September 2014, Grande participated at the charitable [[Stand Up to Cancer]] television program, performing her song "My Everything" in memory of her grandfather, who had died of cancer that July.<ref>{{cite magazine |title=The Who, Ariana Grande, and Dave Matthews Help Stand Up to Cancer |url=https://www.rollingstone.com/music/news/the-who-ariana-grande-and-dave-matthews-help-stand-up-to-cancer-20140906 |magazine=[[Rolling Stone]] |date=September 6, 2014 |access-date=September 5, 2014 |archive-date=August 25, 2017 |archive-url=https://web.archive.org/web/20170825064221/https://www.rollingstone.com/music/news/the-who-ariana-grande-and-dave-matthews-help-stand-up-to-cancer-20140906 }}</ref> Grande has adopted several rescue dogs as pets and has promoted pet adoption at her concerts.<ref>{{cite web |last=Lindner |first=Emilee |url=http://www.mtv.com/news/2110984/ariana-grande-dogs |archive-url=https://web.archive.org/web/20150322105241/http://www.mtv.com/news/2110984/ariana-grande-dogs/ |archive-date=March 22, 2015 |title=Ariana Grande Rescued 15 Dogs And Is Giving Them Away to Her Fans |publisher=[[MTV]] |date=March 20, 2015}}; and {{cite web |last=Caldwell |first=Kayla |url=http://www.nbcmiami.com/news/local/Miami-Dade-Animal-Services-Adoption-Fees-Waived-297885061.html |title=Miami-Dade Animal Services Adoption Fees Waived |website=NBCMiami.com |date=March 28, 2015}}</ref> In 2016, she launched a line of lip shades, "Ariana Grande's MAC Viva Glam", with MAC Cosmetics, the profits of which benefited people affected by HIV and AIDS.<ref>{{cite web |last=Ruffo |first=Jillian |url=http://stylenews.peoplestylewatch.com/2016/01/13/its-here-ariana-grandes-m-a-c-viva-glam-collection-can-finally-grace-your-lips |title=It's Here: Ariana Grande's M.A.C Viva Glam Collection Can Finally Grace Your Lips |work=[[People (magazine)|People]] StyleWatch |date=January 13, 2016 |access-date=January 13, 2016 |archive-url=https://web.archive.org/web/20160329025103/http://stylenews.peoplestylewatch.com/2016/01/13/its-here-ariana-grandes-m-a-c-viva-glam-collection-can-finally-grace-your-lips/ |archive-date=March 29, 2016 }}</ref><ref>{{cite web |last=Keirans |first=Maeve |url=http://www.mtv.com/news/2894076/ariana-grande-viva-glam-campaign |archive-url=https://web.archive.org/web/20160617135108/http://www.mtv.com/news/2894076/ariana-grande-viva-glam-campaign/ |archive-date=June 17, 2016 |title=Ariana Grande Is a Beautiful Giant In Her New MAC Campaign |publisher=[[MTV]] |date=June 16, 2016}}</ref> That same year, Grande and [[Andrea Martin]] participated in the [[Children of Armenia Fund]] (COAF) gala concert, a benefit for raising funds for impoverished children in [[Armenia]], by encouraging people to buy tickets in support.<ref>{{Cite web |date=November 30, 2016 |title=Andrea Martin, Ariana Grande call to join Children of Armenia Fund Gala |url=https://style.news.am/eng/news/36511/andrea-martin-ariana-grande-call-to-join-children-of-armenia-fund-gala.html |website=style.news.am}}</ref><ref>{{Cite web |date=November 30, 2016 |title=Tom Hanks, Ariana Grande and Andrea Martin call on taking part in Children of Armenia Fund's Gala |url=https://armenpress.am/en/article/869872 |website=Armenpress |language=en}}</ref>
In 2015, Grande and [[Miley Cyrus]] performed a cover of [[Crowded House]]'s "[[Don't Dream It's Over]]" as part of Cyrus's "[[Backyard Sessions]]" to benefit her [[Happy Hippie Foundation]], which helps homeless and LGBTQ youths.<ref>{{cite web |url=https://www.yahoo.com/music/neil-finn-salutes-miley-cyrus-and-ariana-grandes-119053970556.html |title=Neil Finn Salutes Miley Cyrus and Ariana Grande's Crowded House Cover |publisher=Yahoo! Music |date=May 16, 2015}}; and {{cite magazine |url=https://time.com/3858597/miley-cyrus-ariana-grande-cover/ |title=Watch Miley Cyrus and Ariana Grande Cover 'Don't Dream It's Over' |magazine=Time |date=May 14, 2015}}; and {{cite magazine |last=O'Donnell |first=Kevin |url=https://www.ew.com/article/2015/05/13/miley-cyrus-ariana-dont-dream-its-over-cove |title=Watch Miley Cyrus and Ariana Grande Cover 'Don't Dream It's Over' |magazine=Entertainment Weekly |date=May 14, 2015}}{{dead link|date=November 2021 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> Later that year, Grande headlined the Dance On the Pier event, part of the [[LGBT Pride March (New York City)|LGBT Pride]] Week in New York City.<ref>{{cite web |last=Erlich |first=Brenna |url=http://www.mtv.com/news/2198691/ariana-grande-dance-pier-scotus-marriage-equality/ |archive-url=https://web.archive.org/web/20150630195659/http://www.mtv.com/news/2198691/ariana-grande-dance-pier-scotus-marriage-equality/ |archive-date=June 30, 2015 |title=Ariana Grande Told All the Haters In SCOTUS to 'Get Their Heads Out Of Their F–king Asses' |publisher=MTV News |date=June 29, 2015}}; and {{cite magazine |last=Hinzmann |first=Dennis |url=http://www.out.com/popnography/2015/7/01/icymi-ariana-grande-slayed-nyc-prides-dance-pier |title=ICYMI: Ariana Grande Slayed at NYC Pride's Dance on the Pier |magazine=Out |date=July 1, 2015}}</ref> As a feminist, Grande wrote a well-received, "empowering" essay on Twitter decrying the double standard and misogyny in the focus of the press on female musicians' relationships and sex lives instead of "their value as an individual".<ref>{{cite magazine |last=Peters |first=Mitchell |date=June 7, 2015 |title=Ariana Grande Shares Empowering Essay Following Big Sean Breakup |url=https://www.billboard.com/music/pop/ariana-grande-shares-empowering-essay-following-big-sean-breakup-6590565/ |magazine=[[Billboard (magazine)|Billboard]]}}; and {{cite news |date=June 8, 2015 |title=Ariana Grande Lashes Out Against 'Double Standard and Misogyny' |url=https://abcnews.go.com/Entertainment/ariana-grande-lashes-double-standard-misogyny/story?id=31602353 |agency=ABC News}}</ref><ref>{{cite magazine |last=Plucinska |first=Joanna |date=June 8, 2015 |title=Pop-Star Sisterhood Approves Ariana Grande's Feminist Stand |url=https://time.com/3912119/ariana-grande-taylor-swift-rita-ora-feminist-twitter-sisterhood/ |magazine=Time |access-date=November 18, 2024 |archive-date=November 27, 2024 |archive-url=https://web.archive.org/web/20241127234714/https://time.com/3912119/ariana-grande-taylor-swift-rita-ora-feminist-twitter-sisterhood/ }}; and {{cite news |last=Rosa |first=Jelani |date=June 10, 2015 |title=Here's What Selena Gomez Had to Say About Ariana Grande's Empowering Feminist Essay |url=https://www.washingtonpost.com/blogs/style-blog/wp/2014/09/19/ariana-grande-is-on-the-brink-of-a-major-image-problem-how-can-she-fix-it |newspaper=The Washington Post}}</ref> She said that she has "more to talk about" concerning her music and accomplishments rather than her romantic relationships.<ref>{{cite news |last=Grinberg |first=Emanuella |date=June 9, 2015 |title=Ariana Grande takes down sexist double standards in a single tweet |url=http://www.cnn.com/2015/06/07/entertainment/ariana-grande-double-standard-misogyny-tweet-feat |publisher=CNN}}</ref><ref>{{cite news |last=Yahr |first=Emily |date=June 8, 2015 |title=Why Ariana Grande's feminist Twitter post was a brilliant career move |url=https://www.washingtonpost.com/blogs/style-blog/wp/2015/06/08/why-ariana-grandes-feminist-twitter-post-was-a-brilliant-career-move |newspaper=The Washington Post}}</ref> That year, Grande joined [[Madonna]] to raise funds for orphaned children in [[Malawi]];<ref>{{cite magazine |last=Roberts |first=Kayleigh |url=http://www.elle.com/culture/celebrities/news/a41203/ariana-grande-madonna-racy-performance |title=Ariana Grande and Madonna Gave a Racy Live Performance Together |magazine=[[Elle (magazine)|Elle]] |date=December 3, 2016}}</ref> she and [[Victoria Monét]] recorded "Better Days" in support of the [[Black Lives Matter]] movement.<ref>{{cite magazine |last=Daly |first=Rhian |url=https://www.nme.com/news/music/ariana-grande-5-1190612 |title=Ariana Grande and Victoria Monét share 'Better Days' in support of Black Lives Matter |magazine=[[NME]] |date=July 11, 2016 |access-date=May 23, 2017}}</ref>
To aid the victims of the [[Manchester Arena bombing]] in 2017, Grande organized the [[One Love Manchester]] concert and re-released "One Last Time" and her live performance of "[[Over the Rainbow]]" at the event as charity singles.<ref name="Civico">{{cite web |last=Civico |first=Aldo |date=June 6, 2017 |title=Ariana Grande, I Wish You Were Our President! |url=https://www.huffingtonpost.com/entry/ariana-grande-i-wish-you-were-our-president_us_59374970e4b06bff911d7bf0 |work=HuffPost}}; and {{cite news |last=Mallenbaum |first=Carly |date=June 5, 2017 |title=Ariana Grande stays strong, makes a pitch-perfect return to Manchester |url=https://www.usatoday.com/story/life/entertainthis/2017/06/04/ariana-grande-manchester-one-love-benefit-concert/102491800/ |newspaper=USA Today}}</ref><ref>{{cite news |url=http://www.sfgate.com/news/media/Ariana-Grande-continues-raising-money-for-899426.php |title=Ariana Grande continues raising money for Manchester victims |agency=[[SFGate]] |date=June 8, 2017}}</ref> The total amount raised was reportedly $23 million (more than £17 million),<ref name="Fader2018"/><ref name="FundsRaised"/> and she received praise for her "grace and strength" in leading the benefit concert.<ref>{{cite magazine |last=Lynskey |first=Dorian |date=June 9, 2017 |title=How Ariana Grande's Embrace of Community at 'One Love Manchester' Made Her a Star in the U.K. |url=https://www.billboard.com/music/pop/ariana-grande-uk-star-manchester-one-love-concert-7825656/ |magazine=[[Billboard (magazine)|Billboard]]}}; and {{cite news |date=June 13, 2017 |title=Ariana Grande to get honorary citizenship of Manchester |url=https://www.bbc.com/news/uk-england-manchester-40267365 |agency=BBC News}}</ref><ref name="Civico"/> Madeline Roth of MTV wrote that the performance "bolstered courage among an audience that desperately needed it. ... Returning to the stage was a true act of bravery and resilience".<ref>{{cite news |last=Roth |first=Madeline |date=December 6, 2017 |title=Against All Odds, Selena, Ariana, and Kesha Triumphed In 2017 |url=http://www.mtv.com/news/3050051/selena-gomez-ariana-grande-kesha-triumph-2017 |archive-url=https://web.archive.org/web/20171206190207/http://www.mtv.com/news/3050051/selena-gomez-ariana-grande-kesha-triumph-2017/ |archive-date=December 6, 2017 |publisher=MTV News }} {{Webarchive|url=https://web.archive.org/web/20190912172333/http://www.mtv.com/news/3050051/selena-gomez-ariana-grande-kesha-triumph-2017/ |date=September 12, 2019 }}</ref> In 2017, ''[[New York (magazine)|New York]]'' magazine's Vulture section ranked the event as the No. 1 concert of the year,<ref name="Vulture2017">{{cite web |last=Lockett |first=Dee |date=December 21, 2017 |title=The 10 Best Concerts of 2017 |url=https://www.vulture.com/2017/12/the-10-best-concerts-of-2017.html |magazine=[[New York (magazine)|New York]]}}</ref> and ''Billboard''{{'s}} Mitchell Harrison called Grande a "gay icon" for her LGBTQ-friendly lyrics and performances and "support for the LGBTQ community".<ref>{{cite magazine |last=Harrison |first=Mitchell |date=July 19, 2017 |title=8 Reasons Ariana Grande Is the Gay Icon of Her Generation |url=https://www.billboard.com/photos/7864993/8-reasons-ariana-grande-is-the-gay-icon-of-her-generation |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
In September 2017, Grande performed in ''[[A Concert for Charlottesville]]'' which benefitted the victims of the [[Unite the Right rally|August 2017 white nationalist rally]] in [[Charlottesville, Virginia]].<ref>{{cite magazine |last=Delbyck |first=Cole |url=https://www.huffingtonpost.com/entry/ariana-grande-charlottesville_us_59c8f970e4b01cc57ff38b2b |title=Ariana Grande Returns to the Stage for Charlottesville Unity Concert |magazine=[[HuffPost]] |date=September 25, 2017}}</ref> In March 2018, she participated in [[March for Our Lives]] to support gun control reform.<ref>{{cite magazine |last=Honeycutt |first=Shanté |url=https://www.billboard.com/articles/news/politics/8248854/ariana-grande-miley-cyrus-march-for-our-lives |title=Ariana Grande, Miley Cyrus, Jennifer Hudson & More Set to Join Student-Led March for Our Lives |magazine=[[Billboard (magazine)|Billboard]] |date=March 16, 2018}}; and {{cite magazine |last=Kreps |first=Daniel |url=https://www.rollingstone.com/music/news/watch-ariana-grande-sing-be-alright-at-march-for-our-lives-w518351 |title=Watch Ariana Grande Sing 'Be Alright' at March for Our Lives Rally |magazine=[[Rolling Stone]] |date=March 24, 2018 |access-date=March 29, 2018 |archive-date=June 20, 2018 |archive-url=https://web.archive.org/web/20180620181006/https://www.rollingstone.com/music/news/watch-ariana-grande-sing-be-alright-at-march-for-our-lives-w518351 }}</ref> Grande donated the proceeds from the first show in Atlanta on her [[Sweetener World Tour]] to Planned Parenthood in a response to the passage of a number of anti-abortion laws in several states including [[Georgia (U.S. state)|Georgia]].<ref>{{cite magazine |last=Aswad |first=Jem |url=https://variety.com/2019/music/news/ariana-grande-donates-profits-from-atlanta-concert-to-planned-parenthood-1203240940/ |title=Ariana Grande donates Profits from Atlanta Concert to Planned Parenthood |magazine=Variety |date=June 12, 2019}}</ref><ref>{{cite news |access-date=June 18, 2019 |title=Ariana Grande donates $250,000 from Atlanta concert to Planned Parenthood |url=https://www.usatoday.com/story/life/people/2019/06/12/ariana-grande-donates-georgia-concert-money-planned-parenthood/1430405001/ |newspaper=[[USA Today]]}}</ref> During the [[COVID-19 pandemic]], Grande donated between $500 and $1,000 each to a number of fans as financial support.<ref>{{cite web |url=https://www.refinery29.com/en-us/2020/03/9619034/ariana-grande-taylor-swift-send-money-unemployed-fans-coronavirus |last=Reilly |first=Kaitlin |title=Ariana Grande & Taylor Swift Are Sending Money to Fans Who Lost Their Jobs Due to Coronavirus |website=Refinery29 |date=March 27, 2020}}</ref> Grande also supported a [[COVID-19]] fund named ''Project 100'', which aimed to provide $1,000 digital payments to 100,000 families who have been greatly impacted by the pandemic.<ref>{{cite news |url=https://edition.cnn.com/2020/04/21/politics/stacey-abrams-cory-booker-andrew-yang-snap/index.html |title=Stacey Abrams and Andrew Yang announce push to provide direct cash payments to families on food stamps |last=Judd |first=Donald |publisher=[[CNN]] |date=April 21, 2020}}</ref>
In May 2020, Grande announced that all net proceeds from her collaboration with singer [[Justin Bieber]], "Stuck With U", would be donated to the First Responders Children's Foundation to fund grants and scholarships for children of frontline workers who are working during the [[COVID-19 pandemic|global pandemic]].<ref name="Kaufman"/> That month, Grande joined a Los Angeles protest against the [[murder of George Floyd]], demanding justice and asking fans to sign petitions condemning the act of police brutality. She highlighted white privilege and called for more activism outside social media.<ref>{{cite magazine |title=Ariana Grande, Halsey, Timothée Chalamet, and More Celebrities Spent Their Weekends Protesting |url=https://www.vulture.com/2020/06/george-floyd-protests-ariana-grande-halsey-celebrities-join.html |last=Griffin |first=Louise |date=May 29, 2020 |magazine=New York |access-date=June 2, 2020}}</ref><ref>{{cite magazine |title=Billie Eilish, Beyoncé, Ariana Grande and More Celebrities Respond to George Floyd's Death |url=https://www.teenvogue.com/story/celebrities-respond-george-floyd-death/amp |last=Elizabeth |first=De |date=May 31, 2020 |magazine=[[Teen Vogue]] |access-date=June 2, 2020}}</ref> In 2022, Grande surprised children, who were spending the Christmas holiday period at hospitals in Manchester, with gifts from wish lists at the [[Royal Manchester Children's Hospital]], among others. Manchester Foundation Trust Charity revealed that Grande had gifted nearly 1,000 presents to patients across the hospital network's children's wards and newborn intensive care units in 2021.<ref>{{cite magazine |title=Ariana Grande Gifts Hauls of Christmas Presents to Manchester Children's Hospitals: 'We Were So Touched' |url=https://www.rollingstone.com/music/music-news/ariana-grande-manchester-childrens-hospitals-christmas-presents-1234653389/ |access-date=January 17, 2023 |magazine=[[Rolling Stone]] |date=December 28, 2022}}</ref>
In June 2021, Grande and other celebrities signed an open letter to Congress requesting passage of the [[Equality Act (United States)|Equality Act]], highlighting that the Act would protect "marginalized communities".<ref>{{cite news |last1=Meyers |first1=Dave |title=Ariana Grande, Pink, Halsey, Taylor Swift, Ed Sheeran, Lady Gaga & more urge Congress to pass the Equality Act |url=https://www.wrmf.com/ariana-grande-pink-halsey-taylor-swift-ed-sheeran-lady-gaga-more-urge-congress-to-pass-the-equality-act/ |access-date=June 22, 2021 |publisher=WRMF |date=June 22, 2021}}</ref> In the same month, Grande partnered with the online portal [[BetterHelp]], and gave away $2 million worth of therapy to fans.<ref>{{cite news |title=Ariana Grande donates thousands for free mental health counselling |url=https://jerseyeveningpost.com/morenews/viralnews/2021/06/30/ariana-grande-donates-thousands-for-free-mental-health-counselling/ |access-date=December 30, 2021 |work=Jersey Evening Post |publisher=Claverley Group |date=June 30, 2021}}</ref><ref>{{cite magazine |last=Mcnamara |first=Brittney |date=June 30, 2021 |title=Ariana Grande Is Giving Away $2 Million in Free Therapy With BetterHelp |url=https://www.teenvogue.com/story/ariana-grande-is-giving-away-dollar1-million-in-free-therapy-with-betterhelp |magazine=[[Teen Vogue]] |access-date=December 30, 2021}}</ref> On [[International Transgender Day of Visibility]] in 2022, she launched the Protect & Defend Trans Youth Fund to benefit [[transgender youth]], pledging to match every donation up until $1.5 million.<ref>{{cite news |title=Ariana Grande giving $1.5m to support trans youth amid 'disgraceful' legislative attacks |url=https://www.theguardian.com/music/2022/mar/31/ariana-grande-transgender-youth-rights |last=Cantor |first=Matthew |date=April 1, 2022 |newspaper=[[The Guardian]] |access-date=May 7, 2022}}</ref> In May 2022, Grande was among 160 artists and influencers, who signed a [[2022 abortion rights protests in the United States|'Bans Off Our Bodies']] full-page advertisement in ''[[The New York Times]]'', in support of abortion rights in the US.<ref>{{cite news |title=Ariana Grande and other stars support Roe v Wade in New York Times ad |url=https://www.theguardian.com/us-news/2022/may/13/ariana-grande-billie-eilish-roe-v-wade-abortion-nyt-ad |date=May 13, 2022 |newspaper=[[The Guardian]] |location=UK |access-date=May 15, 2022}}</ref> Grande was also one of 175 entertainers to sign an open letter to oppose books bans in US schools in 2023.<ref>{{cite web |last=Horton |first=Adrian |url=https://www.theguardian.com/books/2023/sep/19/celebrities-sign-letter-book-ban-ariana-grande-amanda-gorman |title='Chilling': Ariana Grande, Amanda Gorman and others sign letter against book bans |newspaper=[[The Guardian]] |date=September 19, 2023}}</ref> In June 2022, Grande endorsed [[Karen Bass]] for 2022 Los Angeles mayoral election.<ref>{{cite magazine |last=Rosenbaum |first=Claudia |date=June 6, 2022 |title="There's More to Being a Democrat Than Just Registering": The L.A. Mayor's Race Is Tearing Hollywood Apart |url=https://www.vanityfair.com/news/2022/06/the-la-mayors-race-is-tearing-hollywood-apart |access-date=June 6, 2022 |magazine=[[Vanity Fair (magazine)|Vanity Fair]]}}</ref>
In 2023, Grande signed an open letter from [[Artists4Ceasefire]] to president [[Joe Biden]] during the [[Gaza war]].<ref>{{Cite web |title=Artists4Ceasefire |url=https://www.artists4ceasefire.org/ |url-status=live |archive-url=https://web.archive.org/web/20231216055552/https://www.artists4ceasefire.org/ |archive-date=December 16, 2023 |access-date=December 17, 2023 |website=Artists4Ceasefire}}</ref><ref>{{Cite web |last=Mouriquand |first=David |date=May 29, 2024 |title=Why is Taylor Swift losing followers over Gaza conflict? |url=https://www.euronews.com/culture/2024/05/29/swiftiesforpalestine-taylor-swift-urged-to-speak-up-on-gaza-conflict |access-date=June 2, 2024 |website=[[Euronews]]}}</ref> In May 2024, after [[Rafah offensive|Israel launched an airstrike on Rafah]], Grande shared a fundraiser aimed at providing humanitarian aid for Palestinians in Gaza.<ref>{{Cite news |last=Butt |first=Maira |date=May 30, 2024 |title=Kehlani calls out celebrities for 'embarrassing' silence on Gaza – as Ariana Grande and Katy Perry speak out |url=https://www.independent.co.uk/arts-entertainment/music/news/kehlani-gaza-celebrities-ariana-grande-katy-perry-b2553769.html |access-date=June 2, 2024 |work=The Independent}}</ref> Following Biden's [[Withdrawal of Joe Biden from the 2024 United States presidential election|withdrawal]] from the [[2024 US presidential election]], Grande showed support for vice president [[Kamala Harris]]'s [[Kamala Harris 2024 presidential campaign|campaign]].<ref>{{Cite web |last=Spencer-Elliott |first=Lydia |date=July 22, 2024 |title=Katy Perry and Ariana Grande among stars to endorse Kamala Harris for president |url=https://www.independent.co.uk/arts-entertainment/music/news/kamala-harris-president-katy-perry-ariana-grande-jamie-lee-curtis-b2583697.html |access-date=July 22, 2024 |website=The Independent}}</ref> In January 2025, she reposted messaging from the nonprofit organization [[Advocates for Trans Equality]], via her social media, in response to US President [[Executive Order 14168|Donald Trump's order]] to withdraw federal recognition for transgender people.<ref>{{Cite magazine |last=Puckett-Pope |first=Lauren |date=January 21, 2025 |title=Ariana Grande Signals Support for Trans Community After President Trump Issues 'Two Sexes' Executive Order |url=https://www.elle.com/culture/celebrities/a63494135/ariana-grande-trump-sex-executive-order-trans-community/ |access-date=April 2, 2025 |magazine=[[Elle (magazine)|Elle]]}}</ref> The following month, Grande advocated for therapy for young entertainers in both the acting and music fields, saying that weekly appointments should be built into their contracts.<ref>{{Cite magazine |last=Shafer |first=Ellise |date=February 10, 2025 |title=Ariana Grande Says Studios and Labels Need to Offer Weekly Therapy in Contracts for Young Stars: 'That Should Be Non-Negotiable' |url=https://variety.com/2025/film/news/ariana-grande-studios-labels-need-offer-therapy-young-stars-1236302363/ |access-date=April 2, 2025 |magazine=Variety}}</ref> That June, she endorsed [[Alexandria Ocasio-Cortez]]'s recommendation to impeach Trump for a "disastrous decision to [[United States strikes on Iranian nuclear sites|bomb Iran]] without authorization".<ref>{{cite magazine |first=Anna |last=Chan |title=Ariana Grande Shares AOC's Call to Impeach President Donald Trump |url=https://www.billboard.com/music/music-news/ariana-grande-aoc-impeach-donald-trump-1236004909/ |magazine=[[Billboard (magazine)|Billboard]] |date=June 23, 2025 |access-date=June 25, 2025}}</ref>
== Business and ventures ==
=== Products and endorsements ===
In November 2015, she released a limited edition handbag in collaboration with [[Coach New York|Coach]].<ref>{{cite web |last=Last |first=Ashley |url=https://www.thenational.ae/coach-unveils-collaboration-with-ariana-grande-1.75347 |title=Coach unveils collaboration with Ariana Grande |date=November 4, 2015 |access-date=October 12, 2019}}</ref> In January 2016, she launched a makeup collection with [[MAC Cosmetics]], donating 100% of proceeds to the [[MAC AIDS Fund]].<ref>{{cite web |url=http://www.instyle.com/news/ariana-grande-good-girl-bad-girl-mac-viva-glam |title=Ariana Grande Goes from a Good Girl to a Bad Girl MAC's Viva Glam Campaign |work=InStyle |date=January 13, 2016 |access-date=February 28, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213313/https://www.instyle.com/news/ariana-grande-good-girl-bad-girl-mac-viva-glam }}; {{cite web |last=Kinonen |first=Sarah |url=http://site.people.com/style/ariana-grande-mac-cosmetics-viva-glam-collection |title=Ariana Grande's Having the Most Glam Week Ever (and It's Only Monday) |work=[[People (magazine)|People]] |date=August 22, 2016 |access-date=August 23, 2016 |archive-date=August 29, 2016 |archive-url=https://web.archive.org/web/20160829103306/http://site.people.com/style/ariana-grande-mac-cosmetics-viva-glam-collection/ }}</ref> In February 2016, Grande launched a fashion line with Lipsy London.<ref>{{cite web |url=https://www.mtv.co.uk/news/tbidj1/first-look-at-the-fashion-line-ariana-grande-has-designed-for-lipsy |title=Ariana Grande Teams Up With Lipsy for Her First Fashion Line |publisher=[[MTV]] |date=February 3, 2016 |access-date=February 28, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213258/http://www.mtv.co.uk/ariana-grande/news/first-look-at-the-fashion-line-ariana-grande-has-designed-for-lipsy |url-status=live}}</ref> Later that year, she teamed up with [[Brookstone]], using the concept art of artist Wenqing Yan, to design cat ear headphones.<ref>{{cite magazine |url=https://www.billboard.com/articles/news/7517948/ariana-grande-brookstone-cat-ear-headphones |title=Ariana Grande & Brookstone Collaborate on Limited-Edition Cat-Ear Headphones |magazine=[[Billboard (magazine)|Billboard]] |date=September 20, 2016 |access-date=December 2, 2019}}</ref> In 2017, Grande collaborated with [[Square Enix]] to create a character based on herself for the [[mobile game]] ''[[Final Fantasy Brave Exvius]]''. Grande was a limited-time unlockable character as part of the [[Dangerous Woman Tour]] event, which also included an orchestral remix of Grande's song "Touch It"; the character, Dangerous Ariana, is a magical support character who uses music-based attacks.<ref>{{cite web |last=Wong |first=Steven |date=February 7, 2017 |title=How 'Final Fantasy Brave Exvius' Teamed Up With Ariana Grande |url=https://www.alistdaily.com/digital/final-fantasy-brave-exvius-teamed-ariana-grande/ |url-status=live |archive-url=https://web.archive.org/web/20200523175139/https://www.alistdaily.com/digital/final-fantasy-brave-exvius-teamed-ariana-grande/ |archive-date=May 23, 2020 |access-date=June 18, 2020 |website=AList}}</ref><ref>{{cite web |last=Fahey |first=Mike |date=January 9, 2017 |title=How To Get Ariana Grande in Final Fantasy Brave Exvius, Because You Can Do That Now |url=https://kotaku.com/how-to-get-ariana-grande-in-final-fantasy-brave-exvius-1791380918 |url-status=live |archive-url=https://web.archive.org/web/20191021215011/https://kotaku.com/how-to-get-ariana-grande-in-final-fantasy-brave-exvius-1791380918 |archive-date=October 21, 2019 |access-date=June 18, 2020 |website=[[Kotaku]]}}</ref> In September 2017, she became a brand ambassador for [[Reebok]].<ref>{{cite magazine |last=Briones |first=Isis |url=https://www.billboard.com/articles/news/lifestyle/7981657/ariana-grande-hong-kong-in-48-hours |title=48 Hours in Hong Kong With Ariana Grande |magazine=[[Billboard (magazine)|Billboard]] |date=September 29, 2017}}</ref>
In August 2018, she partnered with [[American Express]] for [[The Sweetener Sessions]], a partnership which continued through the [[Sweetener World Tour]] in 2019, alongside [[T-Mobile US|T-Mobile]]. In March 2019, she partnered with [[Starbucks]] for the launch of the Cloud Macchiato beverage.<ref>{{cite magazine |url=https://www.billboard.com/articles/business/8501214/ariana-grande-starbucks-cloud-macchiato |title=Ariana Grande Inspires New Starbucks Cloud Macchiato |magazine=[[Billboard (magazine)|Billboard]] |last=Silver |first=Michael |date=March 5, 2019 |access-date=October 23, 2019}}</ref> In May 2019, Grande was announced as the face of [[Givenchy]]'s fall-winter campaign.<ref>{{cite magazine |last=Feller |first=Madison |url=https://www.elle.com/fashion/celebrity-style/a27432137/givenchy-face-ariana-grande-ponytail/ |title=Ariana Grande's Ponytail Is The New Face Of Givenchy |magazine=[[Elle (magazine)|Elle]] |date=May 10, 2019 |access-date=September 17, 2024}}</ref> The campaign began in July and generated $25.13 million in [[Influence of mass media|media impact value]].<ref>{{cite web |last=Cohen |first=Julia |url=https://www.launchmetrics.com/resources/blog/ariana-grande-givenchy |title=Givenchy X Ariana Grande: The Full Data Rundown |website=Launchmetrics |date=September 16, 2019 |access-date=October 11, 2019}}</ref> In July 2024, she became the brand ambassador of [[Swarovski]]; Grande's first appearance as the face was in the house's holiday campaign in October 2024.<ref>{{cite journal |last=Zargini |first=Luisa |url=https://wwd.com/accessories-news/jewelry/ariana-grande-swarovski-brand-ambassador-1236488984/ |title=EXCLUSIVE: Swarovski Taps Ariana Grande as Brand Ambassador |journal=[[Women's Wear Daily]] |date=July 16, 2024 |access-date=September 17, 2024 |url-access=subscription}}</ref><ref>{{Cite journal |last=Mineo |first=Alfredo |date=October 29, 2024 |title=Ariana Grande Dances the Night Away in Swarovski's Shining Couture Dress for Holiday Campaign Music Video |url=https://wwd.com/pop-culture/new-fashion-releases/swarovski-ariana-grande-party-of-dreams-collection-1236705279/ |journal=Women's Wear Daily |access-date=October 31, 2024}}</ref> Grande collaborated with the company's global creative director [[Giovanna Battaglia Engelbert]] on two capsule collections, released in January 2025 and March 2026.<ref>{{Cite magazine |last=Calfee |first=Joel |date=January 28, 2025 |title=Ariana Grande Has Co-Created a Brand-New Capsule With Swarovski |url=https://www.harpersbazaar.com/celebrity/latest/a63577778/ariana-grande-swarovski-capsule-collection-giovanna-engelbert-interview/ |access-date=January 30, 2025 |magazine=[[Harper's Bazaar]]}}</ref><ref>{{Cite magazine |last=Graham |first=Joshua |date=March 18, 2026 |title=Ariana Grande channels ethereal beauty for her second collection with Swarovski |url=https://www.rollingstone.co.uk/style/ariana-grande-x-swarovski-collaboration-2026-59708/ |access-date=March 20, 2026 |magazine=[[Rolling Stone UK]]}}</ref> [[Beats Electronics|Beats]], [[Samsung]], [[Fiat]], Reebok, and [[Guess (clothing)|Guess]] products have been [[Product placement|featured]] in Grande's music videos.<ref>{{cite web |url=https://productplacementblog.com/tag/ariana-grande/ |title=Ariana Grande Product Placement Photos |website=Product Placement Blog |date=December 8, 2018 |access-date=October 11, 2019}}</ref> She has appeared in commercials for [[Macy's]], T-Mobile, and [[Apple Inc.|Apple]], as well as for her own fragrances.<ref>{{cite web |url=https://www.ispot.tv/topic/actor-actress/TY/ariana-grande |title=Ariana Grande TV Commercials Ads |website=i-Spot |access-date=October 11, 2019}}</ref> Since 2019, Grande has been among the ten highest-paid individuals on Instagram. As of 2025, Grande earns $2 million per sponsored Instagram post.<ref>{{Cite news |date=June 29, 2025 |title=Virat Kohli is the only Indian among top 20 highest paid celebrities on Instagram, earns these many crores for every post |url=lhttps://indianexpress.com/article/trending/top-10-listing/top-20-highest-paid-celebs-on-instagram-virat-kohli-earns-this-much-per-post-10090668/ |access-date=July 3, 2025 |work=[[The Indian Express]]}}</ref><ref>{{cite web |url=https://www.scmp.com/magazines/style/celebrity/article/3139620/instagrams-2021-rich-list-cristiano-ronaldo-highest |title=Instagram's 2021 rich list: Cristiano Ronaldo is the highest earner, pushing Dwayne Johnson into second with Ariana Grande third |magazine=[[South China Morning Post]] |date=July 3, 2021 |access-date=October 18, 2022}}</ref>
=== Fragrances ===
Grande has released eighteen fragrances with Luxe Brands. She launched her debut fragrance, Ari by Ariana Grande, in 2015. In the wake of its success, she launched her third fragrance, Sweet Like Candy, in 2016.<ref>{{cite web |last=Bayley |first=Leanne |url=http://www.glamourmagazine.co.uk/news/beauty/2015/02/20/ariana-grande-first-fragrance-celebrity-perfume-news |title=Ariana Grande is launching her first fragrance |work=Glamour (magazine) |date=February 20, 2015 |access-date=May 19, 2015 |archive-url=https://web.archive.org/web/20150403135040/http://www.glamourmagazine.co.uk/news/beauty/2015/02/20/ariana-grande-first-fragrance-celebrity-perfume-news |archive-date=April 3, 2015 }}; {{cite web |last=Geffen |first=Sasha |url=http://www.mtv.com/news/2192443/ariana-grande-perfume-snapchat |title=Ariana Grande Accidentally Revealed Her New Perfume On Snapchat: See The Pics |publisher=[[MTV]] |date=June 20, 2015 |access-date=October 30, 2016 |archive-date=September 14, 2019 |archive-url=https://web.archive.org/web/20190914032913/http://www.mtv.com/news/2192443/ariana-grande-perfume-snapchat/ }}; {{cite web |last=Zhekova |first=Dobrina |url=http://www.instyle.com/beauty/fragrance/ariana-grande-sweet-like-candy-launch |title=Ariana Grande Launches Sweet Like Candy Fragrance – Celebrity Perfumes |work=InStyle |date=July 20, 2016 |access-date=October 8, 2016 |archive-date=March 19, 2019 |archive-url=https://web.archive.org/web/20190319213314/https://www.instyle.com/beauty/fragrance/ariana-grande-sweet-like-candy-launch }}</ref> Her fifth fragrance, Moonlight, was released in 2017, followed by Cloud (2018), Thank U, Next (2019), R.E.M. (2020), and God Is a Woman (2021), which was later expanded to an [[Ulta Beauty|Ulta]]-exclusive body care line in 2022.<ref>{{cite web |last=Shaw |first=Sophie |date=August 22, 2022 |title=Ariana Grande launches God Is A Woman body care collection |url=https://edition.cnn.com/cnn-underscored/beauty/ariana-grande-god-is-a-woman-body-collection-launch |archive-url=https://web.archive.org/web/20220822140922/https://edition.cnn.com/cnn-underscored/beauty/ariana-grande-god-is-a-woman-body-collection-launch |archive-date=August 22, 2022 |access-date=August 31, 2022 |publisher=[[CNN]]}}</ref> She then released the duo fragrance collection Mod Vanilla and Mod Blush (2022).<ref>{{cite web |url=https://wwd.com/fashion-news/fashion-scoops/ariana-grande-mod-fragrance-vanilla-blush-duo-release-info-1235426415/ |title=Ariana Grande Channels '60s Mod Inspiration for New Vanilla and Blush Fragrance Duo Collection |agency=[[PR Newswire]] |date=November 22, 2022}}</ref> It was followed by the collection Lovenotes (2024), which consisted of four region-exclusive fragrances.<ref>{{Cite magazine |last=Saulog |first=Gabriel |date=August 9, 2024 |title=Ariana Grande Announces New International Fragrance Line 'LOVENOTES' |url=https://billboardphilippines.com/culture/lifestyle/ariana-grande-announces-new-international-fragrance-line-lovenotes/ |access-date=October 31, 2024 |magazine=[[Billboard Philippines]]}}</ref>
The next fragrance was Cherry Blossom (2025), released as a R.E.M. Beauty product via Ulta.<ref>{{Cite web |last=Chapman |first=Rachel |date=February 28, 2025 |title=Ariana Grande's Cherry Eclipse Or Sabrina Carpenter's Cherry Baby? |url=https://www.elitedaily.com/lifestyle/ariana-grande-cherry-eclipse-sabrina-carpenter-cherry-baby-perfume-reviews/ |access-date=April 1, 2025 |website=[[Elite Daily]]}}</ref> The range also includes the limited editions Frankie (2016), Sweet Like Candy Limited Edition (2017), Thank U, Next 2.0, Cloud Intense (both 2021), and Cloud Pink (2023). The fragrances won the [[FiFi Award]] multiple times, most recently with R.E.M. in 2021. In 2022, it was reported that Cloud was the best-selling fragrance at Ulta, selling one bottle every eleven seconds.<ref>{{cite web |last=Russo |first=Maria Del |date=March 23, 2022 |title=This Cult-Favorite Perfume Sold Every 11 Seconds Last Year — And Now I Know Why |url=https://www.thezoereport.com/beauty/ariana-grande-cloud-perfume |access-date=May 7, 2022 |website=The Zoe Report}}</ref> As of 2024, the scents are developed and manufactured in collaboration with [[Robertet Group]] and [[International Flavors & Fragrances]].<ref>{{Cite web |last=Wightman-Stone |first=Danielle |date=August 12, 2024 |title=Ariana Grande unveils new region-specific fragrance collection |url=https://fashionunited.in/news/fashion/ariana-grande-unveils-new-region-specific-fragrance-collection/2024081246184/ |access-date=October 31, 2024 |publisher=[[FashionUnited]]}}</ref> Grande's fragrance line is the most-searched celebrity offering, with over 4.4 million searches across Google and social media platforms per year, as of 2023.<ref>{{cite magazine |last=Jensen |first=Emily |date=August 14, 2023 |title=Ariana Grande Is the Last Great Celebrity Perfumer |url=https://www.harpersbazaar.com/beauty/a41924718/ariana-grande-perfumes-reviews-success/ |access-date=November 26, 2023 |magazine=Harper's Bazaar}}</ref> Since its launch in 2015, the franchise has made over $1 billion in retail sales globally.<ref>{{cite web |last=Pener |first=Degen |date=November 23, 2022 |title=''The Hollywood Reporter''<nowiki/>'s 40 Biggest Celebrity Entrepreneurs in 2022 |url=https://www.hollywoodreporter.com/lists/the-hollywood-reporters-40-biggest-celebrity-entrepreneurs-2022/jennifer-aniston-6/ |access-date=October 31, 2024 |work=[[The Hollywood Reporter]]}}</ref>
=== R.E.M. Beauty ===
{{Main|R.E.M. Beauty}}
In November 2021, Grande launched her makeup line R.E.M. Beauty, which is distributed at Ulta Beauty as of March 2022.<ref name=HarpersBeauty>{{cite magazine |last=Rosenstein |first=Jenna |url=https://www.harpersbazaar.com/beauty/makeup/a38225476/ariana-grande-rem-beauty-review/ |title=Ariana Grande's Makeup Brand, r.e.m. beauty, Is Available Right Now |magazine=[[Harper's Bazaar]] |date=November 12, 2021}}</ref><ref>{{cite magazine |url=https://wwd.com/beauty-industry-news/beauty-features/ariana-grandes-r-e-m-beauty-heads-to-ulta-1235139566/ |title=Ariana Grande's R.E.M. Beauty Heads to Ulta |date=March 25, 2022 |last=Manso |first=James |magazine=Women's Wear Daily}}</ref> The original line featured 12 core products for lips and eyes, and the range has since been expanded with additional skincare and makeup products.<ref name=HarpersBeauty/><ref>{{cite magazine |url=https://www.elle.com/uk/beauty/make-up/a37945600/ariana-grande-rem-beauty-line/ |title=Everything You Need To Know About Ariana Grande's R.E.M Beauty Line |access-date=August 9, 2022 |date=July 29, 2022 |magazine=Elle}}</ref> ''[[Forbes]]'' reported in 2022 that R.E.M. Beauty was one of the brands boosting Ulta's driving gross margin due to strong consumer demand.<ref>{{cite magazine |url=https://www.forbes.com/sites/shelleykohan/2022/05/26/strong-customer-demand-leads-ulta-beauty-to-a-21-sales-increase/ |title=Strong Customer Demand Leads Ulta Beauty To A 21% Sales Increase |access-date=June 3, 2022 |date=May 26, 2022 |last=Cohan |first=Shelley |magazine=Forbes}}</ref> In May, the line won "Best New Brand" at the [[Allure (magazine)#Best of Beauty Awards|Allure Best of Beauty Awards]].<ref>{{cite magazine |title=These Are the Winners of Our Allure Readers' Choice Awards for 2022 |url=https://www.allure.com/story/readers-choice-winners#newbrand |magazine=[[Allure (magazine)|Allure]] |date=May 16, 2017 |access-date=June 3, 2022 |url-status=live |archive-url=https://web.archive.org/web/20220518152443/https://www.allure.com/story/readers-choice-winners |archive-date=May 18, 2022}}</ref> In February 2023, the brand was launched in 81 [[Sephora]] stores and 13 online sites, including across Europe.<ref>{{cite web |url=https://fashionunited.uk/news/fashion/ariana-grande-s-beauty-line-to-launch-at-sephora/2023020167634 |title=Ariana Grande's beauty line to launch at Sephora |access-date=February 2, 2023 |date=February 1, 2023 |publisher=[[FashionUnited]]}}</ref>
== Personal life ==
Grande has said she struggled with [[hypoglycemia]], which she attributed to poor dietary habits.<ref>{{cite web |last=Carbone |first=Gina |url=http://www.wetpaint.com/nickelodeon-star-ariana-grande-addresses-597630/ |title=Nickelodeon Star Ariana Grande Addresses Eating Disorder Rumors |work=WetPaint |date=June 19, 2013 |access-date=December 11, 2018 |archive-date=September 16, 2019 |archive-url=https://web.archive.org/web/20190916112840/http://www.wetpaint.com/nickelodeon-star-ariana-grande-addresses-597630/ }}; and {{cite magazine |last=Goodman |first=Lizzy |url=https://www.billboard.com/articles/news/6221482/billboard-cover-ariana-grande-on-fame-freddy-krueger-and-her-freaky-past |title=''Billboard'' Cover: Ariana Grande on Fame, Freddy Krueger and Her Freaky Past |magazine=[[Billboard (magazine)|Billboard]] |date=August 15, 2014}}</ref> She has been following a [[vegan]] diet since 2013,<ref>{{cite news |last=Nied |first=Jennifer |date=August 16, 2020 |title=Ariana Grande Sticks To A Vegan Diet And Walks 12,000 Steps A Day |url=https://www.womenshealthmag.com/food/a33472196/ariana-grande-diet/ |work=Women's Health |access-date=August 21, 2022}}</ref> though fans questioned in 2019 whether she still was, after working with [[Starbucks]] to create a special edition of one of her favorite drinks which was revealed to contain eggs. Her nutritionist, Harley Pasternak, told the magazine [[Glamour (magazine)|''Glamour'']] that Grande is still following the diet, but that he has gotten her to "feel OK about indulging and celebrating sometimes".<ref>{{cite news |date=March 11, 2019 |title=Ariana Grande Vegan? '7 Rings' Singer's Diet As Fans Question New Starbucks Drink |url=https://www.capitalfm.com/artists/ariana-grande/vegan-starbucks-7-rings-diet/ |work=Capital |access-date=August 21, 2022}}</ref>
Grande developed [[post-traumatic stress disorder]] (PTSD) and [[Anxiety disorder|anxiety]] after the [[Manchester Arena bombing]]; she nearly pulled out of her performance in the 2018 broadcast ''[[A Very Wicked Halloween]]'' due to anxiety.<ref>{{cite web |last=Sheridan |first=Emily |url=https://www.mirror.co.uk/3am/celebrity-news/ariana-grande-reveals-shes-suffering-13429859 |title=Ariana Grande reveals she's suffering from anxiety after 'split' from Pete Davidson |work=[[Daily Mirror|Mirror]] |date=October 17, 2018}}</ref> Grande has also said she has been in therapy for over a decade, having first seen a mental health professional shortly after her parents' divorce.<ref>{{cite web |last=Weiner |first=Zoë |url=https://www.self.com/story/ariana-grande-therapy-anxiety |title=Ariana Grande Reveals She's Been in Therapy for Over a Decade: 'It's Work' |work=Self |date=July 11, 2018}}</ref>
Grande was raised [[Catholic]], but left the church during the pontificate of [[Benedict XVI]] (circa 2013),<ref>{{cite web |title=Singer Ariana Grande Abandons Catholic Beliefs |url=http://www.cathnewsusa.com/2013/11/singer-ariana-grande-abandons-catholic-beliefs/ |website=CathNewsUSA |access-date=February 9, 2014 |date=November 20, 2013 |archive-date=August 26, 2019 |archive-url=https://web.archive.org/web/20190826085614/http://cathnewsusa.com/2013/11/singer-ariana-grande-abandons-catholic-beliefs/ }}</ref> opposing its [[Catholic Church and homosexuality|stance on homosexuality]]<ref name="DailyNews1"/> and stating that her half-brother Frankie is gay.<ref name="brenna">{{cite web |last=Ehrlich |first=Brenna |url=http://www.mtv.com/news/1972089/ariana-grande-questions-religion |title=Ariana Grande Reveals Love for Gay Brother Frankie Made Her Question Catholic Faith |publisher=[[MTV]] |date=October 22, 2014 |access-date=May 3, 2016 |archive-url=https://web.archive.org/web/20220209002618/http://www.mtv.com/news/1972089/ariana-grande-questions-religion/ |archive-date=February 9, 2022}}</ref> Grande said that she and Frankie later visited a [[Kabbalah Centre]] and that they both "really had a connection with it".<ref name="CoolDiva"/><ref name="brenna"/> Several of her songs, such as "Break Your Heart Right Back", are supportive of [[LGBT rights]].<ref>{{cite web |author-last1=Peeples |author-first1=Jason |url=http://www.advocate.com/arts-entertainment/music/2014/08/16/ariana-grande-says-recording-song-about-gay-affair-was-very-fun |title=Ariana Grande Says Recording Song About Gay Affair Was 'Very Fun' |magazine=[[The Advocate (LGBT magazine)|The Advocate]] |date=August 16, 2014}}</ref> She has also been labeled "an advocate for a [[sex-positive]] attitude".<ref>{{cite magazine |last=Bruner |first=Raisa |date=February 27, 2017 |title=Watch Ariana Grande's Steamy, Diverse and Sex-Positive Video for 'Everyday' |url=https://time.com/4684270/ariana-grande-future-everyday-video/ |magazine=[[Time (magazine)|Time]] |access-date=January 3, 2021 |archive-date=January 15, 2021 |archive-url=https://web.archive.org/web/20210115214102/https://time.com/4684270/ariana-grande-future-everyday-video/ }}</ref>
===Politics===
In November 2019, Grande endorsed [[Bernie Sanders]]'s [[Bernie Sanders 2020 presidential campaign|second presidential bid]].<ref>{{cite magazine |date=November 20, 2019 |title=Ariana Grande Breaks Free From Capitalism, Endorses Bernie Sanders |url=https://www.rollingstone.com/music/music-news/ariana-grande-bernie-sanders-915571/ |access-date=April 24, 2022 |magazine=Rolling Stone}}</ref> She endorsed [[Joe Biden]] for the [[2020 United States presidential election|2020 presidential election]],<ref>{{Cite web |date=October 28, 2020 |title=Ariana Grande officially endorses Joe Biden in new Instagram post |url=https://www.thenews.com.pk/latest/736920-ariana-grande-officially-endorses-joe-biden-in-new-instagram-post |access-date=June 2, 2024 |website=[[The News International]]}}</ref> and [[Kamala Harris]] for the [[2024 United States presidential election|2024 presidential election]].<ref>{{Cite magazine |last=Dailey |first=Hannah |date=September 17, 2024 |title=All the Musicians Supporting Kamala Harris in the 2024 Presidential Election |url=https://www.billboard.com/lists/musicians-endorsing-kamala-harris-president-2024/ariana-grande-17/ |access-date=September 17, 2024 |magazine=[[Billboard (magazine)|Billboard]]}}</ref>
In June 2025, amid [[U.S. Immigration and Customs Enforcement|ICE]] enforcement operations in [[Los Angeles]], Grande wrote on Instagram that she was "deeply upset about these violent deportations" and that "LA simply wouldn't exist without immigrants", sharing [[American Civil Liberties Union|ACLU]] resources on immigrant rights.<ref name="rodrigo-ice-ticker">{{cite web |last=Stubberud |first=Casper |date=November 17, 2025 |title=Olivia Rodrigo denounces new ICE app in Instagram comment |url=https://theticker.org/17552/arts/arts-amp-style/olivia-rodrigo-denounces-new-ice-app-in-instagram-comment/ |work=The Ticker}}</ref> In January 2026, Grande promoted a nationwide protest against ICE on her Instagram Story, urging followers to participate in the "ICE Out Nationwide Shutdown" on January 30.<ref name="yahoo-grande-ice">{{cite web |date=January 29, 2026 |title=Ariana Grande Continues Political Stance Against ICE With Big Endorsement |url=https://www.yahoo.com/entertainment/music/articles/ariana-grande-continues-political-stance-231516608.html |work=Yahoo! Entertainment}}</ref> At the [[83rd Golden Globe Awards]] on January 11, 2026, Grande wore an "ICE Out" pin on her [[Vivienne Westwood]] dress, part of a coordinated campaign in response to the [[Killing of Renee Nicole Good|fatal shooting of Renee Good]] by an ICE agent in [[Minneapolis]].<ref name="complex-globes">{{cite web |last=Cowen |first=Trace William |date=January 12, 2026 |title=Ariana Grande Wears 'ICE Out' Pin at 2026 Golden Globes |url=https://www.complex.com/pop-culture/a/tracewilliamcowen/ariana-grande-ice-out-pin-golden-globes-2026 |work=[[Complex (magazine)|Complex]]}}</ref><ref name="npr-globes">{{cite web |date=January 12, 2026 |title=Celebrities wear pins protesting ICE at the Golden Globes |url=https://www.npr.org/2026/01/12/g-s1-105659/celebrities-pins-protesting-ice-golden-globes |work=[[NPR]]}}</ref>
=== Relationships ===
<!--PER PREVIOUS Talk page discussions (see Archive), please DO NOT ADD boyfriends until Ariana has had a serious dating relationship with them for more than one continuous year if they have an article or two continuous years if they don't. -->
Grande's personal relationships have been widely scrutinized by the public.<ref>{{Cite magazine |last=Rose |first=Lacey |date=February 11, 2025 |title=The Second Coming of Ariana Grande |url=https://www.hollywoodreporter.com/movies/movie-features/ariana-grande-wicked-oscars-music-love-1236132418/ |access-date=February 18, 2025 |magazine=The Hollywood Reporter}}</ref> Some of her former lovers were mentioned by name in the song "[[Thank U, Next (song)|Thank U, Next]]".<ref>{{cite web |last=Grossman |first=Lena |date=November 4, 2018 |title=Ariana Grande Sings About Pete Davidson and Mac Miller in New Song "Thank u, next" |url=https://www.eonline.com/au/news/983536/ariana-grande-sings-about-pete-davidson-and-mac-miller-in-new-song-thank-u-next |access-date=November 1, 2024 |agency=[[E!]]}}</ref> She dated her ''[[13 (musical)|13]]'' co-star [[Graham Phillips (actor)|Graham Phillips]] for three years.<ref>{{cite magazine |last=Zauzmer |first=Emily |url=http://www.people.com/article/graham-phillips-defends-ariana-grande-donut-scandal |title=Graham Phillips Defends Ex-Girlfriend Ariana Grande After Doughnut Controversy: 'It Doesn't Speak to Her Character at All' |magazine=[[People (magazine)|People]] |date=July 22, 2015 |access-date=January 22, 2018 |archive-date=May 18, 2016 |archive-url=https://web.archive.org/web/20160518201143/http://www.people.com/article/graham-phillips-defends-ariana-grande-donut-scandal }}</ref><ref>{{cite web |last=Cabrera |first=Daniela |url=https://www.bustle.com/articles/180516-who-has-ariana-grande-dated-the-singer-has-a-thing-for-guys-in-the-music-biz |title=Who Has Ariana Grande Dated? The Singer Has a Thing for Guys in the Music Biz |magazine=[[Bustle.com]] |date=August 26, 2016 |access-date=January 22, 2018}}</ref><ref>{{Cite web |url=http://www.californianeutrals.org/PDF/Layn-Phillips-2012.pdf |title=Curriculum Vitae: Judge Layn R. Phillips |website=California Academy of Distinguished Neutrals |access-date=July 25, 2013 |archive-url=https://web.archive.org/web/20141014035929/http://www.californianeutrals.org/PDF/Layn-Phillips-2012.pdf |archive-date=October 14, 2014 }} {{Title missing|date=September 2025}}</ref> From August 2012 to August 2014, Grande was in an [[on-again, off-again relationship]] with Australian YouTuber [[Jai Brooks]].<ref>{{cite web |url=https://sports.yahoo.com/blogs/celeb-news/ariana-grande-breaks-up-with-jai-brooks-following-her-grandfather-s-death-132619459.html |title=Ariana Grande Breaks Up With Jai Brooks Following Her Grandfather's Death |website=[[Yahoo!]] |date=August 5, 2014 |access-date=December 4, 2023}}</ref> She briefly dated English singer [[Nathan Sykes]] during their separation, and then dated rapper [[Big Sean]] for eight months.<ref>{{Cite magazine |date=March 8, 2024 |title=Quick Refresher on Ariana Grande's Full Dating History Over the Years |url=https://www.cosmopolitan.com/entertainment/celebs/a44577267/ariana-grande-dating-relationship-history/ |access-date=April 3, 2024 |magazine=Cosmopolitan}}</ref> Grande was in a year-long relationship with Ricky Alvarez, who was one of her backup dancers on [[the Honeymoon Tour]].<ref>{{Cite magazine |last=Cerón |first=Ella |date=July 26, 2016 |title=Ariana Grande Breaks Up With Boyfriend Ricky Alvarez, According to Sources |url=https://www.teenvogue.com/story/ariana-grande-ricky-alvarez-breakup/ |access-date=November 1, 2024 |magazine=[[Teen Vogue]]}}</ref><ref>{{Cite web |last=Fisher |first=Kendall |date=July 27, 2016 |title=Ariana Grande Breaks Up With Ricky Alvarez |url=https://www.eonline.com/news/782890/ariana-grande-breaks-up-with-ricky-alvarez/ |access-date=November 1, 2024 |website=[[E! Online]]}}</ref>
After recording "[[The Way (Ariana Grande song)|The Way]]" in 2012, Grande began dating rapper [[Mac Miller]] in 2016.<ref>{{cite magazine |last=Garcia |first=Patricia |url=http://www.vogue.com/13484221/mac-miller-the-divine-feminine-album |title=Mac Miller on Love, Ariana Grande, and the Last Thing That Made Him Cry |magazine=[[Vogue (magazine)|Vogue]] |date=September 27, 2016 |access-date=May 25, 2017 |archive-date=January 3, 2017 |archive-url=https://web.archive.org/web/20170103170159/http://www.vogue.com/13484221/mac-miller-the-divine-feminine-album/ }}</ref><ref>{{cite web |last=Avila |first=Theresa |date=September 7, 2016 |title=Ariana Grande Confirms Her Relationship With Mac Miller by Literally Wrapping Her Legs Around Him |url=https://nymag.com/thecut/2016/09/ariana-grande-wraps-her-legs-around-mac-miller-in-photo.html |access-date=October 31, 2024 |work=[[The Cut (publication)|The Cut]]}}</ref> She was prominently featured on his fourth album ''[[The Divine Feminine]]'' (2016), including on its third single "[[My Favorite Part]]".<ref>{{Cite web |last=Yoo |first=Noah |date=September 9, 2016 |title=Listen to Mac Miller and Ariana Grande's New Song "My Favorite Part" |url=https://pitchfork.com/news/68142-listen-to-mac-miller-and-ariana-grandes-new-song-my-favorite-part/ |access-date=May 8, 2024 |website=[[Pitchfork (website)|Pitchfork]]}}</ref><ref>{{Cite magazine |last=Quinn |first=Dave |date=May 24, 2018 |title=Ariana Grande Says Mac Miller's Explicit Song 'Cinderella' Is About Her and Twitter Is Shook |url=https://people.com/music/ariana-grande-mac-miller-cinderella-about-her-twitter-shook/ |access-date=March 19, 2024 |magazine=[[People (magazine)|People]]}}</ref> By May 2018, their relationship had ended and Grande entered a whirlwind romance with comedian [[Pete Davidson]].<ref name="mac001">{{cite magazine |last=Penrose |first=Nerisha |url=https://www.billboard.com/music/rb-hip-hop/ariana-grande-mac-miller-relationship-timeline-8457806/ |title=A Timeline of Ariana Grande & Mac Miller's Relationship |magazine=[[Billboard (magazine)|Billboard]] |date=May 25, 2018}}; and {{cite magazine |last=Jackson |first=Dory |url=http://www.newsweek.com/ariana-grande-mac-miller-break-reveal-920158 |title=Why Did Ariana Grande and Mac Miller Break Up? Singer Shares Update on Instagram Story Post |magazine=[[Newsweek]] |date=May 10, 2018}}</ref> They got engaged in June, after a few weeks of dating, while a [[Pete Davidson (song)|song titled after and inspired by Davidson]] was featured on ''Sweetener''.<ref>{{cite news |last=Mallenbaum |first=Carly |title=Pete Davidson confirms Ariana Grande engagement: 'I feel like I won a contest' |url=https://www.usatoday.com/story/life/entertainthis/2018/06/11/ariana-grande-pete-davidson-engaged/693041002 |newspaper=[[USA Today]] |date=June 21, 2018 |access-date=June 21, 2018}}</ref> That September, Miller [[Mac Miller#Death|died from an accidental drug overdose]]; Grande expressed grief over his death on social media and called him her "dearest friend".<ref>{{cite news |url=https://www.usatoday.com/story/life/music/2018/09/14/ariana-grande-posted-video-ex-boyfriend-mac-miller-friday-another-touching-remembrance-26-year-old-r/1306393002/ |title=Ariana Grande in tribute post to Mac Miller: 'You were my dearest friend' |first=Julia |last=Thompson |date=September 14, 2018 |newspaper=[[USA Today]]}}</ref> She and Davidson called off their engagement and ended their relationship the following month.<ref>{{Cite web |last=Ahlgrim |first=Callie |title=Here's a complete timeline of Ariana Grande and Pete Davidson's whirlwind engagement and sudden split |url=https://www.businessinsider.com/ariana-grande-pete-davidson-relationship-timeline-2018-6 |access-date=April 1, 2024 |website=Business Insider}}</ref>
Grande began dating real estate agent Dalton Gomez in January 2020.<ref>{{cite web |last1=Seemayer |first1=Zach |last2=Schillaci |first2=Sophie |title=Ariana Grande and Dalton Gomez Split After 2 Years of Marriage: A Timeline of Their Whirlwind Romance |website=Entertainment Tonight |date=July 17, 2023 |url=https://www.etonline.com/ariana-grande-and-dalton-gomez-split-after-2-years-of-marriage-a-timeline-of-their-whirlwind |access-date=July 19, 2025}}</ref> Their relationship, while mostly private, was made public in May 2020, in the music video of her and [[Justin Bieber]]'s charity single "[[Stuck with U]]".<ref>{{cite web |last=Bailey |first=Alyssa |date=May 8, 2020 |title=Ariana Grande Confirms She's Dating Dalton Gomez With a Kiss in Her 'Stuck With U' Music Video |url=https://www.elle.com/culture/celebrities/a32414537/ariana-grande-dalton-gomez-kiss-stuck-with-u-music-video/ |access-date=May 19, 2021 |website=[[Elle (magazine)|Elle]]}}</ref> Grande announced their engagement on December 20, 2020, after 11 months of dating.<ref>{{cite magazine |url=https://www.hollywoodreporter.com/news/ariana-grande-engaged-to-real-estate-agent-dalton-gomez |title=Ariana Grande Engaged to Real Estate Agent Dalton Gomez |magazine=[[The Hollywood Reporter]] |date=December 20, 2020 |last=Perez |first=Lexy}}</ref> On May 15, 2021, they married in a private ceremony at her home in [[Montecito, California]].<ref>{{cite magazine |last=Macon |first=Alexandra |title=Inside Ariana Grande's Intimate At-Home Wedding |url=https://www.vogue.com/slideshow/ariana-grande-at-home-wedding-photos |access-date=May 26, 2021 |magazine=[[Vogue (magazine)|Vogue]]}}</ref> Her wedding pictures became [[List of most-liked Instagram posts|the second-most-liked Instagram post]] and most-liked Instagram post featuring pictures of people at the time, with over 25 million likes.<ref>{{cite news |title=Ariana Grande's wedding photo become most-liked Instagram post that features people |url=https://www.today.com/video/ariana-grande-s-wedding-photo-become-most-liked-instagram-post-that-features-people-113975365505 |access-date=May 29, 2021 |work=[[Today (American TV program)|Today]] |date=May 29, 2021}}</ref><ref>{{cite news |last=Longmire |first=Becca |date=May 28, 2021 |title=Ariana Grande Breaks Instagram Record After Sharing Stunning Photos From Wedding To Dalton Gomez |url=https://etcanada.com/news/785525/ariana-grande-breaks-instagram-record-after-sharing-stunning-photos-from-wedding-to-dalton-gomez/ |archive-url=https://web.archive.org/web/20210528141032/https://etcanada.com/news/785525/ariana-grande-breaks-instagram-record-after-sharing-stunning-photos-from-wedding-to-dalton-gomez/ |archive-date=May 28, 2021 |access-date=May 29, 2021 |work=[[Entertainment Tonight Canada]] }} {{Webarchive|url=https://web.archive.org/web/20210528141032/https://etcanada.com/news/785525/ariana-grande-breaks-instagram-record-after-sharing-stunning-photos-from-wedding-to-dalton-gomez/ |date=May 28, 2021 }}</ref> Grande and Gomez separated on February 20, 2023, and simultaneously filed for divorce that September due to "[[irreconcilable differences#United States|irreconcilable differences]]".<ref>{{Cite web |last1=Calvario |first1=Liz |last2=Dasrath |first2=Diana |date=October 7, 2023 |title=Ariana Grande and Dalton Gomez settle divorce after two years of marriage |url=https://www.today.com/popculture/news/ariana-grande-dalton-gomez-relationship-timeline-divorce-rcna108116 |access-date=March 19, 2024 |work=Today}}</ref> They agreed on a [[divorce settlement]] in October, which was finalized in March 2024.<ref>{{cite magazine |url=https://people.com/ariana-grande-and-dalton-gomez-settle-divorce-8348933 |title=Ariana Grande and Dalton Gomez Settle Divorce Weeks After Filing |first=Angel |last=Saunders |date=October 6, 2023 |access-date=October 6, 2023 |magazine=[[People (magazine)|People]]}}</ref><ref name="daltongomez_divorce">{{Cite news |date=March 19, 2024 |title=Ariana Grande and Dalton Gomez are officially divorced |url=https://apnews.com/article/ariana-grande-dalton-gomez-divorce-f4393ab6b6c203f11d3fa4534978d6a8 |access-date=March 19, 2024 |work=[[Associated Press News]]}}</ref> As of July 2023, Grande is in a relationship with her ''Wicked'' co-star [[Ethan Slater]].<!-- Do not change to "began dating in July" without a reliable source; the source cited with this statement does not say so--><ref>{{Cite magazine |last=Gibson |first=Kelsie |date=November 5, 2024 |title=Ariana Grande and Ethan Slater's Relationship Timeline |url=https://people.com/ariana-grande-and-ethan-slater-relationship-timeline-7974917 |access-date=December 28, 2024 |magazine=[[People (magazine)|People]]}}</ref>
== Filmography ==
{{Main|Ariana Grande videography}}
{{hatnote|This section lists select works only. Refer to the main article for further information.}}
{{col-begin}}
{{col-2}}
'''Films and television'''
* ''[[Victorious]]'' (2010–2013)
* ''[[Sam & Cat]]'' (2013–2014)
* ''[[Swindle (2013 film)|Swindle]]'' (2013)
* ''[[Metegol|Underdogs]]'' (2016)
* ''[[Hairspray Live!]]'' (2016)
* ''[[Don't Look Up]]'' (2021)
* ''[[Wicked (2024 film)|Wicked]]'' (2024){{notetag|name="agb"|Credited as Ariana Grande-Butera.}}
* ''[[Brighter Days Ahead]]'' (2025){{notetag|Short film; also co-writer, co-director and executive producer.}}
* ''[[Wicked: For Good]]'' (2025){{notetag|name="agb"}}
{{col-2}}
'''Documentaries and concert specials'''
* ''[[One Love Manchester]]'' (2017)
* ''[[Ariana Grande at the BBC]]'' (2018)
* ''[[Ariana Grande: Dangerous Woman Diaries]]'' (2018)
* ''[[Ariana Grande: Excuse Me, I Love You]]'' (2020)
{{col-end}}
== Discography ==
{{Main|Ariana Grande discography|List of songs recorded by Ariana Grande}}
* ''[[Yours Truly (Ariana Grande album)|Yours Truly]]'' (2013)
* ''[[My Everything (Ariana Grande album)|My Everything]]'' (2014)
* ''[[Dangerous Woman]]'' (2016)
* ''[[Sweetener (album)|Sweetener]]'' (2018)
* ''[[Thank U, Next]]'' (2019)
* ''[[Positions (album)|Positions]]'' (2020)
* ''[[Eternal Sunshine (album)|Eternal Sunshine]]'' (2024)
== Live performances and tours ==
{{Main|List of Ariana Grande live performances}}
=== Musical theater ===
{| class="wikitable"
!Year
!Production
!Role
!Director
!Venue
!Notes
!{{Reference column heading}}
|-
|2008
| rowspan="2" |''[[13 (musical)|13]]''
| rowspan="2" |Charlotte
| rowspan="2" |[[Jeremy Sams]]
|[[Norma Terris Theatre]], [[Chester, Connecticut|Chester]]
|
|<ref>Jones, Kenneth. [http://www.playbill.com/news/article/117016.html "Teen Time! Cast Announced for Goodspeed Run of '13' Musical"] {{Webarchive|url=https://web.archive.org/web/20080502124634/http://www.playbill.com/news/article/117016.html|date=May 2, 2008}}, playbill.com, April 22, 2008</ref>
|-
|[[Bernard B. Jacobs Theatre]], [[Manhattan]]
|Original [[Broadway theatre|Broadway]] Cast
|<ref>Gans, Andrew and Kenneth Jones. [http://www.playbill.com/news/article/123569.html "New Musical 13 to Close on Broadway in January 2009"] {{Webarchive|url=https://web.archive.org/web/20081216011558/http://www.playbill.com/news/article/123569.html|date=December 16, 2008}}, playbill.com, November 21, 2008</ref>
|-
|2012
|''[[A Snow White Christmas (musical)|A Snow White Christmas]]''
|[[Snow White]]
|[[Bonnie Lythgoe]]
|[[Pasadena Playhouse]]
|
|<ref>{{cite web |date=December 30, 2012 |title=A Snow White Christmas |url=http://www.pasadenaplayhouse.org/box-office/mainstage/a-snow-white-christmas.html |archive-url=https://web.archive.org/web/20120914035847/http://www.pasadenaplayhouse.org/box-office/mainstage/a-snow-white-christmas.html |archive-date=September 14, 2012 |access-date=May 11, 2013 |publisher=The Pasadena Playhouse}}</ref><ref>{{Cite web |last=Garcia |first=Dawn |date=December 14, 2012 |title=A Snow White Christmas |url=https://atodmagazine.com/2012/12/14/a-snow-white-christmas/ |access-date=April 15, 2024 |website=atodmagazine.com |archive-date=December 9, 2025 |archive-url=https://web.archive.org/web/20251209010006/https://atodmagazine.com/2012/12/14/a-snow-white-christmas/ |url-status=dead }}</ref>
|-
|2027
|[[Sunday in the Park with George|''Sunday in the Park with George'']]
|Dot / Marie
|[[Marianne Elliott]]
|[[Barbican Centre|Barbican Theater]]
|
|<ref name=":4" />
|}
=== Tours ===
==== Headlining ====
* [[The Listening Sessions]] (2013)
* [[The Honeymoon Tour]] (2015)
* [[Dangerous Woman Tour]] (2017)
* [[Sweetener World Tour]] (2019)
* [[The Eternal Sunshine Tour]] (2026)
==== Promotional ====
* [[The Sweetener Sessions]] (2018)
==== Opening act ====
* [[Justin Bieber]] – [[Believe Tour]] (2013)
== See also ==
{{Portal|Biography|Pop music|United States}}
* [[List of American Grammy Award winners and nominees]]
* [[List of artists who have achieved simultaneous UK and U.S. number-one hits]]
* [[List of artists who reached number one in the United States]]
* [[List of Billboard Social 50 number-one artists|List of ''Billboard'' Social 50 number-one artists]]
* [[Honorific nicknames in popular music]]
* [[UK singles chart records and statistics]]
== Notes ==
{{reflist|group=note}}
== References ==
{{Reflist}}
{{notelist}}
== External links ==
{{sister project links|d=Q151892|q=Ariana Grande|c=category:Ariana Grande|n=no|b=no|v=no|voy=no|m=no|mw=no|wikt=no|s=no|species=no}}
* {{#invoke:Official website|main}}
* {{AllMusic}}
* {{Discogs artist}}
* {{IMDb name}}
* {{MusicBrainz artist}}
* {{IBDB name}}
* {{playbill person}}
{{Ariana Grande|state=expanded}}
{{Ariana Grande songs}}
{{Navboxes
|title = [[List of awards and nominations received by Ariana Grande|Awards for Ariana Grande]]
|list =
{{American Music Award for Artist of the Year}}
{{American Music Award for Favorite Pop/Rock Female Artist}}
{{American Music Award for New Artist of the Year}}
{{Astra Film Award for Best Supporting Actress}}
{{Brit International Female}}
{{Grammy Award for Best Pop Duo/Group Performance}}
{{Grammy Award for Best Pop Vocal Album}}
{{Japan Gold Disc Award for Artist of the Year}}
{{Nickelodeon Kids' Choice Award for Favorite Female Singer}}
{{Nickelodeon Kids' Choice Award for Favorite Female TV Star}}
{{Nickelodeon Kids' Choice Award for Favorite Movie Actress}}
{{Nickelodeon Kids' Choice Award for Favorite Song}}
{{MTV Europe Music Award for Best Female}}
{{MTV Europe Music Award for Best Pop}}
{{MTV Europe Music Award for Best US Act}}
{{MTV Video Music Award for Video of the Year}}
{{MTV Video Music Award for Song of the Year}}
{{MTV Video Music Award for Artist of the Year}}
{{MTV Video Music Award for Best Collaboration}}
{{MTV Video Music Award for Best Long Form Video}}
{{MTV Video Music Award for Best Pop Video}}
{{MTV Video Music Award for Song of Summer}}
{{People's Choice Award for Favorite Female Artist}}
{{San Diego Film Critics Society Award for Best Supporting Actress}}
{{Satellite Award Best Supporting Actress Motion Picture}}
{{Teen Choice Award for Choice Music – Female Artist}}
}}
{{Authority control}}
{{DEFAULTSORT:Grande, Ariana}}
[[Category:Ariana Grande| ]]
[[Category:1993 births]]
[[Category:Living people]]
[[Category:21st-century American actresses]]
[[Category:21st-century American singer-songwriters]]
[[Category:21st-century American women singers]]
[[Category:21st-century people from Florida]]
[[Category:American actors with disabilities]]
[[Category:American activists for Palestinian solidarity]]
[[Category:American contemporary R&B singers]]
[[Category:American former Christians]]
[[Category:LGBTQ rights activists from Florida]]
[[Category:American musical theatre actresses]]
[[Category:American sopranos]]
[[Category:American television actresses]]
[[Category:American women pop singers]]
[[Category:American women singer-songwriters]]
[[Category:Anti-bullying activists]]
[[Category:Brit Award winners]]
[[Category:Kabbalists]]
[[Category:Crime witnesses]]
[[Category:American dance-pop musicians]]
[[Category:American feminist musicians]]
[[Category:Grammy Award winners]]
[[Category:Judges in American reality television series]]
[[Category:MTV Europe Music Award winners]]
[[Category:Music Awards Japan winners]]
[[Category:Nickelodeon people]]
[[Category:Actresses from Boca Raton, Florida]]
[[Category:People with post-traumatic stress disorder]]
[[Category:Republic Records artists]]
[[Category:Singer-songwriters from Florida]]
[[Category:Singers with a four-octave vocal range]]
[[Category:Universal Music Group artists]]
[[Category:American women in electronic music]]
[[Category:American musicians with disabilities]]
[[Category:Singers with disabilities]]
[[Category:Survivors of terrorist attacks]]
[[Category:American women company founders]]
[[Category:American people of Italian descent]]
evpwfw6efeu6tkuoaq210s9i1f62ow7
Niobium
0
119434
750398
470399
2026-07-07T12:53:17Z
DMburugu (WMF)
61358
/* growthexperiments-addlink-summary-summary:3|0|0 */
750398
wikitext
text/x-wiki
''Niobium'' is a [[chemical element]] with symbol Nb and [[atomic number]] Nb in period 5. It appears as a gray metallic, bluish when oxidized. It is a Solid
==Chemical properties==
Niobium has an [[atomic mass]] of 92.906372, a boiling point of 5017, a density of 8.57, a melting point of 2750, a molar heat of 24.6, an electron configuration of 1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p6 4d4 5s1, and an electron affinity of 88.516.
[[Category:Chemical elements]]
gfki13txcd0507mlgrq0t2oc2a714kq
La Cinq
0
121959
750459
748943
2026-07-08T00:04:15Z
InternetArchiveBot
34092
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
750459
wikitext
text/x-wiki
{{distinguish|France 5|LA-5 (disambiguation){{!}}LA-5|Le Cinq}}
{{short description|Former French television channel}}
{{Expand French|La Cinq|date=March 2018}}
{{Infobox television channel
| name = La Cinq
| launch_date = {{Start date and age|1986|2|20|df=y}}
| closed_date = {{End date and age|1992|4|12|df=y}}
| picture_format = [[SECAM]] [[576i]] ([[4:3]] [[SDTV]])
| slogan = {{unbulleted list|
"La Cinq, votre nouvelle amie" ("La Cinq, your new friend") {{small|(1986)}}|
"Cinq you La Cinq!" ("Cinq you, La Cinq!") ( {{small|(1987)}}|
"Cinéma ou télévision, La Cinq, tous les soirs un film" ("Cinema or Television, a movie every night on La Cinq") {{small|(1988)}}|
"La Cinq, la télé qui ne s'éteint jamais" ("La Cinq, the channel that never goes off") {{small|(1989)}}|
"L'information sans concession, c'est sur La Cinq!" ("Uncompromising information, it's on La Cinq!") {{small|(1990)}}|
"La 5, c'est 5 sur 5" ("La 5, it's 5 out of 5") {{small|(1991)}}|
"Faites la chaîne pour votre chaîne" ("Make the channel for your channel") {{small|(1992)}} }}
| country = [[France]]
| owner = {{unbulleted list|
[[Chargeurs|Chargeurs réunis]] and [[Fininvest]] {{small|(1985-1987)}}|
[[Robert Hersant]] and Fininvest {{small|(1987-1990)}}|
[[Lagardère Group|Matra Hachette]] and Fininvest {{small|(1990-1992)}} }}
| former_names =
| language = French
| replaced_by = [[Arte]] <br> [[France 5]] (known as "La Cinquième" before 2002) {{small|(1994)}}
}}
[[File:Lacinq1991.jpg|thumb|La Cinq logo]]
'''La Cinq''' ({{Language with name/for||French|The Five}}) was [[France]]'s first privately owned [[free-to-air]] [[television network]]. Created by politician [[Jérôme Seydoux]] and [[Italy|Italian]] media mogul [[Silvio Berlusconi]], the network broadcast from 1985 to 1992.
The contract for France's fifth terrestrial network, which was supposed to have been in effect for an 18-year term, was granted to Seydoux and Berlusconi in November 1985. Programming began on 20 February 1986 at 8:30 pm; the first program on La Cinq was ''Voilà la Cinq'', which was taped at [[Canale 5]]'s studios in [[Milan]], [[Italy]].
==History==
{| class="wikitable" style="text-align:center; border:1px;; cellpadding:2; cellspacing:0; width:10%; float:right;"
|-align="center"
!colspan="2" style="background: #cfecec"|Audience share <br> (1986–1991)
|-
|1986||4.2%
|-align="center"
|1987||7.3%
|-align="center"
|1988||10.3%
|-align="center"
|1989||13.0%
|-align="center"
|1990||11.7%
|-align="center"
|1991||10.9%
|}
===Pre-launch (1985–1986)===
In 1985, a little over a year before the legislative elections, the Socialist Party feared failure and then wanted to create a new space, outside the institutional domain of public television, capable of reaching a large audience (contrary to the private subscription channel [[Canal+]]) and to constitute a relay of opinion to its ideas if it was to return to the opposition.
On 20 November 1985, the government granted an 18-year [[Concession (contract)|concession]] to France Cinq, allowing them to operate the fifth national television network. This decision was criticized by the Minister of Culture and some of the President's advisers, who wanted to see cultural programming, and by the Haute Autorité de la Communication Audiovisuelle, which did not approve of the conditions but had no power to change them. At a press conference on 22 November 1985, Jérome Seydoux and Silvio Berlusconi presented the focus and style of the programs that would be broadcast on the future fifth television channel. In response to critics who accused them of wanting to create "[[Coca-Cola]]" TV, Berlusconi, who developed La Cinq's programming from his catalogs, replied that the channel would be "neither Coca-Cola TV, nor spaghetti TV, but rather [[Beaujolais]] TV, a Saturday [[champagne]].<ref>{{cite web|url=http://www.ina.fr/video/CAB85110844/conference-de-presse-de-silvio-berlusconi-video.html/|title=Conférence de presse de Silvio Berlusconi|first=Institut National de l’Audiovisuel –|last=Ina.fr|date=22 November 1985|website=Ina.fr|access-date=8 May 2017}}</ref> He also promised to feature well-liked TV or film stars.
Determined to block this project, 60 senators had the [[Constitutional Council of France|Constitutional Council]]<ref>{{cite book|url=https://books.google.com/books?id=Naah5vMKRmIC&q=%22amendement+tour+eiffel%22%2F&pg=PA235|title=Havas et l'audiovisuel 1920-1986|first=Pascal|last=Lefebvre|date=1 April 1998|publisher=Editions L'Harmattan|access-date=8 May 2017|via=Google Books|isbn=9782296352056}}</ref> declare "The Eiffel Tower Amendment" (fr: amendement Tour Eiffel) unconstitutional on 13 December 1985.<ref>{{cite web|url=http://www.conseil-constitutionnel.fr/conseil-constitutionnel/francais/les-decisions/acces-par-date/decisions-depuis-1959/1985/85-198-dc/decision-n-85-198-dc-du-13-decembre-1985.8178.html/|title=Conseil Constitutionnel|last=NEXINT|date=10 November 2015|website=www.conseil-constitutionnel.fr|access-date=8 May 2017}}</ref> This forced the government to pass in force by drafting a new bill, which was accepted by Parliament on 21 December. On December 31, 1985, the France 5 company was incorporated in anonymous form with its registered office in Paris.On 16 January 1986 the [[RTL Group]] (at the time the Compagnie Luxembourgeoise de Télédiffusion (CLT) unsuccessfully attempted to have the [[Conseil d'Etat (France)|Council of State]] cancel the concession agreement; instead the government gave the RTL Group the right to use one of the two remaining free channels of the future TDF 1 satellite. On 20 January 1986 [[Silvio Berlusconi]] presented the programs of his future commercial channel, officially known as La Cinq, to journalists, industrialists and advertisers in order to convince them to buy advertising airtime to finance the channel. The next day, the police were forced to intervene in order to allow [[TDF Group|TDF]] technicians to come install La Cinq's transmitters at the top of the [[Eiffel Tower]], after the City of [[Paris]] refused to do so for security reasons.<ref>{{cite web|url=http://www.ina.fr/video/CAB86001861/tour-eiffel-tdf-video.html/|title=Tour Eiffel - TDF|first=Institut National de l’Audiovisuel –|last=Ina.fr|date=21 January 1986|website=Ina.fr|access-date=8 May 2017}}</ref><ref>{{cite web|url=http://www.ina.fr/video/CAB86001973/affaire-tour-eiffel-video.html/|title=Affaire tour Eiffel|first=Institut National de l’Audiovisuel –|last=Ina.fr|date=22 January 1986|website=Ina.fr|access-date=8 May 2017}}</ref>
===Launch (1986–early 1987)===
After three months of animosity<ref>{{cite web|url=http://www.ina.fr/video/CAB86004784/gestation-5eme-chaine-video.html/|title=Gestation 5ème chaîne|first=Institut National de l’Audiovisuel –|last=Ina.fr|website=Ina.fr|access-date=8 May 2017}}</ref> and a month of technical testing, La Cinq was finally able to start broadcasting on Thursday 20 February 1986 at 20:30, airing an introductory broadcast entitled ''Voila la Cinq'', which had been recorded in the [[Fininvest]]<ref>{{cite web|url=http://lacinq.tv.free.fr/grille/grille.htm#samedi26decembre1989/|title=Le site historique de LA CINQ !|website=lacinq.tv.free.fr|access-date=8 May 2017|archive-date=27 May 2017|archive-url=https://web.archive.org/web/20170527185734/http://lacinq.tv.free.fr/grille/grille.htm#samedi26decembre1989/|url-status=dead}}</ref> Group's Milan studio. Up until midnight, [[Christian Morin]], Roger Zabel, [[Amanda Lear]], Ėlisabeth Tordjman and Alain Gillot-Pétré hosted major French stars ([[Johnny Hallyday]], [[Serge Gainsbourg]], [[Mireille Mathieu]], [[Charles Aznavour]]) as well as international stars like [[Ornella Muti]], who had been invited by Silvio Berlusconi to support a show that would be able to compete with TF1 or [[Antenne 2]].<ref>{{YouTube|g5oOWi33GtM|Soiree d'ouverture de la Cinq}}</ref><ref>{{dailymotion|x27l3l|Inaguration la 5}}</ref><ref>{{dailymotion|x27qux|Inaguration la 5 Partie 2}}</ref><ref>{{dailymotion|x43xqv|La 5 1986 ouverture}}</ref> For the next few weeks, the programming consisted of game shows and variety shows like ''Pentathlon, C’est beau la vie,'' and ''Cherchez la femme'', which had been adapted from successful shows on Silvio Berlusconi's Italian network, [[Canale 5]], and had also been influenced by French magazines like ''Mode''. The programs were repeated every four to five hours and had up to three [[commercial break]]s per show. The first hosts had formerly been presenters on TF1 (Christian Morin), Antenne 2 (Alain Gillot-Pétré, Roger Zabel and Élisabeth Tordjman), or one of Berlusconi's Italian networks (Amanda Lear). A [[continuity announcer]] presented the programs.<ref>{{dailymotion|xr5qg|Speakrine la cinq}}</ref>
Starting in February 1986, American [[TV series]] aired during daytime and late night programming. Most of these series were familiar to viewers, because they were broadcast on other French networks in the 1960s and 1970s: ''[[Diff'rent Strokes]], [[Happy Days]], [[Mission: Impossible (1966 TV series)|Mission: Impossible]], [[The Twilight Zone]], [[Star Trek]], [[The Dukes of Hazzard]] and [[Wonder Woman (TV series)|Wonder Woman]]''.
===Children's programming===
La Cinq's children-oriented programming block, ''Youpi! L'école est finie'' ("Hooray! School's over!"), began broadcasting on 2 March 1987, and would last until the channel's dissolution. Broadcasting in the morning between 7 and 9 AM and in the evening between 5 and 6 PM, the block was notable for airing French-language dubs of numerous Japanese [[anime]] series, including:
{{div col|colwidth=30em}}
* ''[[Princess Sarah]]''
* [[King Arthur (TV series)|''King Arthur'']]
* ''[[Esper Mami]]''
* ''[[Nadia: The Secret of Blue Water]]''
* ''[[Hello! Sandybell]]'' (as ''Sandy Jonquille'')
* ''[[Pastel Yumi, the Magic Idol]]''
* ''[[Hikari no Densetsu]]''
* ''[[Lady!!]]'' (as ''Gwendoline'')
* ''[[Story of the Alps: My Annette]]''
* ''[[Creamy Mami, the Magic Angel]]''
* ''[[Captain Tsubasa]]'' (as ''Olive et Tom'')
* ''[[Persia, the Magic Fairy]]''
* ''[[Attacker You!]]'' (as ''Jeanne et Serge'')
* ''[[Blue Blink]]''
* ''[[Ganbare, Kickers!]]'' (as ''But por Rudy'')
* ''[[Ai Shite Knight]]'' (as ''Embrasse-moi Lucile'')
* ''[[Katri, Girl of the Meadows]]''
* ''[[Tales of Little Women]]''
* ''[[The Swiss Family Robinson: Flone of the Mysterious Island]]''
* ''[[Ohayō! Spank]]''
* ''[[Kimagure Orange Road]]''
* ''[[Hiatari Ryōkō!]]''
* ''[[Touch (manga)|Touch]]''
* ''[[Tsurikichi Sanpei]]''
* ''[[La Seine no Hoshi]]''
* ''[[Queen Millennia]]''
* ''[[Wing-Man]]''
* ''[[Nobody's Boy: Remi]]''
* ''[[Grendizer]]''
* ''[[Candy Candy]]''
* ''[[Georgie!]]''
* ''[[Magical Princess Minky Momo]]''{{div col end}}
In addition to the Japanese-based animated programs listed above, the channel also aired some animated programs from other sources, including ''[[Robotech (TV series)|Robotech]]'', ''[[Clémentine]]'', ''[[Snorks]]'', ''[[Manu (TV series)|Manu]]'', ''[[Bucky O'Hare and the Toad Wars]]'', and ''[[The Smurfs (1981 TV series)|The Smurfs]]''. Many of the ''Youpi!'' series were also aired in Italy as they had been licensed by [[Fininvest]]. The block [[Manga outside Japan#France|helped popularise]] Japanese animation in France — it was sufficiently prominent in 1989 to be a target of criticism by then-representative [[Ségolène Royal]].<ref>{{Cite book|title=Le ras-le-bol des bébés zappeurs|last=Royal|first=Ségolène|date=1989|publisher=Laffont|isbn=2221058267|oclc=801931469}}</ref> Many of the anime series that aired on La Cinq (notably Captain Tsubasa and Ai Shite Knight) would later air on TF1 as a part of the [[Dorothée|Club Dorothée]] block.
===Decline (late 1987–1990)===
Beginning in 1987, La Cinq ran into serious financial problems that would later be escalated by the privatisation of [[TF1]] in the late 1980s and the [[early 1990s recession]]. [[Robert Hersant]] took over the channel in February 1987 and would remain the channel's president until September 1990, when Fininvest sold the channel to [[Hachette (publisher)|Hachette]]. In 1989, the channel's audience share peaked at 13.0%.
===Hachette's La Cinq (1990-1991)===
Under the weight of the debts accumulated since 1987 caused by the failure of a large part of the programs created, Robert Hersant criticized Berlusconi for selling American series as being too expensive. The latter disapproved of the great importance that Hersant gives to information, deeming it costly and unprofitable. Hersant, after a legal battle, realized that the debt burden of La Cinq were threatening to crush his media group; he then ceded his share in La Cinq to the Hachette group then directed by Jean-Luc Lagardère, an unsuccessful candidate for the acquisition of TF1 in 1987 and who dreamt of acquiring a national television channel. Thanks to a capital increase, Hachette increased its stake in la Cinq from 22 to 25% while Hersant reduced it from 25 to 10%. On October 23, 1990, the Superior Audiovisual Council granted the channel to Hachette, which promised to “save La Cinq”.
When Yves Sabouret and Hachette took over control of La Cinq in the fall of 1990, the channel's audience share had declined to 11.7%. On 2 April 1991, the channel's second and final logo was introduced. Instead of trying to reduce the channel's budget deficit, Hachette commissioned an abundance of newer television series, including American import ''[[Twin Peaks]]'' and the game show ''[[Everybody's Equal|Que le meilleur gagne]]''. The continued commission and production of newer programmes by La Cinq increased the channel's budget deficit significantly; by mid-1991, the channel's deficit amounted to 3.5 billion francs. As a result, Berlusconi sold the rights of several of the children's programmes to [[AB Groupe|AB Productions]]; those programmes were subsequently moved to TF1 before the end of the year.
1991 began with the [[Gulf War]], allowing its newscasts to reach more than 9% of market share.
Hachette began changing everything, starting with the identity of the channel. Jean-Luc Lagardère gave carte blanche to his program director, Pascal Josèphe, whom he had just hired from Antenne 2, to launch new programs concocted by Hachette and which it was hoped would make La Cinq a large family generalist channel capable of competing against TF1. In fact, the channel was also obliged to produce new programs because the stock of American series was becoming scarce. From April 1991, Pascal Josèphe put on the air the prime time access schedule which he intended for Antenne 2 and which he revised.
Instead of trying to reduce costs and make up for the existing deficit, Hachette was increasing expenses (new identity, repair of all the premises, creation of too many new programs), and La Cinq had completely changed. Pascal Josèphe wished to focus on the female audience and on the family. Guillaume Durand was replaced at 8pm in order to unblock the audience. The slots devoted to news were diminished; Patrice Duhamel also gave instructions to journalists to reduce international subjects and reports in favor of national subjects.
22 new programs were therefore put on the air in April 1991, but they all stopped after a few weeks or months, without succeeding in significantly increasing its market share with the exception of motorsports, with 40% of market share, for Formula 1 snatched from TF1, the Paris-Dakar, the Grand Prix de Pau, the Walt Disney movie slots on Tuesday evenings, [[Twin Peaks]] and the news, which were successful. La Cinq progressed only in urban areas.
Not only did its new programs fail to attract new viewers, but these upheavals confused some of the faithful audience, to the point that the channel announces a rerun of ''[[Kojak]]'' to save the prime time access slot.
The audience remained stable, and the channel remained the third national channel in terms of rating; however, considering the new transmitters that relayed La Cinq's signal, the audience was reduced at this time. It was, in this case, around 11 to 14%. In addition, Lagardère did not succeed in relaxing the constraints imposed by the government, by regulation, so that it remained subject to the goodwill of the political power.
====Bankruptcy and liquidation====
One year after its takeover by Hachette, the chain's annual deficit amounted to CHF 1.1 billion, with cumulative losses since the chain's creation amounting to CHF 3.5 billion. On December 17, 1991, its CEO, Yves Sabouret, in a cost-cutting move, had to forcibly lay off 576 employees, amounting to more than 75% of the channel's staff. This did not have any effect on the channel, as it would file for bankruptcy only fourteen days later. On the evening of the announcement, Béatrice Schönberg and Gilles Schneider announced the sad event in their 8pm newscast, where its previous intro (the Earth, the satellite, Thus Spoke Zarathustra as the opening theme and the old logo) was broadcast at its end. A few days later, interviewed by Jean-Claude Bourret during the 8pm news, the CEO would hear from the presenter that the action taken "looks like a Formula 1 racing team that sells the tires to buy the gasoline”. On the screen, the "5" logo was displayed in black for 24 hours while a banner indicating that "La 5 will not be Matra-Racing" was brandished in the offices of the editorial staff. The channel's flags, which featured the new logo on the building on Boulevard Pereire, were torn off by staff. On December 31, 1991, La Cinq filed for bankruptcy. It was declared bankrupt on January 2, 1992 and placed in receivership on January 3.
On 3 January 1992, the channel was placed into [[receivership|legal redress]] due to its inability to repay its entire debt. A viewers' defence association for La Cinq started on the same day, led by Jean-Claude Bourret. Later that month, on 16 January, Berlusconi proposed a plan involving an increase in capital that would have saved the channel, but was withdrawn on 24 March because of pressure from the government, the influence of certain politicians, and the hostility of other private channels (TF1, Canal+ and M6) set up in coalition, which proposed to jointly create a news channel which would take the place of La Cinq. The objective is twofold: to drive Silvio Berlusconi away from France and to ensure that no commercial channel is reborn on the fifth network. This project is not accepted, but the coalition wins all the same.
As a result of the withdrawal of the rescue plan, on 3 April 1992, the [[tribunal de commerce|Paris Commercial Court]] announced that, effective 12 April 1992 at midnight [[Central European Summer Time|CET]], La Cinq would be [[liquidation|liquidated]]. The channel closed down permanently on 12 April 1992 at midnight (the same date that [[Disneyland Paris|Euro Disney Resort]] opened<ref>{{YouTube|RSX9UjEtMT0|19/20 FR3 du 12 avril 1992 - Fin de La 5 et ouverture d'Eurodisney {{!}} Archive INA}}</ref>), following its final program, ''Vive La Cinq'' (also known as ''Il est Moins 5''), which pulled in an audience share of 21.5% (equal to about 6 to 7 million viewers).
The channel's final images before closing down entirely were a planet with the number 5 orbiting around it being blocked by a larger planet, creating a total eclipse, as the opening to ''Also Sprach Zarathustra'' (former news theme) was played. This was followed by a group of text slides that read this message:
{{Quote|"La Cinq vous prie de l'excuser pour cette interruption définitive de l'image et du son ... C'est fini"<br> ''La Cinq would like to apologise for this permanent loss of picture and sound... It's over''|''La Cinq'' channel closedown message on 12 April 1992<ref>{{YouTube|Zs6TKTnbEEM|Culte : les derniers instants de La Cinq {{!}} Archive INA}}</ref>}}
It would be almost two years before the network's infrastructure was reactivated as a public educational channel, ''La Cinquième'' (now [[France 5]]).
==Branding==
La Cinq was one of the first French television channels to utilize a [[digital on-screen graphic]] when it launched in 1986. Its initial logo was derived from the first logo of [[Canale 5]], which was introduced in 1985. However, the flower and the stylized symbol of the [[biscione]] were replaced with a gold star and the channel's name, respectively. In 1987, the channel's name was removed from the logo, which would continue to be used (albeit with a minor modification in October 1990) until April 1991.
The channel's second and final logo, which was designed by [[Jean-Paul Goude]], consisted of the number 5 being superimposed on other numbers. It would be used from April 1991 until the channel's liquidation on 12 April 1992. The DOG accompanying the logo only displayed the number 5. It was inspired by the work of [[Jasper Johns]] (founding father of pop art), who produced canvases featuring numbers in the 1960s.
==News operation==
La Cinq's news operation consisted of a series of daily newscasts entitled ''Le Journal''. The program was originally presented with a lunchtime newscast at 12:30 p.m. (later 1:00 pm) and a primetime newscast at 8:00 p.m. In the summer of 1990, the lunchtime newscast was moved to 12:45 p.m., where it would remain until the channel's closure in April 1992. Short-form news updates were also broadcast at various times of the day during breaks in the channel's programming.
From 1987 to April 1991, the theme music for the newscasts was a modified version of "[[Also sprach Zarathustra (Strauss)|Also sprach Zarathustra]]" (which would later be used on the channel's final newscast on 12 April 1992). During that time, the openings to all of the newscasts featured a rotating globe and a satellite, before showing the channel's logo and the newscast's title. When La Cinq's logo was changed in April 1991, the newscasts' openings were changed to a variant of the channel's ident with the word ''Information'' superimposed onto the channel's logo; this would be used until shortly before the channel's closure one year later. It was accompanied by a hard-hitting news music package.
===Notable former on-air staff===
*[[:fr:Jean-Claude Bourret|Jean-Claude Bourret]] (main anchor; 1987–1992)
*[[Marie-Laure Augry]] (1991–1992; later worked at [[TF1]] and [[France 3]])
*[[Guillaume Durand]] (1987–1991; later worked at [[Europe 1]])
*[[Béatrice Schönberg]] (1991–1992; later worked at [[France 2]])
==See also==
*[[France 5]]
==References==
{{Reflist}}
==External links==
* [https://www.youtube.com/watch?v=Zs6TKTnbEEM Culte : les derniers instants de La Cinq | Archive INA]
{{French television stations}}
{{Mediaset}}
{{Authority control}}
{{DEFAULTSORT:Cinq}}
[[Category:Defunct French television channels]]
[[Category:French-language television stations]]
[[Category:Mediaset television channels]]
[[Category:Television channels and stations established in 1986]]
[[Category:Television channels and stations disestablished in 1992]]
[[Category:1986 establishments in France]]
[[Category:1992 disestablishments in France]]
nr0uti54fct4rc9aghntn4ya87jcykx
Comp
0
153430
750463
737124
2026-07-08T03:50:37Z
Ponor
47975
[[:w:en:User:Ponor/wAwB| #wAwB]]
750463
wikitext
text/x-wiki
Any line breaks before "%"?
10 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 000 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 000 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 000 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 000 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 4 % 300 % 200 % 10 000 % 20 % 30 %, 4000 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 % 200 % 10 % 20 % 30 %, 400 % 300 000 % 200 %
10 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 000 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C 10 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 000 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C 10 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 000 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C 10 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 4 °C 300 °C 200 °C 10 000 °C 20 °C 30 °C, 4000 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 °C 200 °C 10 °C 20 °C 30 °C, 400 °C 300 000 °C 200 °C
10% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10 000% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10 000% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10 000% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10 000% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 4% 300% 200% 10 000% 20% 30%, 4000% 300% 200% 10% 20% 30%, 400% 300% 200% 10% 20% 30%, 400% 300 000% 200%
[[file:No flag 2.svg]]
[[file:No flag 2.svg|link=]]
[[file:No flag 2.svg|link=[[computer]] ]]
----
{{Infobox comp|name={{PAGENAME}}|codename=X.23|silly=Me}}
{{-}}
----
{{Infobox comp|name={{PAGENAME}}|codename=X.23|silly=Me|picture=}}
{{-}}
----
{{Infobox comp|name={{PAGENAME}}|codename=X.23|silly=Me|picture=Example image not to be used in article namespace.jpg}}
{{-}}
----
{{#invoke:If not given or empty|check_parameter|picture|||when=NG NE|notgiven=[[File:Red pog.svg|100px|center]]|empty=|notempty=[[File:{{{picture}}}|200px]]}}
{{-}}
----
* 1 {{#invoke:If not given or empty|check_parameter}}
* 2 {{#invoke:If not given or empty|check_parameter|picture}}
* 3 {{#invoke:If not given or empty|check_parameter|picture }}
-
k07gdyeug9fu23yyxcdfx9anqiohyvl
MediaWiki:GrowthExperimentsSuggestedEdits.json
8
156151
750400
741046
2026-07-07T12:57:18Z
DMburugu (WMF)
61358
Test Revise Tone settings
750400
json
application/json
{
"GEInfoboxTemplates": [
"m",
"custom"
],
"copyedit": {
"disabled": false,
"templates": [
"Who",
"Which",
"Whose",
"To whom?",
"From whom?",
"Like whom?",
"Compared to?",
"NPOV",
"Copy edit",
"Proofreader needed",
"Pronunciation needed",
"Romanization needed",
"Advert"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Basic copyediting"
},
"expand": {
"disabled": false,
"templates": [
"Stub",
"Missing information",
"Expand section"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Manual of Style/Layout"
},
"image_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "",
"maxTasksPerDay": 25,
"templates": [],
"group": "medium",
"type": "image-recommendation"
},
"link_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Hello World",
"maximumLinksToShowPerTask": 3,
"excludedSections": [
"foo"
],
"maxTasksPerDay": 6,
"underlinkedWeight": 0.5,
"minimumLinkScore": 0.6,
"maximumEditsTaskIsAvailable": "150",
"templates": [],
"group": "easy",
"type": "link-recommendation"
},
"links": {
"disabled": false,
"templates": [
"Sections",
"Cleanup bare URLs"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Manual of Style/Linking"
},
"references": {
"disabled": false,
"templates": [
"Citation needed",
"Unreferenced"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Citing sources"
},
"revise_tone": {
"disabled": true,
"excludedTemplates": [
"Vedi anche"
],
"excludedCategories": [
"Winter Olympics 2026"
]
},
"section_image_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "",
"maxTasksPerDay": 1,
"templates": [],
"group": "medium",
"type": "section-image-recommendation"
},
"update": {
"disabled": false,
"templates": [
"Update",
"Update inline"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:As of"
},
"$version": "2.0.0"
}
b7hwhkj5o5364764n20k3whjfiypgg4
750401
750400
2026-07-07T13:06:57Z
DMburugu (WMF)
61358
Enable Revise Tone
750401
json
application/json
{
"GEInfoboxTemplates": [
"m",
"custom"
],
"copyedit": {
"disabled": false,
"templates": [
"Who",
"Which",
"Whose",
"To whom?",
"From whom?",
"Like whom?",
"Compared to?",
"NPOV",
"Copy edit",
"Proofreader needed",
"Pronunciation needed",
"Romanization needed",
"Advert"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Basic copyediting"
},
"expand": {
"disabled": false,
"templates": [
"Stub",
"Missing information",
"Expand section"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Manual of Style/Layout"
},
"image_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "",
"maxTasksPerDay": 25,
"templates": [],
"group": "medium",
"type": "image-recommendation"
},
"link_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Hello World",
"maximumLinksToShowPerTask": 3,
"excludedSections": [
"foo"
],
"maxTasksPerDay": 6,
"underlinkedWeight": 0.5,
"minimumLinkScore": 0.6,
"maximumEditsTaskIsAvailable": "150",
"templates": [],
"group": "easy",
"type": "link-recommendation"
},
"links": {
"disabled": false,
"templates": [
"Sections",
"Cleanup bare URLs"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Manual of Style/Linking"
},
"references": {
"disabled": false,
"templates": [
"Citation needed",
"Unreferenced"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:Citing sources"
},
"revise_tone": {
"disabled": false,
"excludedTemplates": [
"Vedi anche"
],
"excludedCategories": [
"Winter Olympics 2026"
]
},
"section_image_recommendation": {
"disabled": false,
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "",
"maxTasksPerDay": 1,
"templates": [],
"group": "medium",
"type": "section-image-recommendation"
},
"update": {
"disabled": false,
"templates": [
"Update",
"Update inline"
],
"excludedTemplates": [],
"excludedCategories": [],
"learnmore": "Wikipedia:As of"
},
"$version": "2.0.0"
}
kas8rg4ekcqnw6i37iz4xijmx93y05v
Sa
0
156788
750393
745250
2026-07-07T11:59:28Z
~2026-38640-99
74763
showcaptcha
750393
wikitext
text/x-wiki
Choose pick item for ARRIS-5793 input
ARRIS-5793
ARRIS-5377
ARRIS-3979
<span lang="nl" dir="ltr">''ARRIS-5555''</span>
ARRIS-3973
ARRIS-5355
ARRIS-7533
Show edit publish
trigger af
4w8xy52nvoyct01kf5h1j7a81fspwbk
750394
750393
2026-07-07T11:59:41Z
~2026-38640-99
74763
750394
wikitext
text/x-wiki
Choose pick item for ARRIS-5793 input
ARRIS-5793
ARRIS-5377
ARRIS-3979
<span lang="nl" dir="ltr">''ARRIS-5555''</span>
ARRIS-3973
ARRIS-5355
ARRIS-7533
Show edit publish
trigger af
normal edit
4p9ddltyzxpficjzqe1g5ylqswvv5i4
User:Barkeep49/rfxCloser.js
2
165069
750434
704164
2026-07-07T19:20:30Z
Barkeep49
12837
update to new test version
750434
javascript
text/javascript
/**
* RfX Closer User Script for Wikipedia
* Helps bureaucrats close RfAs and RfBs by providing a guided workflow and API interactions.
* Version 1.3.0 - Including admin elections
* Version 1.4.0-dev - Edit-conflict protection,code cleanup, performance improvements
*
*/
(function() {
'use strict';
// --- Configuration ---
const config = {
pageName: mw.config.get('wgPageName'),
userName: mw.config.get('wgUserName') || 'YourUsername',
tagLine: ' (using [[User:Barkeep49/rfxCloser.js|rfxCloser]])',
selectors: {
container: '#rfx-closer-container',
header: '.rfx-closer-header',
title: '.rfx-closer-title',
collapseButton: '.rfx-closer-collapse',
closeButton: '.rfx-closer-close',
contentAndInputContainer: '.rfx-closer-main-content',
inputSection: '.rfx-closer-input-section',
inputFields: '.rfx-closer-input-fields',
supportInput: '#support-count',
opposeInput: '#oppose-count',
neutralInput: '#neutral-count',
closerInput: '#closer-name',
percentageDisplay: '.rfx-closer-percentage',
contentContainer: '.rfx-closer-content-container',
stepsContainer: '#rfx-closer-steps',
outcomeSelector: '#rfx-outcome-selector',
launchButton: '#rfx-closer-launch',
launchListItem: '#rfx-closer-launch-li',
toolsMenu: '#p-tb ul',
cratListTextarea: '#rfx-crat-list-textarea',
cratNotifyMessage: '#rfx-crat-notify-message',
cratNotifyButton: '#rfx-crat-notify-button',
cratNotifyStatus: '#rfx-crat-notify-status',
candidateOnholdNotifyMessage: '#rfx-candidate-onhold-notify-message',
candidateOnholdNotifyButton: '#rfx-candidate-onhold-notify-button',
candidateOnholdNotifyStatus: '#rfx-candidate-onhold-notify-status',
stepElement: '.rfx-closer-step',
stepCheckbox: 'input[type="checkbox"]'
},
groupDisplayNames: {
'ipblock-exempt': 'IP block exempt', 'rollbacker': 'Rollbacker',
'eventcoordinator': 'Event coordinator', 'filemover': 'File mover',
'templateeditor': 'Template editor', 'massmessage-sender': 'Mass message sender',
'extendedconfirmed': 'Extended confirmed user', 'extendedmover': 'Page mover',
'patroller': 'New page reviewer', 'abusefilter-helper': 'Edit filter helper',
'abusefilter': 'Edit filter manager', 'reviewer': 'Pending changes reviewer',
'accountcreator': 'Account creator', 'autoreviewer': 'Autopatrolled'
},
apiDefaults: {
format: 'json',
formatversion: 2
}
};
// Detect Admin Elections pages
const adminElectionPattern = /^Wikipedia:Administrator_elections\/([^\/]+)(?:\/Results|#Results)?$/;
const adminElectionMatch = config.pageName.match(adminElectionPattern);
config.isAdminElection = !!adminElectionMatch;
if (config.isAdminElection) {
config.electionName = adminElectionMatch[1]; // e.g., "July_2025"
config.rfxType = 'adminship';
config.baseRfxPage = 'Wikipedia:Requests_for_adminship';
config.displayBaseRfxPage = config.baseRfxPage.replace(/_/g, ' ');
config.candidateSubpage = null; // Not applicable for Admin Elections
config.recentRfxPage = 'Wikipedia:Requests_for_adminship/Recent';
} else {
// Determine RfX type and base page name (traditional RfX)
config.rfxType = config.pageName.includes('Requests_for_adminship') ? 'adminship' : 'bureaucratship';
config.baseRfxPage = `Wikipedia:Requests_for_${config.rfxType}`;
config.displayBaseRfxPage = config.baseRfxPage.replace(/_/g, ' ');
config.candidateSubpage = config.pageName.split('/').pop(); // Get the candidate part
config.recentRfxPage = 'Wikipedia:Requests_for_adminship/Recent'; // Same page for both adminship and bureaucratship
}
// --- Constants ---
const MONTHS = ['January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December'];
// Misspellings found in historical archive pages (see CLAUDE.md "Date Parsing")
const MONTH_TYPO_MAP = {
'Novemeber': 'November',
'Febuary': 'February',
'Auguts': 'August'
};
/** Returns the 0-based month index for a month name, tolerating known archive typos
* and case differences. Returns -1 if unrecognized. */
function parseMonth(monthName) {
if (!monthName) return -1;
const trimmed = String(monthName).trim();
const normalized = MONTH_TYPO_MAP[trimmed] ||
trimmed.charAt(0).toUpperCase() + trimmed.slice(1).toLowerCase();
return MONTHS.indexOf(MONTH_TYPO_MAP[normalized] || normalized);
}
// Common regex patterns (pre-compiled)
const REGEX_PATTERNS = {
dateParse: /(\d{1,2})\s+(\w+)\s+(\d{4})/,
endTimeParse: /(\d{1,2}) (\w+) (\d{4})/,
recentRfxEntry: /\{\{Recent RfX\|\|([^|]+)\|\|([^|]+)\|(\d+)\|(\d+)\|(\d+)\|([^}]+)\}\}/g,
monthHeaderAnchord: /\{\{Anchord\|(\w+)\s+(\d{4})\}\}/,
// Pattern for successful table: "– X successful and [[link|Y unsuccessful]] candidacies"
monthHeaderCountSuccessful: /–\s*(\d+)\s+successful\s+and\s+\[\[[^\]]+\|(\d+)\s+unsuccessful\]\]\s+candidacies/,
// Pattern for unsuccessful table: "– [[link|X successful]] and Y unsuccessful candidacies"
monthHeaderCountUnsuccessful: /–\s*\[\[[^\]]+\|(\d+)\s+successful\]\]\s+and\s+(\d+)\s+unsuccessful\s+candidacies/,
unsuccessfulLink: /\[\[([^\]]+)\|(\d+)\s+unsuccessful\]\]/,
successfulLink: /\[\[([^\]]+)\|(\d+)\s+successful\]\]/,
// Matches a candidacy list line: optional */: markers, then a wikilink; captures markers and link target/label
listEntryLine: /^\s*([*:]*)\s*\[\[(?:[^|]+\|)?([^\]]+)\]\]/i
};
/** Builds the regex matching a month header row ({{Anchord|Month YYYY}}) in candidacy list tables. */
function buildMonthHeaderRegex(month, year) {
const escapedMonth = month.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
return new RegExp(`\\|-\\s*\\n\\|\\s*colspan="[\\d]+"\\s*style="background:#ffdead;"\\s*\\|\\s*'''\\{\\{Anchord\\|${escapedMonth}\\s+${year}\\}\\}'''.*?$`, 'mi');
}
/** Builds an alphabetical-list entry line for an unsuccessful/not-elected candidate. */
function buildUnsuccessfulListEntry(candidate, formattedDate, closerName) {
const isSubsequent = /[_ ]\d+$/.test(candidate.username);
// Admin Elections use "Not elected" instead of "Unsuccessful"
const outcomeText = config.isAdminElection ? 'Not elected' : 'Unsuccessful';
return `${isSubsequent ? '*:' : '*'} [[Wikipedia:Requests_for_adminship/${candidate.username}|${candidate.username}]] ${formattedDate} - ${outcomeText} ([[User:${closerName}|${closerName}]]) (${candidate.support}/${candidate.oppose}/${candidate.neutral})`;
}
/** Page name of the alphabetical unsuccessful-candidacies list for a first letter (or 'Other'). */
function getUnsuccessfulAlphaPageName(letter) {
return (letter >= 'A' && letter <= 'Z')
? `Wikipedia:Unsuccessful adminship candidacies/${letter}`
: `Wikipedia:Unsuccessful adminship candidacies (Alphabetical)`;
}
/** Updates a yearly candidacy list page (Admin Elections): bumps overall and month-header
* counts, uncomments month headers, and inserts table row entries under the month header.
* Returns { wikitext, noteText, modificationPerformed, headerFound }. */
function updateYearlyCandidacyList(wikitext, { isSuccessfulList, entries, count, month, year }) {
let modifiedWikitext = wikitext;
let modificationPerformed = false;
let noteText = '';
const label = isSuccessfulList ? 'successful' : 'unsuccessful';
// Update overall count
const countRegex = new RegExp(`(\\'\\'\\'?)(\\d+)\\s+${label} candidacies so far(\\'\\'\\'?)`, 'i');
const originalForCount = modifiedWikitext;
modifiedWikitext = updateCountInWikitext(modifiedWikitext, countRegex, count);
if (modifiedWikitext !== originalForCount) {
modificationPerformed = true;
noteText += `Overall count updated (+${count}). `;
}
// Uncomment month headers
modifiedWikitext = fixCommentStructure(modifiedWikitext, month, year);
modificationPerformed = true;
// Find month header and insert entries
const headerMatch = modifiedWikitext.match(buildMonthHeaderRegex(month, year));
if (headerMatch) {
const headerStartIndex = headerMatch.index;
const fullMatchText = headerMatch[0];
// Update month header count. The successful table reads
// "X successful and [[...|Y unsuccessful]]"; the unsuccessful table reads
// "[[...|X successful]] and Y unsuccessful" - the incremented side is the plain number.
const headerCountPattern = isSuccessfulList ? REGEX_PATTERNS.monthHeaderCountSuccessful : REGEX_PATTERNS.monthHeaderCountUnsuccessful;
const headerCountMatch = fullMatchText.match(headerCountPattern);
if (headerCountMatch) {
const currentSuccessful = parseInt(headerCountMatch[1], 10);
const currentUnsuccessful = parseInt(headerCountMatch[2], 10);
let updatedHeader;
if (isSuccessfulList) {
const newSuccessful = currentSuccessful + count;
const unsuccessfulLinkMatch = fullMatchText.match(REGEX_PATTERNS.unsuccessfulLink);
const linkPath = unsuccessfulLinkMatch ? unsuccessfulLinkMatch[1] : `Wikipedia:Unsuccessful adminship candidacies (Chronological)/${year}#${month} ${year}`;
updatedHeader = fullMatchText.replace(
headerCountPattern,
`– ${newSuccessful} successful and [[${linkPath}|${currentUnsuccessful} unsuccessful]] candidacies`
);
} else {
const newUnsuccessful = currentUnsuccessful + count;
const successfulLinkMatch = fullMatchText.match(REGEX_PATTERNS.successfulLink);
const linkPath = successfulLinkMatch ? successfulLinkMatch[1] : `Wikipedia:Successful adminship candidacies/${year}#${month} ${year}`;
updatedHeader = fullMatchText.replace(
headerCountPattern,
`– [[${linkPath}|${currentSuccessful} successful]] and ${newUnsuccessful} unsuccessful candidacies`
);
}
modifiedWikitext = modifiedWikitext.substring(0, headerStartIndex) +
updatedHeader +
modifiedWikitext.substring(headerStartIndex + fullMatchText.length);
noteText += `Month header count updated. `;
modificationPerformed = true;
}
// Find insertion point after header
const nextRowIndex = modifiedWikitext.indexOf('|-', headerStartIndex + headerMatch[0].length);
let insertionIndex = nextRowIndex !== -1 ? nextRowIndex : headerStartIndex + headerMatch[0].length;
// Insert all entries
const insertionContent = entries.map(e => '|-\n' + e).join('\n') + '\n';
if (insertionIndex > 0 && modifiedWikitext[insertionIndex - 1] !== '\n') {
modifiedWikitext = modifiedWikitext.substring(0, insertionIndex) + '\n' + modifiedWikitext.substring(insertionIndex);
insertionIndex++;
}
modifiedWikitext = modifiedWikitext.substring(0, insertionIndex) + insertionContent + modifiedWikitext.substring(insertionIndex);
noteText += `${count} entry/entries added.`;
modificationPerformed = true;
} else {
noteText += `Could not find month header - entries not inserted automatically.`;
}
return { wikitext: modifiedWikitext, noteText, modificationPerformed, headerFound: !!headerMatch };
}
/** Inserts entries for the given candidates alphabetically into an alphabetical list page's
* wikitext, skipping candidates already present and keeping entries above trailing
* category/template content. Returns the modified wikitext. */
function insertAlphabeticalEntries(alphaWikitext, letterCandidates, formattedDate, closerName) {
const lineRegex = REGEX_PATTERNS.listEntryLine;
const modifiedLines = alphaWikitext.split('\n');
const insertions = [];
// Find where the actual list ends (before Category or other non-list content)
let listEndIndex = modifiedLines.length;
for (let i = 0; i < modifiedLines.length; i++) {
const line = modifiedLines[i].trim();
if (line.startsWith('[[Category:') || (line.startsWith('{{') && !line.includes('Requests for adminship'))) {
listEndIndex = i;
break;
}
}
letterCandidates.forEach(c => {
const entry = buildUnsuccessfulListEntry(c, formattedDate, closerName);
// Skip if candidate already exists in the list (case-insensitive)
let candidateExists = false;
for (let i = 0; i < listEndIndex; i++) {
const match = modifiedLines[i].match(lineRegex);
if (match && match[2].trim().toLowerCase() === c.username.toLowerCase()) {
candidateExists = true;
break;
}
}
if (candidateExists) return;
// Find the alphabetical insertion point within the list section
let insertionIndex = -1;
for (let i = 0; i < listEndIndex; i++) {
const match = modifiedLines[i].match(lineRegex);
if (match && c.username.localeCompare(match[2].trim(), undefined, { sensitivity: 'base' }) < 0) {
insertionIndex = i;
break;
}
}
if (insertionIndex === -1) {
// Append at end of list (before Category line)
let lastRelevantIndex = -1;
for (let i = listEndIndex - 1; i >= 0; i--) {
if (modifiedLines[i].match(lineRegex)) {
lastRelevantIndex = i;
break;
}
}
insertionIndex = lastRelevantIndex + 1;
}
insertions.push({ index: insertionIndex, entry: entry });
});
// Insert from end to start so earlier indices stay valid
insertions.sort((a, b) => b.index - a.index);
insertions.forEach(({ index, entry }) => {
modifiedLines.splice(index, 0, entry);
});
return modifiedLines.join('\n');
}
// --- State Variables ---
let rfaData = null;
let basePageWikitextCache = {};
let pageEditMetaCache = {}; // normalized page name -> { basetimestamp, starttimestamp } for edit-conflict detection
let pendingWikitextFetches = {}; // normalized page name -> in-flight fetch promise (dedupes concurrent fetches)
let actualCandidateUsername = config.candidateSubpage; // Default, updated on fetch
let fetchErrorOccurred = false;
let wikitextErrorOccurred = false;
let isCollapsed = false;
let isDragging = false;
let dragStartX, dragStartY, containerStartX, containerStartY;
// Admin Elections state variables
let adminElectionCandidates = [];
let adminElectionDate = null;
let editedOutcomes = new Map(); // Map of username -> outcome
// Edit mode state (manual or automatic)
let editMode = 'manual'; // Default to manual for safety
// DOM element cache
const domCache = {};
// --- Initial Check ---
if (config.isAdminElection) {
// Admin Elections pages are valid
} else if (!new RegExp(`^${config.baseRfxPage.replace(/ /g, '_')}/[^/]+$`).test(config.pageName)) {
return;
}
// --- Utility Functions ---
/** Escapes characters for use in regex, handling spaces/underscores.
* Note: usernames interpolated directly into *wikitext output* (links, list entries)
* do not need escaping — MediaWiki forbids # < > [ ] | { } in usernames. */
function escapeRegex(string) {
const spacedString = string.replace(/_/g, ' ');
const underscoredString = string.replace(/ /g, '_');
if (spacedString === underscoredString) {
return spacedString.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
const escapedSpaced = spacedString.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const escapedUnderscored = underscoredString.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
return `(?:${escapedUnderscored}|${escapedSpaced})`;
}
/** Adds a delay. */
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
/** Formats an API error (thrown by makeApiRequest) or plain Error into a display string. */
function formatApiError(error) {
return `${error.info || error.message || 'Unknown error'} (${error.code || 'unknown'})`;
}
/** Lazily-created shared mw.Api instance (mediawiki.api module must be loaded first). */
let sharedApiInstance = null;
function getApi() {
if (!sharedApiInstance) sharedApiInstance = new mw.Api();
return sharedApiInstance;
}
/** Generic API request helper. */
async function makeApiRequest(params, method = 'get', tokenType = null) {
const api = getApi();
const fullParams = { ...config.apiDefaults, ...params };
try {
let response;
if (method === 'get') {
response = await api.get(fullParams);
} else if (method === 'post' && tokenType) {
response = await api.postWithToken(tokenType, fullParams);
} else if (method === 'post') {
response = await api.post(fullParams);
} else {
throw new Error(`Unsupported API method: ${method}`);
}
return response;
} catch (error) {
const errorCode = error?.error?.code || error?.textStatus || 'unknown';
const errorInfo = error?.error?.info || error?.xhr?.responseText || 'Unknown API error';
console.error(`RfX Closer API [${method.toUpperCase()} ${params.action}] Error:`, { params, errorCode, errorInfo, errorObj: error });
throw { code: errorCode, info: errorInfo, params: params };
}
}
/** Creates a DOM element with attributes and content. */
function createElement(tag, options = {}, children = []) {
const el = document.createElement(tag);
Object.entries(options).forEach(([key, value]) => {
if (key === 'style' && typeof value === 'object') {
Object.assign(el.style, value);
} else if (key === 'dataset' && typeof value === 'object') {
Object.assign(el.dataset, value);
} else if (key === 'className') {
el.className = value;
} else if (key === 'textContent') {
el.textContent = value;
} else if (key === 'innerHTML') {
el.innerHTML = value;
} else {
el.setAttribute(key, value);
}
});
children.forEach(child => {
if (child instanceof Node) {
el.appendChild(child);
} else if (typeof child === 'string') {
el.appendChild(document.createTextNode(child));
}
});
return el;
}
/** Creates a standard API action button. */
function createActionButton(id, text, onClick) {
const button = createElement('button', { id, textContent: text, className: 'rfx-closer-action-button' });
if (onClick) {
button.addEventListener('click', onClick);
}
return button;
}
/** Creates a standard status display area. */
function createStatusArea(id, className = 'rfx-closer-api-status') {
return createElement('div', { id, className });
}
/** Creates a container with "Copy Code" and "Edit Page" links, or "Edit via API" button in automatic mode. */
function createActionLinks(targetPage, wikitextOrGetter, linkTextPrefix = '', isCreateLink = false) {
const linksContainer = createElement('div', { className: 'rfx-action-links-container' });
// Shared builders for the manual copy/edit links (also used as automatic-mode fallback)
const copyLinkDefaultText = `Copy Code${linkTextPrefix ? ' for ' + linkTextPrefix : ''}`;
const makeCopyLink = () => {
const copyLink = createElement('a', {
href: '#',
textContent: copyLinkDefaultText,
className: 'rfx-action-link',
title: 'Copy generated wikitext to clipboard'
});
copyLink.addEventListener('click', (e) => {
e.preventDefault();
const textToCopy = (typeof wikitextOrGetter === 'function') ? wikitextOrGetter() : wikitextOrGetter;
if (textToCopy === null || textToCopy === undefined) {
console.warn("RfX Closer: Attempted to copy null/undefined text via link.");
copyLink.textContent = 'Error (No Text)'; copyLink.classList.add('error');
setTimeout(() => { copyLink.textContent = copyLinkDefaultText; copyLink.classList.remove('error'); }, 3000);
return;
}
navigator.clipboard.writeText(textToCopy).then(() => {
copyLink.textContent = 'Copied!'; copyLink.classList.add('copied'); copyLink.style.fontWeight = 'bold';
setTimeout(() => { copyLink.textContent = copyLinkDefaultText; copyLink.classList.remove('copied'); copyLink.style.fontWeight = 'normal'; }, 1500);
}).catch(err => {
console.error('RfX Closer: Failed to copy text via link: ', err);
copyLink.textContent = 'Error Copying!'; copyLink.classList.add('error');
setTimeout(() => { copyLink.textContent = copyLinkDefaultText; copyLink.classList.remove('error'); }, 3000);
});
});
return copyLink;
};
const makeEditLink = () => createElement('a', {
href: mw.util.getUrl(targetPage, { action: 'edit' }),
target: '_blank',
textContent: `${isCreateLink ? 'Create' : 'Edit'} ${linkTextPrefix || targetPage.replace(/_/g, ' ')}`,
className: 'rfx-action-link',
title: `${isCreateLink ? 'Create' : 'Edit'} ${targetPage.replace(/_/g, ' ')} in edit mode`
});
// In automatic mode, show API edit button instead of copy/edit links
if (editMode === 'automatic' && targetPage) {
// Show page name as a link above the button (similar to other steps)
if (linkTextPrefix || targetPage) {
const pageLink = createElement('a', {
href: mw.util.getUrl(targetPage),
target: '_blank',
textContent: linkTextPrefix || targetPage.replace(/_/g, ' '),
style: { display: 'block', marginBottom: '5px', color: 'var(--link-color)' }
});
linksContainer.appendChild(pageLink);
}
// Use createActionButton for consistency with other buttons
const buttonId = `rfx-auto-edit-${targetPage.replace(/[^a-zA-Z0-9]/g, '-')}`;
const apiButton = createActionButton(buttonId, `${isCreateLink ? 'Create' : 'Update'} automatically`, async () => {
const textToEdit = (typeof wikitextOrGetter === 'function') ? wikitextOrGetter() : wikitextOrGetter;
if (textToEdit === null || textToEdit === undefined) {
statusArea.textContent = 'Error: No content to edit';
statusArea.style.color = 'red';
return;
}
apiButton.disabled = true;
apiButton.textContent = `${isCreateLink ? 'Creating' : 'Updating'}...`;
statusArea.textContent = `${isCreateLink ? 'Creating' : 'Updating'} page...`;
statusArea.style.color = 'blue';
const summary = `${isCreateLink ? 'Creating' : 'Updating'} ${linkTextPrefix || targetPage.replace(/_/g, ' ')} via RfX Closer`;
const result = await editPageViaAPI(targetPage, textToEdit, summary, isCreateLink);
if (result.success) {
apiButton.textContent = `${isCreateLink ? 'Created' : 'Updated'} successfully`;
apiButton.disabled = true;
statusArea.textContent = `Success! Page ${isCreateLink ? 'created' : 'updated'}.`;
statusArea.style.color = 'green';
} else {
apiButton.disabled = false;
apiButton.textContent = `${isCreateLink ? 'Create' : 'Update'} automatically`;
statusArea.textContent = `Error: ${result.error || 'Unknown error'}. Falling back to manual mode.`;
statusArea.style.color = 'red';
// Fall back to showing manual links on error
linksContainer.innerHTML = '';
if (linkTextPrefix || targetPage) {
const pageLink = createElement('a', {
href: mw.util.getUrl(targetPage),
target: '_blank',
textContent: linkTextPrefix || targetPage.replace(/_/g, ' '),
style: { display: 'block', marginBottom: '5px', color: 'var(--link-color)' }
});
linksContainer.appendChild(pageLink);
}
linksContainer.appendChild(makeCopyLink());
if (targetPage) {
linksContainer.appendChild(makeEditLink());
}
}
});
const statusArea = createStatusArea(buttonId + '-status', 'rfx-closer-api-status');
linksContainer.appendChild(apiButton);
linksContainer.appendChild(statusArea);
return linksContainer;
}
// Manual mode: show copy and edit links (original behavior)
linksContainer.appendChild(makeCopyLink());
if (targetPage) {
linksContainer.appendChild(makeEditLink());
}
return linksContainer;
}
/** Creates a box with content and a copy button (kept for fallback cases). */
function createCopyableBox(content, helpText = 'Click button to copy', isLarge = false, inputElement = null) {
const boxContainer = createElement('div', { className: 'rfx-copy-box-container' });
const displayElement = inputElement ? inputElement : createElement('pre', {
textContent: content,
className: 'rfx-copy-box-display',
style: isLarge ? { maxHeight: '300px' } : {}
});
if (!inputElement) { boxContainer.appendChild(displayElement); }
const copyButton = createElement('button', {
textContent: 'Copy',
title: helpText,
className: 'rfx-copy-box-button',
style: (inputElement && inputElement.tagName === 'TEXTAREA') ? { top: 'auto', bottom: '5px' } : {}
});
copyButton.addEventListener('click', () => {
const textToCopy = inputElement ? inputElement.value : content;
if (textToCopy === null || textToCopy === undefined) { console.warn("RfX Closer: Attempted to copy null/undefined."); return; }
navigator.clipboard.writeText(textToCopy).then(() => {
copyButton.textContent = 'Copied!'; copyButton.classList.add('copied'); copyButton.disabled = true;
setTimeout(() => { copyButton.textContent = 'Copy'; copyButton.classList.remove('copied'); copyButton.disabled = false; }, 1500);
}).catch(err => {
console.error('RfX Closer: Failed to copy text: ', err); copyButton.textContent = 'Error!'; copyButton.classList.add('error');
setTimeout(() => { copyButton.textContent = 'Copy'; copyButton.classList.remove('error'); copyButton.disabled = false; }, 3000);
});
});
boxContainer.appendChild(copyButton);
boxContainer.appendChild(createElement('div', { textContent: helpText, className: 'rfx-copy-box-helptext' }));
return boxContainer;
}
// --- Data Fetching Functions ---
/** Fetches summary data from the main RfX list page. */
async function fetchRfaData() {
if (rfaData && !fetchErrorOccurred) return rfaData;
fetchErrorOccurred = false;
try {
const data = await makeApiRequest({
action: 'parse',
page: config.baseRfxPage,
prop: 'text'
});
const htmlContent = data.parse.text;
const tempDiv = createElement('div', { innerHTML: htmlContent });
const reportTable = tempDiv.querySelector('.rfx-report');
let foundData = null;
if (reportTable) {
const rows = reportTable.querySelectorAll('tbody tr');
rows.forEach(row => {
const rfaLink = row.querySelector('td:first-child a');
const linkHref = rfaLink ? rfaLink.getAttribute('href').replace(/ /g, '_') : '';
const targetHref = `/wiki/${config.baseRfxPage.replace(/ /g, '_')}/${config.candidateSubpage}`;
if (rfaLink && linkHref === targetHref) {
const cells = row.querySelectorAll('td');
if (cells.length >= 8) {
foundData = {
candidate: rfaLink.textContent.trim(),
support: cells[1]?.textContent.trim() || '0',
oppose: cells[2]?.textContent.trim() || '0',
neutral: cells[3]?.textContent.trim() || '0',
percent: cells[4]?.textContent.trim().replace('%', '') || 'N/A',
status: cells[5]?.textContent.trim() || 'N/A',
endTime: cells[6]?.textContent.trim() || 'N/A',
timeLeft: cells[7]?.textContent.trim() || 'N/A',
};
}
}
});
}
if (foundData) {
rfaData = foundData;
actualCandidateUsername = rfaData.candidate;
} else {
throw new Error(`Could not find summary data for ${config.candidateSubpage}`);
}
return rfaData;
} catch (error) {
console.warn(`RfX Closer: Error fetching or parsing summary data: ${error.info || error.message}. Using defaults.`);
fetchErrorOccurred = true;
rfaData = { candidate: actualCandidateUsername, support: '0', oppose: '0', neutral: '0', percent: 'N/A', status: 'N/A', endTime: 'N/A', timeLeft: 'N/A' };
return rfaData;
}
}
/** Extracts election date from signatures below the results table. */
function extractElectionDateFromSignatures(resultsTable, containerDiv) {
if (adminElectionDate) return adminElectionDate;
try {
const signatureDates = [];
const signaturePattern = /(\d{1,2}):(\d{2}),\s*(\d{1,2})\s+(\w+)\s+(\d{4})\s*\(UTC\)/g;
// Find all elements after the results table
let currentElement = resultsTable;
const allElements = [];
// Get all following siblings
while (currentElement && currentElement.nextSibling) {
currentElement = currentElement.nextSibling;
if (currentElement.nodeType === 1) { // ELEMENT_NODE
allElements.push(currentElement);
}
}
// Also check parent's following siblings
const tableParent = resultsTable.parentElement;
if (tableParent) {
let parentSibling = tableParent;
while (parentSibling && parentSibling.nextSibling) {
parentSibling = parentSibling.nextSibling;
if (parentSibling.nodeType === 1) {
allElements.push(parentSibling);
}
}
}
// Look through elements for signatures, stopping at scrutineer section
for (let i = 0; i < Math.min(allElements.length, 30); i++) {
const element = allElements[i];
const text = element.textContent || '';
// Check if we've hit a scrutineer section (stop looking)
const heading = element.querySelector('h2, h3, h4, h5');
if (heading) {
const headingText = heading.textContent.toLowerCase();
if (headingText.includes('scrutineer') || headingText.includes('scrutineering')) {
break;
}
}
if (text.toLowerCase().includes('scrutineer') && text.toLowerCase().includes('signature')) {
break;
}
// Look for signature patterns in the element text
let match;
const elementText = element.textContent || '';
while ((match = signaturePattern.exec(elementText)) !== null) {
const hour = parseInt(match[1], 10);
const minute = parseInt(match[2], 10);
const day = parseInt(match[3], 10);
const monthName = match[4];
const year = parseInt(match[5], 10);
const monthIndex = MONTHS.findIndex(m => m.toLowerCase() === monthName.toLowerCase());
if (monthIndex !== -1) {
const sigDate = new Date(year, monthIndex, day, hour, minute);
signatureDates.push(sigDate);
}
}
}
// Also search the entire container for signatures near the table (as fallback)
if (signatureDates.length === 0 && containerDiv) {
const containerText = containerDiv.textContent || '';
// Find the table position in the text and look for signatures after it
const tableIndex = containerText.indexOf(resultsTable.textContent.substring(0, 100));
if (tableIndex !== -1) {
const textAfterTable = containerText.substring(tableIndex);
// Look for signatures in the next 2000 characters after the table
const textToSearch = textAfterTable.substring(0, 2000);
let match;
while ((match = signaturePattern.exec(textToSearch)) !== null) {
// Skip if it's in a scrutineer section
const matchIndex = match.index;
const beforeMatch = textToSearch.substring(Math.max(0, matchIndex - 200), matchIndex);
if (beforeMatch.toLowerCase().includes('scrutineer')) continue;
const hour = parseInt(match[1], 10);
const minute = parseInt(match[2], 10);
const day = parseInt(match[3], 10);
const monthName = match[4];
const year = parseInt(match[5], 10);
const monthIndex = MONTHS.findIndex(m => m.toLowerCase() === monthName.toLowerCase());
if (monthIndex !== -1) {
const sigDate = new Date(year, monthIndex, day, hour, minute);
signatureDates.push(sigDate);
}
}
}
}
if (signatureDates.length > 0) {
// Use the latest (most recent) signature date
adminElectionDate = new Date(Math.max(...signatureDates.map(d => d.getTime())));
console.log('RfX Closer: Extracted election date from signatures:', adminElectionDate);
return adminElectionDate;
}
} catch (error) {
console.warn('RfX Closer: Error extracting date from signatures:', error);
}
// Fallback to extracting from election name
return extractElectionDateFromName();
}
/** Extracts election date from page name (fallback method). */
function extractElectionDateFromName() {
// Try to extract from election name (e.g., "July_2025")
const nameMatch = config.electionName.match(/(\w+)_(\d{4})/);
if (nameMatch) {
const monthName = nameMatch[1];
const year = parseInt(nameMatch[2], 10);
const monthIndex = MONTHS.findIndex(m => m.toLowerCase() === monthName.toLowerCase());
if (monthIndex !== -1) {
// Use the last day of the month as a default (elections typically end at month end)
const lastDay = new Date(year, monthIndex + 1, 0).getDate();
adminElectionDate = new Date(year, monthIndex, lastDay);
return adminElectionDate;
}
}
// Fallback to current date
adminElectionDate = new Date();
return adminElectionDate;
}
/** Extracts election date from page name or content. */
function extractElectionDate() {
if (adminElectionDate) return adminElectionDate;
return extractElectionDateFromName();
}
/** Parses Admin Elections results table from page HTML. */
async function parseAdminElectionResults() {
if (adminElectionCandidates.length > 0) return adminElectionCandidates;
try {
// Determine which page to parse (Results subpage or main page with #Results anchor)
let pageToParse = config.pageName;
if (pageToParse.includes('#')) {
pageToParse = pageToParse.split('#')[0]; // Remove anchor
}
// Try Results subpage first, then fall back to main page
let data;
if (pageToParse.endsWith('/Results')) {
// Already on Results subpage
data = await makeApiRequest({
action: 'parse',
page: pageToParse,
prop: 'text'
});
} else {
// Try Results subpage first
const resultsSubpage = pageToParse + '/Results';
try {
data = await makeApiRequest({
action: 'parse',
page: resultsSubpage,
prop: 'text'
});
pageToParse = resultsSubpage;
} catch (e) {
// Results subpage doesn't exist, try main page
data = await makeApiRequest({
action: 'parse',
page: pageToParse,
prop: 'text'
});
}
}
const htmlContent = data.parse.text;
const tempDiv = createElement('div', { innerHTML: htmlContent });
// Find the results table - look for table with "Candidate", "Support", "Oppose", "Result" headers
const tables = tempDiv.querySelectorAll('table.wikitable, table');
let resultsTable = null;
for (const table of tables) {
const headers = table.querySelectorAll('th');
const headerTexts = Array.from(headers).map(h => h.textContent.trim().toLowerCase());
// Check if this looks like the results table
if (headerTexts.some(t => t.includes('candidate')) &&
headerTexts.some(t => t.includes('support')) &&
headerTexts.some(t => t.includes('oppose') || t.includes('result'))) {
resultsTable = table;
break;
}
}
if (!resultsTable) {
throw new Error('Could not find results table on page');
}
const rows = resultsTable.querySelectorAll('tbody tr, tr');
const candidates = [];
for (const row of rows) {
const cells = row.querySelectorAll('td');
if (cells.length < 4) continue; // Skip header rows and invalid rows
// Find candidate link (usually first cell)
const candidateLink = row.querySelector('td:first-child a, a[href*="/User:"]');
if (!candidateLink) continue;
// Extract username from link
const href = candidateLink.getAttribute('href') || '';
const userMatch = href.match(/\/User[_:]([^\/\|\?]+)/);
const username = userMatch ? userMatch[1].replace(/_/g, ' ') : candidateLink.textContent.trim();
if (!username) continue;
// Extract vote counts - columns may vary, try to find Support, Abstain, Oppose
let support = '0', oppose = '0', neutral = '0', result = '';
// Try to find columns by header position or content
const headerRow = resultsTable.querySelector('tr');
if (headerRow) {
const headerCells = headerRow.querySelectorAll('th, td');
const headerMap = {};
headerCells.forEach((cell, idx) => {
const text = cell.textContent.trim().toLowerCase();
// More specific matching to avoid false positives
if (text.includes('candidate') && !headerMap.candidate) {
headerMap.candidate = idx;
}
// Support column: must include "support" but not "oppose" or "%" (percentage columns)
if (text.includes('support') && !text.includes('oppose') && !text.includes('%') && !headerMap.support) {
headerMap.support = idx;
}
// Abstain column: must include "abstain" (or "neutral" as alternative)
if ((text.includes('abstain') || text.includes('neutral')) && !headerMap.abstain) {
headerMap.abstain = idx;
}
// Oppose column: must include "oppose"
if (text.includes('oppose') && !headerMap.oppose) {
headerMap.oppose = idx;
}
// Result column: must include "result"
if (text.includes('result') && !headerMap.result) {
headerMap.result = idx;
}
});
// Extract values based on header positions
if (headerMap.support !== undefined && cells[headerMap.support]) {
support = cells[headerMap.support].textContent.trim().replace(/%/g, '') || '0';
}
if (headerMap.abstain !== undefined && cells[headerMap.abstain]) {
neutral = cells[headerMap.abstain].textContent.trim().replace(/%/g, '') || '0';
}
if (headerMap.oppose !== undefined && cells[headerMap.oppose]) {
oppose = cells[headerMap.oppose].textContent.trim().replace(/%/g, '') || '0';
}
if (headerMap.result !== undefined && cells[headerMap.result]) {
result = cells[headerMap.result].textContent.trim();
}
} else {
// Fallback: assume standard order (Candidate, Support, Abstain, Oppose, Result)
// But be more careful - skip percentage columns
let supportIdx = 1, abstainIdx = 2, opposeIdx = 3, resultIdx = 5;
// Check if there's a percentage column between support and oppose
if (cells.length > 4) {
const cell2Text = cells[2]?.textContent.trim().toLowerCase() || '';
const cell3Text = cells[3]?.textContent.trim().toLowerCase() || '';
// If cell 2 or 3 looks like a percentage, adjust indices
if (cell2Text.includes('%') || cell2Text.match(/^\d+\.?\d*%$/)) {
// Skip percentage column
abstainIdx = 3;
opposeIdx = 4;
resultIdx = 5;
} else if (cell3Text.includes('%') || cell3Text.match(/^\d+\.?\d*%$/)) {
// Percentage is at index 3, so abstain is 2, oppose is 4
opposeIdx = 4;
resultIdx = 5;
}
}
if (cells.length >= supportIdx + 1) support = cells[supportIdx].textContent.trim().replace(/%/g, '') || '0';
if (cells.length >= abstainIdx + 1) neutral = cells[abstainIdx].textContent.trim().replace(/%/g, '') || '0';
if (cells.length >= opposeIdx + 1) oppose = cells[opposeIdx].textContent.trim().replace(/%/g, '') || '0';
if (cells.length >= resultIdx + 1) result = cells[resultIdx].textContent.trim();
}
// Determine outcome from result column
// "Elected" = successful, "Not elected" = unsuccessful
const resultLower = result.toLowerCase();
const isSuccessful = resultLower === 'elected' || (resultLower.includes('elected') && !resultLower.includes('not'));
candidates.push({
username: username,
support: support,
oppose: oppose,
neutral: neutral,
result: result,
outcome: isSuccessful ? 'successful' : 'unsuccessful'
});
}
adminElectionCandidates = candidates;
// Extract date from signatures below the results table
extractElectionDateFromSignatures(resultsTable, tempDiv);
return candidates;
} catch (error) {
console.error('RfX Closer: Error parsing Admin Elections results:', error);
throw error;
}
}
/** Removes a page from the wikitext/edit-meta caches (call after editing it). */
function invalidatePageCache(targetPageName) {
const normalizedPageName = targetPageName.replace(/ /g, '_');
delete basePageWikitextCache[normalizedPageName];
delete pageEditMetaCache[normalizedPageName];
}
/** Fetches the full wikitext of a given page, using cache.
* Returns the wikitext string, '' if the page does not exist, or null on fetch error.
* Also records base/start timestamps for edit-conflict detection. */
async function fetchPageWikitext(targetPageName) {
const normalizedPageName = targetPageName.replace(/ /g, '_');
if (basePageWikitextCache[normalizedPageName] !== undefined) {
return basePageWikitextCache[normalizedPageName];
}
// Deduplicate concurrent requests for the same page (parallel prefetches share one API call)
if (pendingWikitextFetches[normalizedPageName]) {
return pendingWikitextFetches[normalizedPageName];
}
const fetchPromise = doFetchPageWikitext(normalizedPageName);
pendingWikitextFetches[normalizedPageName] = fetchPromise;
try {
return await fetchPromise;
} finally {
delete pendingWikitextFetches[normalizedPageName];
}
}
async function doFetchPageWikitext(normalizedPageName) {
try {
const data = await makeApiRequest({
action: 'query',
prop: 'revisions',
titles: normalizedPageName,
rvslots: 'main',
rvprop: 'content|timestamp',
curtimestamp: 1
});
const page = data.query.pages[0];
if (page && page.missing) {
basePageWikitextCache[normalizedPageName] = '';
pageEditMetaCache[normalizedPageName] = { starttimestamp: data.curtimestamp };
return '';
}
if (page && page.revisions?.[0]?.slots?.main?.content) {
const revision = page.revisions[0];
const wikitext = revision.slots.main.content;
basePageWikitextCache[normalizedPageName] = wikitext;
pageEditMetaCache[normalizedPageName] = {
basetimestamp: revision.timestamp,
starttimestamp: data.curtimestamp
};
if (normalizedPageName === config.pageName.replace(/ /g, '_')) wikitextErrorOccurred = false;
return wikitext;
} else {
throw new Error(`Could not find wikitext content for page ${normalizedPageName}. Response: ${JSON.stringify(data)}`);
}
} catch (error) {
console.error(`RfX Closer: Error fetching wikitext for ${normalizedPageName}:`, error);
if (normalizedPageName === config.pageName.replace(/ /g, '_')) wikitextErrorOccurred = true;
return null;
}
}
/** Specific fetcher for the current RfX page wikitext. */
const fetchRfXWikitext = () => {
wikitextErrorOccurred = false; // Reset flag
return fetchPageWikitext(config.pageName);
};
/** API function to check user groups. Results cached per session;
* invalidated by grantPermissionAPI so post-change verification re-fetches. */
const userGroupsCache = new Map(); // username -> groups array, or null for not found/invalid
async function getUserGroups(username) {
if (userGroupsCache.has(username)) {
return userGroupsCache.get(username);
}
try {
const data = await makeApiRequest({
action: 'query', list: 'users', ususers: username, usprop: 'groups'
});
const user = data.query?.users?.[0];
if (user && !user.missing && !user.invalid) {
const groups = user.groups || [];
console.log(`RfX Closer getUserGroups: Found groups for ${username}:`, groups);
userGroupsCache.set(username, groups);
return groups;
} else {
console.warn(`RfX Closer getUserGroups: User '${username}' not found or invalid.`);
userGroupsCache.set(username, null);
return null; // Indicate user not found/invalid
}
} catch (error) {
console.error(`RfX Closer getUserGroups: API error checking groups for '${username}'.`, error);
return null; // Indicate API error (not cached, so a retry re-queries)
}
}
/** API function to grant/remove rights. */
async function grantPermissionAPI(username, groupToAdd, reason, groupsToRemove = null, expiry = 'infinity') {
const params = {
action: 'userrights',
user: username,
reason: reason,
expiry: expiry
};
if (groupToAdd) params.add = groupToAdd;
if (groupsToRemove) params.remove = groupsToRemove; // Expects pipe-separated string
try {
return await makeApiRequest(params, 'post', 'userrights');
} finally {
userGroupsCache.delete(username); // Groups changed (or may have) - force re-fetch
}
}
/** Helper function to post a message to a talk page. */
async function postToTalkPage(targetPage, sectionTitle, messageContent, summary) {
try {
await makeApiRequest({
action: 'edit',
title: targetPage,
section: 'new',
sectiontitle: sectionTitle,
text: messageContent,
summary: summary
}, 'post', 'edit');
invalidatePageCache(targetPage); // Keep cache consistent if this page was fetched earlier
return { success: true, page: targetPage };
} catch (error) {
return { success: false, page: targetPage, error: formatApiError(error) };
}
}
/** Edits a page via MediaWiki API (full page edit, not just a section).
* Uses cached base/start timestamps (from fetchPageWikitext) so concurrent
* edits by others raise an edit conflict instead of being silently overwritten. */
async function editPageViaAPI(targetPage, wikitext, summary, isCreate = false) {
try {
const editParams = {
action: 'edit',
title: targetPage,
text: wikitext,
summary: summary
};
// For new pages, we can just use edit - MediaWiki will create it if it doesn't exist
// Optionally use createonly for stricter control, but edit works fine
if (isCreate) {
editParams.createonly = '1';
} else {
const editMeta = pageEditMetaCache[targetPage.replace(/ /g, '_')];
if (editMeta) {
if (editMeta.basetimestamp) editParams.basetimestamp = editMeta.basetimestamp;
if (editMeta.starttimestamp) editParams.starttimestamp = editMeta.starttimestamp;
}
}
await makeApiRequest(editParams, 'post', 'edit');
invalidatePageCache(targetPage); // Ensure later steps re-fetch fresh content
return { success: true, page: targetPage };
} catch (error) {
if (error.code === 'editconflict') {
invalidatePageCache(targetPage); // Force a fresh fetch on retry
return { success: false, page: targetPage, error: `Edit conflict: [[${targetPage}]] changed since it was loaded. Re-run this step to retry with fresh content.` };
}
return { success: false, page: targetPage, error: formatApiError(error) };
}
}
/** Fetches current bureaucrats from Wikipedia API (single authoritative query). */
async function fetchCurrentBureaucrats() {
const names = [];
let continueParams = null;
try {
do {
const params = {
action: 'query',
list: 'allusers',
augroup: 'bureaucrat',
aulimit: 'max'
};
if (continueParams) {
Object.assign(params, continueParams);
}
const data = await makeApiRequest(params);
const users = data?.query?.allusers || [];
users.forEach(user => {
if (user?.name) {
names.push(user.name);
}
});
continueParams = data?.continue || null;
} while (continueParams);
} catch (error) {
console.error('RfX Closer: Error fetching bureaucrats via augroup.', error);
return { names: [], source: 'error' };
}
return {
names: names.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' })),
source: 'userrights'
};
}
/** Fixes the comment structure for yearly list pages - uncomments all months up to current month, comments future months. */
function fixCommentStructure(wikitext, currentMonth, currentYear) {
const currentMonthIndex = parseMonth(currentMonth);
if (currentMonthIndex === -1) {
console.warn(`RfX Closer: Unknown month ${currentMonth}, cannot fix comment structure.`);
return wikitext;
}
let modifiedWikitext = wikitext;
let uncommentedAny = false;
// Pattern 1: Match commented month headers where comment starts with <!--|-
// Format: <!--|-\n| colspan="6" ... {{Anchord|December 2025}} ... -->|-
const commentedMonthHeaderRegex1 = /<!--\|\-\s*\n\|\s*colspan="[^"]+"\s*style="[^"]+"\s*\|[^\n]*\{\{Anchord\|(\w+)\s+(\d{4})\}\}[^\n]*\n-->\|\-/g;
// Pattern 2: Match commented month headers where comment starts with <!-- on its own line (single month)
// Format: <!--\n|-\n| colspan="6" ... {{Anchord|November 2025}} ... -->|-
const commentedMonthHeaderRegex2 = /<!--\s*\n\|\-\s*\n\|\s*colspan="[^"]+"\s*style="[^"]+"\s*\|[^\n]*\{\{Anchord\|(\w+)\s+(\d{4})\}\}[^\n]*\n-->\|\-/g;
// Pattern 3: Match multi-month comment blocks (unsuccessful table format)
// Format: <!--\n|-\n| colspan... Month1 ...\n|-\n| colspan... Month2 ...-->
// This matches comment blocks that contain multiple month headers
const multiMonthCommentRegex = /<!--\s*\n((?:\|\-\s*\n\|\s*colspan="[^"]+"\s*style="[^"]+"\s*\|[^\n]*\{\{Anchord\|[^}]+\}\}[^\n]*\n)*)\|\-\s*\n\|\s*colspan="[^"]+"\s*style="[^"]+"\s*\|[^\n]*\{\{Anchord\|(\w+)\s+(\d{4})\}\}[^\n]*\n-->/g;
// Process pattern 1 (successful table format - single month)
let match;
while ((match = commentedMonthHeaderRegex1.exec(wikitext)) !== null) {
const monthName = match[1];
const monthYear = parseInt(match[2], 10);
const monthIndex = parseMonth(monthName);
// Only process if it's the current year and the month should be uncommented
if (monthYear === currentYear && monthIndex !== -1 && monthIndex <= currentMonthIndex) {
// Extract the header content (between <!--|-\n and \n-->|-)
const fullMatch = match[0];
// Remove the comment markers: <!--|-\n at start and \n-->|- at end
const headerContent = fullMatch.replace(/^<!--\|\-\s*\n/, '').replace(/\n-->\|\-$/, '');
// The uncommented version should be: |-\n[header content]\n|-
const uncommentedHeader = '|-\n' + headerContent + '\n|-\n';
// Replace the commented version with uncommented version
modifiedWikitext = modifiedWikitext.replace(fullMatch, uncommentedHeader);
uncommentedAny = true;
console.log(`RfX Closer: Uncommented month header for ${monthName} ${monthYear} (format 1).`);
}
}
// Process pattern 2 (unsuccessful table format - single month)
while ((match = commentedMonthHeaderRegex2.exec(wikitext)) !== null) {
const monthName = match[1];
const monthYear = parseInt(match[2], 10);
const monthIndex = parseMonth(monthName);
// Only process if it's the current year and the month should be uncommented
if (monthYear === currentYear && monthIndex !== -1 && monthIndex <= currentMonthIndex) {
// Extract the header content (between <!--\n|-\n and \n-->|-)
const fullMatch = match[0];
// Remove the comment markers: <!--\n|-\n at start and \n-->|- at end
const headerContent = fullMatch.replace(/^<!--\s*\n\|\-\s*\n/, '').replace(/\n-->\|\-$/, '');
// The uncommented version should be: |-\n[header content]\n|-
const uncommentedHeader = '|-\n' + headerContent + '\n|-\n';
// Replace the commented version with uncommented version
modifiedWikitext = modifiedWikitext.replace(fullMatch, uncommentedHeader);
uncommentedAny = true;
console.log(`RfX Closer: Uncommented month header for ${monthName} ${monthYear} (format 2).`);
}
}
// Process pattern 3 (multi-month comment blocks)
// Match comment blocks that start with <!-- and contain multiple month headers
// Format: <!--\n|-\n| colspan... Month1 ...\n|-\n| colspan... Month2 ...-->
// Use a pattern that matches the entire comment block including newlines
const multiMonthCommentBlockRegex = /<!--\s*\n([\s\S]*?)-->/g;
multiMonthCommentBlockRegex.lastIndex = 0;
const matchesToProcess = [];
while ((match = multiMonthCommentBlockRegex.exec(wikitext)) !== null) {
matchesToProcess.push({
match: match[0],
innerContent: match[1],
index: match.index
});
}
// Process matches in reverse order to maintain correct indices
for (let i = matchesToProcess.length - 1; i >= 0; i--) {
const { match: commentBlock, innerContent, index: commentStart } = matchesToProcess[i];
// Parse all months in the comment block
// Match: |-\n| colspan="6" ... {{Anchord|Month Year}} ... (entire line)
const monthHeaderRegex = new RegExp(`\\|\\-\\s*\\n\\|\\s*colspan="[^"]+"\\s*style="[^"]+"\\s*\\|[^\\n]*\\{\\{Anchord\\|(\\w+)\\s+(\\d{4})\\}\\}[^\\n]*`, 'g');
const monthsInBlock = [];
let monthMatch;
// Find all months in the comment block
// Split by lines and find month headers
const lines = innerContent.split('\n');
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
// Check if this line contains a month header
const monthMatch = line.match(REGEX_PATTERNS.monthHeaderAnchord);
if (monthMatch) {
// Get the previous line (should be |-) and current line
const prevLine = i > 0 ? lines[i - 1] : '';
const fullText = (prevLine.trim() === '|-' ? prevLine + '\n' : '|-\n') + line + '\n';
monthsInBlock.push({
name: monthMatch[1],
year: parseInt(monthMatch[2], 10),
fullText: fullText
});
}
}
if (monthsInBlock.length === 0) continue;
// Process months in order and rebuild structure
// We need to maintain the order they appear in the comment block
let newContent = '';
let inCommentBlock = false;
let hasUncommented = false;
for (const monthInfo of monthsInBlock) {
const monthIndex = parseMonth(monthInfo.name);
const shouldUncomment = monthInfo.year === currentYear && monthIndex !== -1 && monthIndex <= currentMonthIndex;
if (shouldUncomment) {
// Close comment block if we were in one
if (inCommentBlock) {
newContent += '-->';
inCommentBlock = false;
}
// Add uncommented month
newContent += monthInfo.fullText;
hasUncommented = true;
uncommentedAny = true;
console.log(`RfX Closer: Uncommented month header for ${monthInfo.name} ${monthInfo.year} (from multi-month block).`);
} else {
// Open comment block if not already open
if (!inCommentBlock) {
newContent += '<!--\n';
inCommentBlock = true;
}
// Add commented month
newContent += monthInfo.fullText;
}
}
// Close comment block if still open
if (inCommentBlock) {
newContent += '-->';
}
// Only replace if we made changes
if (hasUncommented) {
// Replace the comment block
modifiedWikitext = modifiedWikitext.substring(0, commentStart) +
newContent +
modifiedWikitext.substring(commentStart + commentBlock.length);
}
}
if (uncommentedAny) {
console.log(`RfX Closer: Fixed comment structure - uncommented months up to ${currentMonth} ${currentYear}.`);
} else {
console.log(`RfX Closer: No month headers needed uncommenting for ${currentMonth} ${currentYear}.`);
}
return modifiedWikitext;
}
/** Maps outcome to Recent RfX status code. */
function mapOutcomeToStatus(selectedOutcome) {
const statusMap = {
'successful': 'S',
'unsuccessful': 'US',
'withdrawn': 'W',
'notnow': 'NN',
'snow': 'SN'
};
return statusMap[selectedOutcome] || 'US'; // Default to US if unknown
}
/** Parses Recent RfX entries from wikitext. */
function parseRecentRfxEntries(wikitext) {
const entries = [];
// Match {{Recent RfX||Username||Date|Support|Oppose|Neutral|Status}}
// Format: {{Recent RfX||Chaotic Enby||3 November 2025|255|1|0|S}}
const regex = REGEX_PATTERNS.recentRfxEntry;
let match;
while ((match = regex.exec(wikitext)) !== null) {
const username = match[1].trim();
const dateStr = match[2].trim();
const support = parseInt(match[3], 10);
const oppose = parseInt(match[4], 10);
const neutral = parseInt(match[5], 10);
const status = match[6].trim();
// Parse date string (e.g., "3 November 2025")
const dateObj = parseDateString(dateStr);
entries.push({
username,
dateStr,
date: dateObj,
support,
oppose,
neutral,
status,
originalText: match[0]
});
}
return entries;
}
/** Filters entries to past 3 months or 3 most recent. */
function filterRecentEntries(entries, currentDate) {
// Sort by date (most recent first)
const sortedEntries = entries.slice().sort((a, b) => {
if (!a.date && !b.date) return 0;
if (!a.date) return 1;
if (!b.date) return -1;
return b.date - a.date; // Most recent first
});
// Calculate date 3 months ago
const threeMonthsAgo = new Date(currentDate);
threeMonthsAgo.setMonth(threeMonthsAgo.getMonth() - 3);
// Filter to entries from past 3 months
const recentEntries = sortedEntries.filter(entry => {
if (!entry.date) return false;
return entry.date >= threeMonthsAgo;
});
// If fewer than 3 from past 3 months, take the 3 most recent regardless of date
if (recentEntries.length < 3) {
return sortedEntries.slice(0, 3);
}
return recentEntries;
}
/** Rebuilds Recent table wikitext with filtered entries. */
function rebuildRecentTable(wikitext, filteredEntries) {
// Extract the top template and comment
const topTemplateMatch = wikitext.match(/\{\{Wikipedia:Requests for adminship\/Recent\/Top\}\}/);
const commentMatch = wikitext.match(/<!--[\s\S]*?-->/);
const noincludeMatch = wikitext.match(/\|\}<noinclude>[\s\S]*?<\/noinclude>/);
// Build new wikitext
let newWikitext = '';
// Add top template
if (topTemplateMatch) {
newWikitext += topTemplateMatch[0] + '\n';
}
// Add comment
if (commentMatch) {
newWikitext += commentMatch[0] + '\n';
}
// Add filtered entries
filteredEntries.forEach(entry => {
newWikitext += entry.originalText + '\n';
});
// Add closing and noinclude
if (noincludeMatch) {
newWikitext += noincludeMatch[0];
} else {
newWikitext += '|}';
}
return newWikitext;
}
// --- UI Update Functions ---
/** Updates the percentage display based on input fields. */
const updatePercentageDisplay = () => {
const supportInputEl = getCachedElement(config.selectors.supportInput);
const opposeInputEl = getCachedElement(config.selectors.opposeInput);
const percentageDivEl = getCachedElement(config.selectors.percentageDisplay);
if (!supportInputEl || !opposeInputEl || !percentageDivEl) return;
const support = parseInt(supportInputEl.value, 10) || 0;
const oppose = parseInt(opposeInputEl.value, 10) || 0;
const total = support + oppose;
const percentage = total > 0 ? (support / total * 100).toFixed(2) : 0;
percentageDivEl.textContent = `Support percentage: ${percentage}% (${support}/${total})`;
};
/** Updates the input fields with fetched or default data. */
const updateInputFields = async () => {
try {
const data = await fetchRfaData(); // Ensures data is fetched/available
const supportInputEl = getCachedElement(config.selectors.supportInput);
const opposeInputEl = getCachedElement(config.selectors.opposeInput);
const neutralInputEl = getCachedElement(config.selectors.neutralInput);
if (supportInputEl && opposeInputEl && neutralInputEl) {
supportInputEl.value = data?.support || '';
opposeInputEl.value = data?.oppose || '';
neutralInputEl.value = data?.neutral || '';
updatePercentageDisplay();
} else {
console.error("RfX Closer: Could not find input elements to update.");
}
} catch (error) {
// Error already logged by fetchRfaData, just ensure UI shows defaults
console.error("RfX Closer: Error updating input fields, likely due to fetch failure.");
updatePercentageDisplay(); // Update percentage based on potentially empty fields
}
};
/** Helper to get current vote counts from input fields. */
function getCurrentVoteCounts() {
const supportInputEl = getCachedElement(config.selectors.supportInput);
const opposeInputEl = getCachedElement(config.selectors.opposeInput);
const neutralInputEl = getCachedElement(config.selectors.neutralInput);
return {
support: supportInputEl?.value || '0',
oppose: opposeInputEl?.value || '0',
neutral: neutralInputEl?.value || '0'
};
}
/** Helper to get current closer name from input field. */
function getCloserName() {
const closerInputEl = getCachedElement(config.selectors.closerInput);
return closerInputEl?.value?.trim() || config.userName;
}
/** Gets a DOM element, caching it for future use. */
function getCachedElement(selector) {
if (!domCache[selector]) {
domCache[selector] = document.querySelector(selector);
}
return domCache[selector];
}
/** Clears the DOM cache (useful if elements are recreated). */
function clearDomCache() {
Object.keys(domCache).forEach(key => delete domCache[key]);
}
/** Parses a date string in "DD Month YYYY" format to a Date object. */
function parseDateString(dateStr) {
if (!dateStr) return null;
try {
const dateParts = dateStr.match(REGEX_PATTERNS.dateParse);
if (dateParts) {
const monthIndex = parseMonth(dateParts[2]);
if (monthIndex !== -1) {
return new Date(parseInt(dateParts[3], 10), monthIndex, parseInt(dateParts[1], 10));
}
}
} catch (e) {
console.warn(`RfX Closer: Could not parse date "${dateStr}"`, e);
}
return null;
}
/** Formats date components into "DD Month YYYY" string. */
function formatDate(day, month, year) {
const monthName = typeof month === 'number' ? MONTHS[month] : month;
return `${day} ${monthName} ${year}`;
}
/** Handles errors consistently with logging and user-facing messages. */
function handleError(context, error, userMessage = null) {
const errorMsg = userMessage || `Error in ${context}: ${error.message || error}`;
console.error(`RfX Closer [${context}]:`, error);
return {
error: true,
message: errorMsg,
context: context,
originalError: error
};
}
/** Creates a loading state UI element. */
function createLoadingState(message = 'Loading...') {
const container = createElement('div', {
className: 'rfx-closer-loading',
innerHTML: `<span style="display: inline-block; width: 16px; height: 16px; border: 2px solid #ccc; border-top-color: #333; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 8px;"></span>${message}`
});
return container;
}
/** Creates an error state UI element. */
function createErrorState(message, details = null) {
const container = createElement('div', {
className: 'rfx-closer-error',
style: { color: 'red', backgroundColor: '#ffe6e6', padding: '8px', borderRadius: '4px', margin: '8px 0' }
});
container.appendChild(createElement('p', { textContent: message, style: { margin: 0, fontWeight: 'bold' } }));
if (details) {
container.appendChild(createElement('p', { textContent: details, style: { margin: '4px 0 0 0', fontSize: '0.9em' } }));
}
return container;
}
/** Creates a success state UI element. */
function createSuccessState(message) {
return createElement('div', {
className: 'rfx-closer-success',
style: { color: 'green', backgroundColor: '#e6f3e6', padding: '8px', borderRadius: '4px', margin: '8px 0' },
textContent: message
});
}
/** Updates count line (e.g., '''X successful candidacies so far''') in wikitext. */
function updateCountInWikitext(wikitext, countRegex, delta = 1) {
let updated = false;
const newWikitext = wikitext.replace(countRegex, (match, openingFormatting, currentCountStr, closingFormatting) => {
const currentCount = parseInt(currentCountStr, 10);
if (!isNaN(currentCount)) {
const newCount = currentCount + delta;
updated = true;
const textPart = match.replace(openingFormatting || '', '').replace(currentCountStr, '').replace(closingFormatting || '', '');
return `${openingFormatting || ''}${newCount}${textPart}${closingFormatting || ''}`;
}
return match; // Return original match if count couldn't be parsed
});
return updated ? newWikitext : wikitext; // Return original if no update occurred
}
// --- Step Description Render Functions (Extracted) ---
function renderStep0Description() { /* Check Timing */
const stepContainer = createElement('div');
stepContainer.appendChild(createElement('p', {
innerHTML: `Verify that at least 7 days have passed since the listing on <a href="/wiki/${config.baseRfxPage}" target="_blank">${config.displayBaseRfxPage}</a>.`
}));
const timingInfoContainer = createElement('div', {
className: 'rfx-closer-info-box',
textContent: 'Loading timing info...'
});
stepContainer.appendChild(timingInfoContainer);
fetchRfaData().then(data => {
if (fetchErrorOccurred) {
timingInfoContainer.textContent = 'Could not load timing info. Check console for errors.';
timingInfoContainer.classList.add('error');
} else {
const isTooEarly = data.status ? data.status.toLowerCase() === 'open' : true;
timingInfoContainer.innerHTML = `End Time (UTC): ${data.endTime || 'N/A'}<br>Time Left: ${data.timeLeft || 'N/A'}<br>Status: ${data.status || 'N/A'}`;
timingInfoContainer.style.backgroundColor = isTooEarly ? '#ffe6e6' : '#e6f3e6';
timingInfoContainer.style.borderColor = isTooEarly ? '#f5c6cb' : '#c3e6cb';
timingInfoContainer.classList.remove('error');
}
}).catch(() => {
timingInfoContainer.textContent = 'Error processing timing info.';
timingInfoContainer.classList.add('error');
});
return stepContainer;
}
function renderStep1Description() { /* Verify History */
const historyUrl = `/w/index.php?title=${encodeURIComponent(config.pageName)}&action=history`;
return createElement('div', {}, [
createElement('p', { textContent: 'Check the history of the transcluded page to ensure comments are genuine and haven\'t been tampered with.' }),
createElement('a', {
href: historyUrl,
target: '_blank',
textContent: 'View page history',
style: { display: 'inline-block', marginTop: '5px', padding: '5px 10px', backgroundColor: '#f8f9fa', border: '1px solid #a2a9b1', borderRadius: '3px', textDecoration: 'none' }
})
]);
}
function renderStep2Description() { /* Determine Consensus */
const stepContainer = createElement('div');
stepContainer.appendChild(createElement('p', {
innerHTML: 'Use traditional rules of thumb and your best judgement to determine consensus. Consider:<br>- Vote counts<br>- Quality of arguments<br>- Contributor weight<br>- Concerns raised and resolution'
}));
const voteTallyContainer = createElement('div', {
className: 'rfx-closer-info-box',
textContent: 'Loading vote tally...'
});
stepContainer.appendChild(voteTallyContainer);
fetchRfaData().then(data => {
if (fetchErrorOccurred) {
voteTallyContainer.textContent = 'Could not load vote tally. Check console for errors.';
voteTallyContainer.classList.add('error');
} else {
voteTallyContainer.innerHTML = `<strong>Current Vote Tally:</strong><br>Support: ${data.support || 'N/A'}<br>Oppose: ${data.oppose || 'N/A'}<br>Neutral: ${data.neutral || 'N/A'}<br>Support %: ${data.percent !== 'N/A' ? data.percent + '%' : 'N/A'}`;
const numericPercent = parseFloat(data.percent);
if (!isNaN(numericPercent)) {
if (numericPercent >= 75) voteTallyContainer.style.backgroundColor = '#e6f3e6';
else if (numericPercent >= 65) voteTallyContainer.style.backgroundColor = '#fff3cd';
else voteTallyContainer.style.backgroundColor = '#ffe6e6';
} else {
voteTallyContainer.style.backgroundColor = '#f8f9fa';
}
voteTallyContainer.style.borderColor = window.getComputedStyle(voteTallyContainer).backgroundColor.replace('rgb', 'rgba').replace(')', ', 0.5)');
voteTallyContainer.classList.remove('error');
}
}).catch(() => {
voteTallyContainer.textContent = 'Error processing vote tally.';
voteTallyContainer.classList.add('error');
});
return stepContainer;
}
function renderStep4Description(selectedOutcome, votes) { /* Prepare RfX Page Wikitext */
const container = createElement('div');
const loadingMsg = createElement('p', { textContent: 'Loading and processing wikitext...' });
container.appendChild(loadingMsg);
let reason = '', topTemplateName = '', isHoldOutcome = false;
switch (selectedOutcome) {
case 'successful': reason = 'successful'; topTemplateName = 'rfap'; break;
case 'unsuccessful': reason = 'Unsuccessful'; topTemplateName = 'rfaf'; break;
case 'withdrawn': reason = 'WD'; topTemplateName = 'rfaf'; break;
case 'notnow': reason = 'NOTNOW'; topTemplateName = 'rfaf'; break;
case 'snow': reason = 'SNOW'; topTemplateName = 'rfaf'; break;
case 'onhold': reason = 'On hold'; topTemplateName = 'rfah'; isHoldOutcome = true; break;
default: return 'This step is not applicable for the selected outcome.';
}
const topTemplateCode = `{{subst:${topTemplateName}}}`;
fetchRfXWikitext().then(wikitext => {
loadingMsg.remove();
if (wikitext === null || wikitextErrorOccurred) {
container.appendChild(createElement('p', { innerHTML: '<strong>Error:</strong> Could not fetch or process the page wikitext. Please perform the template replacements manually. Check console for details.', style: { color: 'red' } }));
container.appendChild(createElement('p', { innerHTML: `You will need to manually add <code>${topTemplateCode}</code> at the top and potentially perform other closing steps.` }));
return;
}
let modifiedWikitext = wikitext;
modifiedWikitext = modifiedWikitext.replace(/\{\{(subst:)?(rfap|rfaf|rfah|Rfa withdrawn|Rfa snow)\}\}\s*\n?/i, ''); // Remove existing top templates
modifiedWikitext = topTemplateCode + "\n" + modifiedWikitext; // Add new top template
const finaltallyTemplate = `'''Final <span id="rfatally">(${votes.support}/${votes.oppose}/${votes.neutral})</span>; ended by ` + '~'.repeat(4);
const footerTemplate = `
:''The above adminship discussion is preserved as an archive of the discussion. <span style="color:red">'''Please do not modify it.'''</span> Subsequent comments should be made on the appropriate discussion page (such as the talk page of either [[{{NAMESPACE}} talk:{{PAGENAME}}|this nomination]] or the nominated user). No further edits should be made to this page.''</div>__ARCHIVEDTALK__ __NOEDITSECTION__
`;
const chatLink = `*See [[/Bureaucrat chat]].`;
const escapedUsernamePattern = escapeRegex(actualCandidateUsername);
const headerLineRegex = new RegExp(`^(\\s*===\\s*.*?(?:\\[\\[(?:User:${escapedUsernamePattern}|${escapedUsernamePattern})\\|${escapedUsernamePattern}\\]\\]|${escapedUsernamePattern}).*?\\s*===\\s*$)`, 'mi');
let headerMatch = modifiedWikitext.match(headerLineRegex);
let contentReplaced = false;
if (headerMatch) {
const headerEndIndex = headerMatch.index + headerMatch[0].length;
const nextMarkerRegex = /\n(\s*(?:(?:={2,}.*={2,}$)|(?:'''\[\[Wikipedia:Requests for adminship#Monitors\|Monitors\]\]''':)))/m;
const searchStringAfterHeader = modifiedWikitext.substring(headerEndIndex);
const nextMarkerMatch = searchStringAfterHeader.match(nextMarkerRegex);
if (nextMarkerMatch) {
const nextMarkerStartIndex = headerEndIndex + nextMarkerMatch.index;
const textBeforeHeaderEnd = modifiedWikitext.substring(0, headerEndIndex);
const textAfterMarkerStart = modifiedWikitext.substring(nextMarkerStartIndex);
const replacementContent = isHoldOutcome ? `\n${chatLink}\n${finaltallyTemplate}\n` : `\n${finaltallyTemplate}\n`;
modifiedWikitext = textBeforeHeaderEnd.trimEnd() + replacementContent + textAfterMarkerStart;
contentReplaced = true;
} else { console.warn("RfX Closer: Could not find next section marker after header."); }
} else { console.warn("RfX Closer: Could not find candidate header line."); }
if (contentReplaced) {
if (!isHoldOutcome) {
modifiedWikitext = modifiedWikitext.replace(/\{\{(subst:)?rfab\}\}\s*$/i, ''); // Remove existing footer
modifiedWikitext = modifiedWikitext.trim() + "\n" + footerTemplate; // Add new footer
}
const introText = isHoldOutcome
? `Ensure <code>${topTemplateCode}</code> is at the top, and the 'Bureaucrat chat' link and final tally are placed correctly below the header.`
: `Use the links below to copy the full generated wikitext for this RfX page or open it directly in the editor. <strong>Review carefully before saving.</strong>`;
container.appendChild(createElement('p', { innerHTML: introText }));
container.appendChild(createActionLinks(config.pageName, modifiedWikitext, 'Full RfX Page'));
} else {
container.appendChild(createElement('p', { innerHTML: '<strong>Warning:</strong> Could not automatically find the section between the candidate header and the next section/Monitors line to replace. Manual replacement needed. Check console for details.', style: { color: 'orange' } }));
const manualContent = isHoldOutcome ? `${chatLink}\n${finaltallyTemplate}` : finaltallyTemplate;
container.appendChild(createElement('p', { innerHTML: `Please manually replace the content between the candidate header and the next section with:` }));
container.appendChild(createCopyableBox(manualContent, 'Copy content to insert manually'));
if (!isHoldOutcome) {
container.appendChild(createElement('p', { innerHTML: `Also ensure <code>${footerTemplate}</code> is at the very bottom.` }));
}
container.appendChild(createActionLinks(config.pageName, modifiedWikitext, 'RfX Page (Manual Edit Needed)'));
}
}).catch(err => {
loadingMsg.remove();
container.appendChild(createElement('p', { innerHTML: '<strong>Error:</strong> Error processing wikitext. Check console.', style: { color: 'red' } }));
console.error("RfX Closer: Error in wikitext processing chain:", err);
});
return container;
}
function renderStep5Description() { /* Start Bureaucrat Chat */
const chatPageName = `${config.pageName}/Bureaucrat chat`;
const chatPageDisplay = `${config.candidateSubpage}/Bureaucrat chat`;
const container = createElement('div');
container.appendChild(createElement('p', {
innerHTML: `Create the bureaucrat chat page at <a href="${mw.util.getUrl(chatPageName)}" target="_blank">[[${chatPageDisplay}]]</a> with the following content. You can add an optional initial comment below.`
}));
container.appendChild(createElement('label', {
textContent: 'Optional initial comment (will be added under == Discussion ==):',
htmlFor: 'rfx-crat-chat-textarea', // Link label to textarea
style: { display: 'block', marginBottom: '4px' }
}));
const commentTextarea = createElement('textarea', {
id: 'rfx-crat-chat-textarea', // Added ID
className: 'rfx-crat-chat-textarea',
placeholder: `e.g., Initiating discussion per RfX hold...`
});
container.appendChild(commentTextarea);
const getChatPageWikitext = () => {
let initialComment = commentTextarea.value.trim();
// Strip <nowiki> tags that might have been copied from on-wiki text
initialComment = initialComment.replace(/<\/?nowiki>/gi, '');
return `{{Bureaucrat discussion header}}\n\n== Discussion ==\n${initialComment}\n\n== Recusals ==\n\n== Summary ==`;
};
container.appendChild(createActionLinks(chatPageName, getChatPageWikitext, 'Bureaucrat Chat Page', true));
return container;
}
function renderStep6Description() { /* Notify Bureaucrats */
const container = createElement('div');
const chatPageName = `${config.pageName}/Bureaucrat chat`;
const chatPageLink = `[[${chatPageName}|bureaucrat chat]]`;
container.appendChild(createElement('p', { innerHTML: `Notify bureaucrats about the new chat page. Edit the message and the list of bureaucrats below if needed, then use the API button.` }));
// Bureaucrat List Textarea
const cratListLabel = createElement('label', {
htmlFor: config.selectors.cratListTextarea.substring(1), // Remove # for htmlFor
textContent: 'Bureaucrats to Notify (edit list as needed, one username per line):',
style: { display: 'block', marginTop: '10px', marginBottom: '4px' }
});
container.appendChild(cratListLabel);
// Create textarea first so it can be referenced in the button handler
const cratListTextarea = createElement('textarea', {
id: config.selectors.cratListTextarea.substring(1), // Remove # for ID
className: 'rfx-onhold-notify-textarea',
rows: 6,
placeholder: 'Click "Load Current Bureaucrats" to populate this list.'
});
container.appendChild(cratListTextarea);
// Notification Message Textarea
container.appendChild(createElement('label', {
htmlFor: config.selectors.cratNotifyMessage.substring(1),
textContent: 'Notification Message:',
style: { display: 'block', marginTop: '10px', marginBottom: '4px' }
}));
const messageTextarea = createElement('textarea', {
id: config.selectors.cratNotifyMessage.substring(1),
className: 'rfx-onhold-notify-textarea',
value: `== Bureaucrat Chat ==\nYour input is requested at the freshly-created ${chatPageLink}. ` + '~'.repeat(4)
});
container.appendChild(messageTextarea);
// Button and Status Area
const buttonContainer = createElement('div');
const postButton = createActionButton(config.selectors.cratNotifyButton.substring(1), 'Notify Bureaucrats via API', handleNotifyCratsClick); // Pass handler
const statusArea = createStatusArea(config.selectors.cratNotifyStatus.substring(1), 'rfx-crat-notify-status');
buttonContainer.appendChild(postButton);
buttonContainer.appendChild(statusArea);
container.appendChild(buttonContainer);
// Initial Status Update Logic (defined before button so it can be referenced)
const updateInitialStatus = (extraMessage = '') => {
const bureaucratsToNotify = cratListTextarea.value.trim().split('\n').map(name => name.trim()).filter(name => name);
if (bureaucratsToNotify.length > 0) {
statusArea.textContent = `Ready to notify ${bureaucratsToNotify.length} bureaucrats from the list.`;
postButton.disabled = false;
} else {
statusArea.textContent = 'Bureaucrat list is currently empty.';
postButton.disabled = true;
}
statusArea.style.color = 'inherit';
if (extraMessage) {
statusArea.textContent += ` ${extraMessage}`;
}
};
// Load Current Bureaucrats Button
const loadCratsButton = createElement('button', {
textContent: 'Load Current Bureaucrats',
className: 'rfx-load-crats-button',
type: 'button',
style: { marginBottom: '8px', padding: '4px 8px' }
});
loadCratsButton.addEventListener('click', async () => {
loadCratsButton.disabled = true;
loadCratsButton.textContent = 'Loading...';
try {
const { names: currentCrats = [], source = 'unknown' } = (await fetchCurrentBureaucrats()) || {};
if (currentCrats.length > 0) {
cratListTextarea.value = currentCrats.join('\n');
const sourceLabel = source === 'userrights' ? 'bureaucrat user-rights list' : 'unknown source';
updateInitialStatus(`(Loaded ${currentCrats.length} from ${sourceLabel}.)`);
} else {
alert('No bureaucrats found or error occurred.');
}
} catch (error) {
alert('Error loading bureaucrats: ' + (error?.message || error));
} finally {
loadCratsButton.disabled = false;
loadCratsButton.textContent = 'Load Current Bureaucrats';
}
});
container.appendChild(loadCratsButton);
cratListTextarea.addEventListener('input', updateInitialStatus);
updateInitialStatus(); // Set initial state
return container;
}
function renderStep7Description() { /* Notify Candidate (On Hold) */
const container = createElement('div');
const candidateTalkPage = `User talk:${actualCandidateUsername}`;
const chatPageName = `${config.pageName}/Bureaucrat chat`;
const chatPageLink = `[[${chatPageName}|bureaucrat chat]]`;
container.appendChild(createElement('p', { innerHTML: `Notify the candidate (${actualCandidateUsername}) about the 'on hold' status.` }));
const messageTextarea = createElement('textarea', {
id: config.selectors.candidateOnholdNotifyMessage.substring(1),
className: 'rfx-onhold-notify-textarea',
value: `== Your ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'} ==\nHi ${actualCandidateUsername}, just letting you know that your ${config.rfxType} request has been placed on hold pending discussion amongst the bureaucrats. You can follow the discussion at the ${chatPageLink}. ` + '~'.repeat(4)
});
container.appendChild(messageTextarea);
const buttonContainer = createElement('div');
const postButton = createActionButton(config.selectors.candidateOnholdNotifyButton.substring(1), 'Post Notification via API', handleNotifyCandidateOnholdClick); // Pass handler
const manualEditLink = createElement('a', {
href: mw.util.getUrl(candidateTalkPage, { action: 'edit', section: 'new', sectiontitle: `Your ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'}` }),
target: '_blank',
className: 'rfx-notify-editlink',
textContent: `Post Manually...`
});
const statusArea = createStatusArea(config.selectors.candidateOnholdNotifyStatus.substring(1), 'rfx-candidate-onhold-notify-status');
buttonContainer.appendChild(postButton);
buttonContainer.appendChild(manualEditLink);
buttonContainer.appendChild(statusArea);
container.appendChild(buttonContainer);
return container;
}
async function renderStep8Description() { /* Process Promotion */
const container = createElement('div');
container.appendChild(createElement('p', { textContent: 'For successful RfXs, configure rights changes and grant via API:' }));
const loadingStatus = createElement('p', { textContent: 'Loading current user groups...', style: { fontStyle: 'italic' } });
container.appendChild(loadingStatus);
const rightsContainer = createElement('div');
container.appendChild(rightsContainer);
const grantButton = createActionButton('rfx-grant-rights-button', 'Grant Rights via API'); // ID added
grantButton.disabled = true;
const statusArea = createStatusArea('rfx-grant-rights-status'); // ID added
let removeCheckboxes = {}; // To store OOUI checkbox widgets
try {
const currentGroups = await getUserGroups(actualCandidateUsername);
loadingStatus.remove();
if (currentGroups === null) {
statusArea.textContent = 'Error: Could not load user groups. Cannot proceed.';
statusArea.style.color = 'red';
} else {
const groupToAdd = config.rfxType === 'adminship' ? 'sysop' : 'bureaucrat';
const groupToAddLabel = config.rfxType === 'adminship' ? 'Administrator' : 'Bureaucrat';
// Use OOUI for checkboxes
const addFieldset = new OO.ui.FieldsetLayout({ label: 'Group to Add' });
const addCheckbox = new OO.ui.CheckboxInputWidget({ selected: true, disabled: true, classes: ['rfx-closer-checkbox'] });
addFieldset.addItems([new OO.ui.FieldLayout(addCheckbox, { label: groupToAddLabel, align: 'inline' })]);
rightsContainer.appendChild(addFieldset.$element[0]);
if (config.rfxType === 'adminship') {
const removeFieldset = new OO.ui.FieldsetLayout({ label: 'Remove existing rights (Uncheck to keep)' });
const groupsToExclude = ['*', 'user', 'autoconfirmed', groupToAdd, 'importer', 'transwiki', 'researcher', 'checkuser', 'suppress'];
removeCheckboxes = {}; // Reset
let hasRemovable = false;
currentGroups.forEach(groupName => {
if (!groupsToExclude.includes(groupName)) {
hasRemovable = true;
const checkbox = new OO.ui.CheckboxInputWidget({ selected: true });
removeCheckboxes[groupName] = checkbox; // Store the widget
const displayLabel = config.groupDisplayNames[groupName] || groupName;
const field = new OO.ui.FieldLayout(checkbox, { label: displayLabel, align: 'inline' });
removeFieldset.addItems([field]);
}
});
if (hasRemovable) {
rightsContainer.appendChild(removeFieldset.$element[0]);
} else {
rightsContainer.appendChild(createElement('p', { textContent: 'User holds no other explicit groups to potentially remove.', style: { fontSize: '0.9em', fontStyle: 'italic' } }));
}
} else {
rightsContainer.appendChild(createElement('p', { textContent: 'No groups removed when granting bureaucrat rights.', style: { fontSize: '0.9em', fontStyle: 'italic' } }));
}
const userGroups = mw.config.get('wgUserGroups');
const canGrant = userGroups && userGroups.includes('bureaucrat');
if (canGrant) {
grantButton.disabled = false;
grantButton.addEventListener('click', () => handleGrantRightsClick(removeCheckboxes)); // Pass checkboxes map
} else {
statusArea.textContent = 'You lack bureaucrat rights to use the API.'; statusArea.style.color = 'orange';
}
}
} catch (error) {
loadingStatus.remove();
statusArea.textContent = `Error loading user groups: ${error.message || 'Unknown API error'}.`;
statusArea.style.color = 'red';
}
container.appendChild(grantButton);
container.appendChild(statusArea);
const list = createElement('ul', { style: { paddingLeft: '20px', marginTop: '10px' } }, [
createElement('li', { innerHTML: `Manual link: <a href="/wiki/Special:Userrights/${encodeURIComponent(actualCandidateUsername)}" target="_blank">Special:Userrights/${actualCandidateUsername}</a>` }),
createElement('li', { innerHTML: `Reference: <a href="/wiki/Special:ListGroupRights" target="_blank">Special:ListGroupRights</a>` })
]);
container.appendChild(list);
return container;
}
async function renderStep9Description(selectedOutcome, votes) { /* Update Lists */
const container = createElement('div');
// Get date info (used by both Recent table and outcome lists)
const now = new Date();
let day = now.getDate();
let month = MONTHS[now.getMonth()];
let year = now.getFullYear();
let formattedDate = formatDate(day, month, year);
// Attempt to parse date from fetched data
if (rfaData && rfaData.endTime && rfaData.endTime !== 'N/A') {
const dateParts = rfaData.endTime.match(REGEX_PATTERNS.endTimeParse);
if (dateParts) {
formattedDate = `${dateParts[1]} ${dateParts[2]} ${dateParts[3]}`;
day = parseInt(dateParts[1], 10);
month = dateParts[2];
year = parseInt(dateParts[3], 10);
}
}
// Prefetch the two independent pages in parallel; fetchPageWikitext dedupes
// in-flight requests, so the awaits below reuse these fetches.
fetchPageWikitext(config.baseRfxPage);
fetchPageWikitext(config.recentRfxPage);
// --- 1. Remove from main RfX list page ---
const removeDiv = createElement('div', { style: { marginBottom: '15px' } });
const removeLinkText = config.displayBaseRfxPage;
removeDiv.appendChild(createElement('p', { innerHTML: `<strong>1. First, remove entry from ${removeLinkText}:</strong>` }));
const removeLoadingPara = createElement('p', { textContent: ` Loading wikitext for ${removeLinkText}...`, style: { fontStyle: 'italic' } });
removeDiv.appendChild(removeLoadingPara);
container.appendChild(removeDiv);
try {
const basePageWikitext = await fetchPageWikitext(config.baseRfxPage);
removeLoadingPara.remove();
if (basePageWikitext !== null) {
const escapedPageNameForRegex = config.pageName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const lineToRemoveRegex = new RegExp(`^.*?\\{\\{(?:${escapedPageNameForRegex.replace(/_/g, '[_ ]')})\\}\\}.*?$\\n(?:^----\\s*\\n)?`, 'gmi');
const modifiedBasePageWikitext = basePageWikitext.replace(lineToRemoveRegex, '');
if (modifiedBasePageWikitext.length < basePageWikitext.length) {
removeDiv.appendChild(createActionLinks(config.baseRfxPage, modifiedBasePageWikitext, removeLinkText));
} else {
removeDiv.appendChild(createElement('p', { innerHTML: ` Warning: Could not find <code>{{${config.pageName}}}</code> to remove from ${removeLinkText}. Remove manually.`, style: { color: 'orange' } }));
removeDiv.appendChild(createActionLinks(config.baseRfxPage, basePageWikitext, removeLinkText)); // Still provide link to edit
}
} else { throw new Error(`Failed to fetch wikitext for ${config.baseRfxPage}`); }
} catch (error) {
console.error("RfX Closer: Error processing base page wikitext:", error);
removeLoadingPara.remove();
removeDiv.appendChild(createElement('p', { textContent: ` Error loading wikitext for ${removeLinkText}. Edit manually.`, style: { color: 'red' } }));
}
// --- 1b. Update Recent RfX table ---
const recentDiv = createElement('div', { style: { marginTop: '15px', marginBottom: '15px' } });
recentDiv.appendChild(createElement('p', { innerHTML: `<strong>1b. Update <a href="/wiki/${config.recentRfxPage}" target="_blank">Recent RfX table</a>:</strong>` }));
const recentLoading = createElement('p', { textContent: ` Loading...`, style: { fontStyle: 'italic' } });
recentDiv.appendChild(recentLoading);
container.appendChild(recentDiv);
try {
const recentWikitext = await fetchPageWikitext(config.recentRfxPage);
recentLoading.remove();
if (recentWikitext !== null) {
// Parse existing entries
let entries = parseRecentRfxEntries(recentWikitext);
// Remove current candidate's entry if it exists
entries = entries.filter(entry =>
entry.username.toLowerCase() !== actualCandidateUsername.toLowerCase()
);
// Add current candidate's entry
const status = mapOutcomeToStatus(selectedOutcome);
const newEntryText = `{{Recent RfX||${actualCandidateUsername}||${formattedDate}|${votes.support}|${votes.oppose}|${votes.neutral}|${status}}}`;
// Parse date for current candidate
let currentCandidateDate = null;
try {
const dateParts = formattedDate.match(REGEX_PATTERNS.dateParse);
if (dateParts) {
const monthIndex = parseMonth(dateParts[2]);
if (monthIndex !== -1) {
currentCandidateDate = new Date(parseInt(dateParts[3], 10), monthIndex, parseInt(dateParts[1], 10));
}
}
} catch (e) {
console.warn(`RfX Closer: Could not parse date "${formattedDate}"`, e);
}
// Add current candidate entry
entries.push({
username: actualCandidateUsername,
dateStr: formattedDate,
date: currentCandidateDate,
support: parseInt(votes.support, 10) || 0,
oppose: parseInt(votes.oppose, 10) || 0,
neutral: parseInt(votes.neutral, 10) || 0,
status: status,
originalText: newEntryText
});
// Filter to past 3 months or 3 most recent
const filteredEntries = filterRecentEntries(entries, now);
// Rebuild the table
const modifiedRecentWikitext = rebuildRecentTable(recentWikitext, filteredEntries);
const noteText = ` Table updated with ${filteredEntries.length} entries (${filteredEntries.length === 1 ? 'entry' : 'entries'} from past 3 months or 3 most recent).`;
recentDiv.appendChild(createElement('p', { innerHTML: noteText }));
recentDiv.appendChild(createActionLinks(config.recentRfxPage, modifiedRecentWikitext, 'Recent RfX table'));
} else {
throw new Error(`Failed to fetch wikitext for ${config.recentRfxPage}`);
}
} catch (error) {
console.error("RfX Closer: Error processing Recent RfX table:", error);
recentLoading.remove();
recentDiv.appendChild(createElement('p', { innerHTML: ` Error processing Recent RfX table. Update manually.`, style: { color: 'red' } }));
}
// --- 2. Add to outcome lists ---
const addDiv = createElement('div'); // Container for list updates
addDiv.appendChild(createElement('p', { innerHTML: `<strong>2. Then, add entry to appropriate list(s):</strong>` }));
let generatedListEntry = null, generatedRfarowTemplate = null, yearlyListPageName = '', alphabeticalListPageName = '', isSuccessfulList = false;
// Determine list pages and entry formats based on outcome
if (selectedOutcome === 'successful') {
isSuccessfulList = true;
yearlyListPageName = `Wikipedia:Successful ${config.rfxType} candidacies/${year}`;
generatedRfarowTemplate = `|{{rfarow|${actualCandidateUsername}||${formattedDate}|p|${votes.support}|${votes.oppose}|${votes.neutral}|${getCloserName()}}}`;
} else if (['unsuccessful', 'withdrawn', 'notnow', 'snow'].includes(selectedOutcome)) {
isSuccessfulList = false;
let reasonText = 'Unsuccessful', rfarowResult = 'unsuccessful';
switch(selectedOutcome) {
case 'withdrawn': reasonText = 'Withdrawn'; rfarowResult = 'Withdrawn'; break;
case 'notnow': reasonText = '[[WP:NOTNOW|NOTNOW]]'; rfarowResult = 'NOTNOW'; break;
case 'snow': reasonText = '[[WP:SNOW|SNOW]]'; rfarowResult = 'SNOW'; break;
}
yearlyListPageName = `Wikipedia:Unsuccessful ${config.rfxType} candidacies (Chronological)/${year}`;
const firstLetter = actualCandidateUsername.charAt(0).toUpperCase();
let alphaBase = `Wikipedia:Unsuccessful ${config.rfxType} candidacies`;
if (config.rfxType === 'adminship') { alphabeticalListPageName = (firstLetter >= 'A' && firstLetter <= 'Z') ? `${alphaBase}/${firstLetter}` : `${alphaBase} (Alphabetical)`; }
else { alphabeticalListPageName = `${alphaBase} (Alphabetical)`; }
const isSubsequentNomination = /[_ ]\d+$/.test(config.pageName);
const closerName = getCloserName();
generatedListEntry = `${isSubsequentNomination ? '*:' : '*'} [[${config.pageName}|${actualCandidateUsername}]] ${formattedDate} - ${reasonText} ([[User:${closerName}|${closerName}]]) (${votes.support}/${votes.oppose}/${votes.neutral})`;
generatedRfarowTemplate = `|{{rfarow|${actualCandidateUsername}||${formattedDate}|${rfarowResult}|${votes.support}|${votes.oppose}|${votes.neutral}|${closerName}}}`;
}
// Prefetch yearly and alphabetical list pages in parallel (deduped by fetchPageWikitext)
if (yearlyListPageName) fetchPageWikitext(yearlyListPageName);
if (alphabeticalListPageName && generatedListEntry) fetchPageWikitext(alphabeticalListPageName);
// --- Handle Yearly Page Update ---
if (yearlyListPageName && generatedRfarowTemplate) {
const yearlyDiv = createElement('div', { style: { marginTop: '10px' } });
yearlyDiv.appendChild(createElement('p', { innerHTML: `2a. Update <a href="/wiki/${yearlyListPageName}" target="_blank">${yearlyListPageName}</a>:` }));
const yearlyLoading = createElement('p', { textContent: ` Loading...`, style: { fontStyle: 'italic' } });
yearlyDiv.appendChild(yearlyLoading);
addDiv.appendChild(yearlyDiv);
try {
const yearlyWikitext = await fetchPageWikitext(yearlyListPageName);
yearlyLoading.remove();
if (yearlyWikitext !== null) {
let modifiedYearlyWikitext = yearlyWikitext; let modificationPerformed = false; let noteText = ''; let entryAdded = false; let countUpdated = false; let uncommentAttempted = false;
const countRegex = isSuccessfulList ? /(\'\'\'?)(\d+)\s+successful candidacies so far(\'\'\'?)/i : /(\'\'\'?)(\d+)\s+unsuccessful candidacies so far(\'\'\'?)/i;
const originalWikitextForCountCheck = modifiedYearlyWikitext;
modifiedYearlyWikitext = updateCountInWikitext(modifiedYearlyWikitext, countRegex, 1);
if (modifiedYearlyWikitext !== originalWikitextForCountCheck) { modificationPerformed = true; countUpdated = true; } else { console.warn(`RfX Closer: Could not update count on ${yearlyListPageName}`); }
// First, handle the overall comment structure - uncomment all months up to current month
modifiedYearlyWikitext = fixCommentStructure(modifiedYearlyWikitext, month, year);
modificationPerformed = true;
uncommentAttempted = true;
const monthHeaderRegex = buildMonthHeaderRegex(month, year);
let insertionIndex = -1;
let headerFound = false;
let originalWikitextForInsertionCheck = modifiedYearlyWikitext;
let headerMatch = modifiedYearlyWikitext.match(monthHeaderRegex);
let monthHeaderUpdated = false;
if (headerMatch) {
headerFound = true;
const fullMatchText = headerMatch[0];
const headerStartIndex = headerMatch.index;
// Update the month header counts
// Successful table format: "– X successful and [[link|Y unsuccessful]] candidacies"
// Unsuccessful table format: "– [[link|X successful]] and Y unsuccessful candidacies"
let headerCountMatch = null;
let currentSuccessful = 0;
let currentUnsuccessful = 0;
let successfulLinkMatch = null;
let unsuccessfulLinkMatch = null;
if (isSuccessfulList) {
// Try successful table format first
headerCountMatch = fullMatchText.match(REGEX_PATTERNS.monthHeaderCountSuccessful);
if (headerCountMatch) {
currentSuccessful = parseInt(headerCountMatch[1], 10);
currentUnsuccessful = parseInt(headerCountMatch[2], 10);
unsuccessfulLinkMatch = fullMatchText.match(REGEX_PATTERNS.unsuccessfulLink);
}
} else {
// Try unsuccessful table format
headerCountMatch = fullMatchText.match(REGEX_PATTERNS.monthHeaderCountUnsuccessful);
if (headerCountMatch) {
currentSuccessful = parseInt(headerCountMatch[1], 10);
currentUnsuccessful = parseInt(headerCountMatch[2], 10);
successfulLinkMatch = fullMatchText.match(REGEX_PATTERNS.successfulLink);
}
}
if (headerCountMatch) {
let updatedHeader;
if (isSuccessfulList) {
// Increment successful count
const newSuccessful = currentSuccessful + 1;
let linkText = `[[Wikipedia:Unsuccessful ${config.rfxType} candidacies (Chronological)/${year}#${month} ${year}|${currentUnsuccessful} unsuccessful]]`;
if (unsuccessfulLinkMatch) {
// Preserve the link structure but update the count
const linkPath = unsuccessfulLinkMatch[1];
linkText = `[[${linkPath}|${currentUnsuccessful} unsuccessful]]`;
}
// Replace the count in the header
updatedHeader = fullMatchText.replace(
REGEX_PATTERNS.monthHeaderCountSuccessful,
`– ${newSuccessful} successful and ${linkText} candidacies`
);
console.log(`RfX Closer: Updated ${month} ${year} header: ${currentSuccessful} -> ${newSuccessful} successful.`);
} else {
// Increment unsuccessful count
const newUnsuccessful = currentUnsuccessful + 1;
let linkText = `[[Wikipedia:Successful ${config.rfxType} candidacies/${year}#${month} ${year}|${currentSuccessful} successful]]`;
if (successfulLinkMatch) {
// Preserve the link structure but update the count
const linkPath = successfulLinkMatch[1];
linkText = `[[${linkPath}|${currentSuccessful} successful]]`;
}
// Replace the count in the header (unsuccessful table format)
updatedHeader = fullMatchText.replace(
REGEX_PATTERNS.monthHeaderCountUnsuccessful,
`– ${linkText} and ${newUnsuccessful} unsuccessful candidacies`
);
console.log(`RfX Closer: Updated ${month} ${year} header: ${currentUnsuccessful} -> ${newUnsuccessful} unsuccessful.`);
}
// Replace the header in the wikitext
modifiedYearlyWikitext = modifiedYearlyWikitext.substring(0, headerStartIndex) +
updatedHeader +
modifiedYearlyWikitext.substring(headerStartIndex + fullMatchText.length);
monthHeaderUpdated = true;
modificationPerformed = true;
}
// After fixCommentStructure, the header should be uncommented
// Re-find the header position after potential updates
const updatedHeaderMatch = modifiedYearlyWikitext.substring(headerStartIndex).match(monthHeaderRegex);
const updatedHeaderText = updatedHeaderMatch ? updatedHeaderMatch[0] : fullMatchText;
// Find the next |- after the header to insert the entry
const nextRowIndex = modifiedYearlyWikitext.indexOf('|-', headerStartIndex + updatedHeaderText.length);
insertionIndex = nextRowIndex !== -1 ? nextRowIndex : headerStartIndex + updatedHeaderText.length;
console.log(`RfX Closer: Found ${month} ${year} header at position ${headerStartIndex}, insertion point at ${insertionIndex}`);
} else {
headerFound = false;
console.warn(`RfX Closer: Could not find header for ${month} ${year} on ${yearlyListPageName}.`);
}
if (headerFound && insertionIndex !== -1) {
// Ensure we have a newline before inserting
if (insertionIndex > 0 && modifiedYearlyWikitext[insertionIndex - 1] !== '\n') {
modifiedYearlyWikitext = modifiedYearlyWikitext.substring(0, insertionIndex) + '\n' + modifiedYearlyWikitext.substring(insertionIndex);
insertionIndex++;
}
const insertionContent = '|-\n' + generatedRfarowTemplate + '\n';
modifiedYearlyWikitext = modifiedYearlyWikitext.substring(0, insertionIndex) + insertionContent + modifiedYearlyWikitext.substring(insertionIndex);
if (modifiedYearlyWikitext !== originalWikitextForInsertionCheck) {
modificationPerformed = true;
}
entryAdded = true;
console.log(`RfX Closer: Entry added to ${yearlyListPageName} at position ${insertionIndex}.`);
} else if (!headerFound) {
console.warn(`RfX Closer: Row not inserted into yearly list because header was not found.`);
}
noteText = ` `;
if (countUpdated && monthHeaderUpdated && entryAdded) { noteText += `Overall count, month header count, and entry updated.`; }
else if (countUpdated && entryAdded) { noteText += `Overall count updated and entry added.`; }
else if (monthHeaderUpdated && entryAdded) { noteText += `Month header count updated and entry added.`; }
else if (countUpdated && monthHeaderUpdated && !entryAdded) { noteText += `Overall and month header counts updated (could not add entry).`; }
else if (countUpdated && !entryAdded) { noteText += `Overall count updated (could not add entry).`; }
else if (monthHeaderUpdated && !entryAdded) { noteText += `Month header count updated (could not add entry).`; }
else if (!countUpdated && !monthHeaderUpdated && entryAdded) { noteText += `Entry added (could not update counts).`; }
else if (!countUpdated && !monthHeaderUpdated && !entryAdded) { noteText = ` Could not automatically update ${yearlyListPageName}.`; }
if (uncommentAttempted && !entryAdded) { noteText += ` (Failed to uncomment month header or insert entry).`; }
else if (uncommentAttempted && entryAdded) { noteText += ` (Month header uncommented - please verify).`; }
yearlyDiv.appendChild(createElement('p', { innerHTML: noteText }));
if (modificationPerformed) {
yearlyDiv.appendChild(createActionLinks(yearlyListPageName, modifiedYearlyWikitext, yearlyListPageName));
}
if (!entryAdded) { yearlyDiv.appendChild(createCopyableBox(generatedRfarowTemplate, `Copy row template to manually insert`)); }
} else { throw new Error(`Failed to fetch wikitext for ${yearlyListPageName}`); }
} catch (error) {
console.error("RfX Closer: Error processing yearly list:", error);
yearlyLoading.remove();
yearlyDiv.appendChild(createElement('p', { innerHTML: ` Error processing ${yearlyListPageName}. Update manually.`, style: { color: 'red' } }));
if (generatedRfarowTemplate) { yearlyDiv.appendChild(createCopyableBox(generatedRfarowTemplate, `Copy row template to manually insert`)); }
}
}
// --- Handle Alphabetical List Page Update ---
if (alphabeticalListPageName && !isSuccessfulList && generatedListEntry) {
const alphaDiv = createElement('div', { style: { marginTop: '15px' } });
alphaDiv.appendChild(createElement('p', { innerHTML: `2b. Update <a href="/wiki/${alphabeticalListPageName}" target="_blank">${alphabeticalListPageName}</a>:` }));
const alphaLoading = createElement('p', { textContent: ` Loading...`, style: { fontStyle: 'italic' } });
alphaDiv.appendChild(alphaLoading);
addDiv.appendChild(alphaDiv);
try {
const alphaWikitext = await fetchPageWikitext(alphabeticalListPageName);
alphaLoading.remove();
if (alphaWikitext !== null) {
const lines = alphaWikitext.split('\n'); let insertionLineIndex = -1; const newCandidateName = actualCandidateUsername; const lineRegex = REGEX_PATTERNS.listEntryLine;
for (let i = 0; i < lines.length; i++) { const line = lines[i]; const match = line.match(lineRegex); if (match) { const existingUsername = match[2].trim(); if (newCandidateName.localeCompare(existingUsername, undefined, { sensitivity: 'base' }) < 0) { insertionLineIndex = i; break; } } }
let modifiedAlphaWikitext; let alphaNoteText = ` `;
if (insertionLineIndex !== -1) { lines.splice(insertionLineIndex, 0, generatedListEntry); modifiedAlphaWikitext = lines.join('\n'); alphaNoteText += `Entry inserted alphabetically.`; }
else { let lastRelevantIndex = -1; for (let i = lines.length - 1; i >= 0; i--) { if (lines[i].match(lineRegex)) { lastRelevantIndex = i; break; } } if (lastRelevantIndex !== -1) { lines.splice(lastRelevantIndex + 1, 0, generatedListEntry); } else { if (alphaWikitext.length > 0 && !alphaWikitext.endsWith('\n')) { lines.push(''); } lines.push(generatedListEntry); } modifiedAlphaWikitext = lines.join('\n'); alphaNoteText += `Entry appended.`; }
alphaDiv.appendChild(createElement('p', { innerHTML: alphaNoteText }));
alphaDiv.appendChild(createActionLinks(alphabeticalListPageName, modifiedAlphaWikitext, alphabeticalListPageName));
} else { throw new Error(`Failed to fetch wikitext for ${alphabeticalListPageName}`); }
} catch (error) {
console.error("RfX Closer: Error processing alphabetical list:", error);
alphaLoading.remove();
alphaDiv.appendChild(createElement('p', { innerHTML: ` Error processing ${alphabeticalListPageName}. Update manually.`, style: { color: 'red' } }));
if (generatedListEntry) { alphaDiv.appendChild(createCopyableBox(generatedListEntry, `Copy entry to manually insert`)); }
}
}
container.appendChild(addDiv);
return container;
}
function renderStep10Description(selectedOutcome) { /* Notify Candidate (Closing) */
if (selectedOutcome === 'onhold') {
return '(Notification for "on hold" is handled in Step 7.)';
}
const container = createElement('div');
const candidateTalkPage = `User talk:${actualCandidateUsername}`;
const sectionTitle = `Outcome of your ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'}`;
const editUrl = mw.util.getUrl(candidateTalkPage, { action: 'edit', section: 'new', sectiontitle: sectionTitle });
container.appendChild(createElement('p', { innerHTML: `Prepare message for <a href="/wiki/${encodeURIComponent(candidateTalkPage)}" target="_blank">${candidateTalkPage}</a>.` }));
const optionsDiv = createElement('div', { className: 'rfx-notify-options' });
container.appendChild(optionsDiv);
const messageTextarea = createElement('textarea', { className: 'rfx-notify-textarea', rows: 5 });
const copyBoxPlaceholder = createElement('div'); // Placeholder for copy box/links
const buttonContainer = createElement('div', { style: { marginTop: '10px' } });
const statusArea = createStatusArea('rfx-notify-status-closing', 'rfx-notify-status'); // New ID
let messageContentGetter = () => ''; // Function to get current message content
if (selectedOutcome === 'successful') {
const templateName = config.rfxType === 'adminship' ? 'New sysop' : 'New bureaucrat';
const closerName = getCloserName();
const defaultMessage = `{{subst:${templateName}}} ` + String.fromCharCode(126, 126, 126, 126);
const radioTemplateId = 'rfx-notify-template-radio';
const radioCustomId = 'rfx-notify-custom-radio';
const radioTemplate = createElement('input', { type: 'radio', name: 'rfx-notify-choice', id: radioTemplateId, value: 'template', checked: true });
const radioCustom = createElement('input', { type: 'radio', name: 'rfx-notify-choice', id: radioCustomId, value: 'custom' });
optionsDiv.appendChild(createElement('label', { htmlFor: radioTemplateId }, [radioTemplate, ` Use {{${templateName}}}`]));
optionsDiv.appendChild(createElement('label', { htmlFor: radioCustomId }, [radioCustom, ' Use custom message']));
messageTextarea.value = `Congratulations! Your ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'} was successful. ` + String.fromCharCode(126, 126, 126, 126);
messageTextarea.style.display = 'none';
container.appendChild(messageTextarea);
container.appendChild(copyBoxPlaceholder);
const updateSuccessActions = () => {
copyBoxPlaceholder.innerHTML = ''; // Clear previous
if (radioTemplate.checked) {
messageContentGetter = () => defaultMessage;
copyBoxPlaceholder.appendChild(createActionLinks(null, defaultMessage, `{{${templateName}}}`)); // No edit link needed
} else {
messageContentGetter = () => messageTextarea.value;
copyBoxPlaceholder.appendChild(createCopyableBox(null, 'Copy the message above', false, messageTextarea));
}
};
radioTemplate.addEventListener('change', () => { messageTextarea.style.display = 'none'; updateSuccessActions(); });
radioCustom.addEventListener('change', () => { messageTextarea.style.display = 'block'; updateSuccessActions(); });
updateSuccessActions(); // Initial call
} else { // Unsuccessful outcomes
let reasonPhrase = 'unsuccessful';
switch(selectedOutcome) {
case 'withdrawn': reasonPhrase = 'withdrawn by candidate'; break;
case 'notnow': reasonPhrase = 'closed as [[WP:NOTNOW|NOTNOW]]'; break;
case 'snow': reasonPhrase = 'closed per [[WP:SNOW|SNOW]]'; break;
}
const closerName = getCloserName();
const defaultMessage = `Hi ${actualCandidateUsername}. I'm ${closerName} and I have closed your ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'} as ${reasonPhrase}. Thanks for submitting your candidacy. I hope the feedback left by editors is useful and know that many people have successfully gained ${config.rfxType === 'adminship' ? 'administrator' : 'bureaucrat'} rights after initially being unsuccessful. ` + String.fromCharCode(126, 126, 126, 126);
container.appendChild(messageTextarea);
container.appendChild(copyBoxPlaceholder);
messageContentGetter = () => messageTextarea.value;
copyBoxPlaceholder.appendChild(createCopyableBox(null, 'Copy the message above', false, messageTextarea));
}
// --- API Post Button ---
const postButton = createActionButton('rfx-notify-candidate-closing-button', 'Post Notification via API', () => handleNotifyCandidateClosingClick(messageContentGetter)); // New ID, pass getter
buttonContainer.appendChild(postButton);
// Add Manual Edit Link
const manualEditLink = createElement('a', { href: editUrl, target: '_blank', className: 'rfx-notify-editlink', textContent: `Post Manually...` });
buttonContainer.appendChild(manualEditLink);
container.appendChild(buttonContainer);
container.appendChild(statusArea);
return container;
}
// --- Admin Elections Step Render Functions ---
/** Renders the review and edit outcomes step for Admin Elections. */
async function renderAdminElectionOutcomesStep() {
const container = createElement('div');
container.appendChild(createElement('p', {
textContent: 'Review the parsed candidates and edit outcomes if needed. Outcomes are automatically determined from the results table but can be manually corrected.',
style: { marginBottom: '15px' }
}));
const loadingMsg = createElement('p', { textContent: 'Loading results...', style: { fontStyle: 'italic' } });
container.appendChild(loadingMsg);
try {
const candidates = await parseAdminElectionResults();
loadingMsg.remove();
if (candidates.length === 0) {
container.appendChild(createElement('p', {
textContent: 'No candidates found. Please check the results page.',
style: { color: 'red' }
}));
return container;
}
// Create table for candidates
const table = createElement('table', {
className: 'wikitable',
style: { width: '100%', marginTop: '10px' }
});
const thead = createElement('thead');
const headerRow = createElement('tr');
['Candidate', 'Support', 'Abstain', 'Oppose', 'Result', 'Outcome'].forEach(header => {
headerRow.appendChild(createElement('th', { textContent: header }));
});
thead.appendChild(headerRow);
table.appendChild(thead);
const tbody = createElement('tbody');
candidates.forEach((candidate, idx) => {
const row = createElement('tr');
// Username
row.appendChild(createElement('td', { textContent: candidate.username }));
// Vote counts
row.appendChild(createElement('td', { textContent: candidate.support }));
row.appendChild(createElement('td', { textContent: candidate.neutral }));
row.appendChild(createElement('td', { textContent: candidate.oppose }));
row.appendChild(createElement('td', { textContent: candidate.result }));
// Outcome selector
const outcomeCell = createElement('td');
const outcomeSelect = createElement('select', {
dataset: { candidateIndex: idx }
});
outcomeSelect.innerHTML = `
<option value="successful" ${candidate.outcome === 'successful' ? 'selected' : ''}>Successful</option>
<option value="unsuccessful" ${candidate.outcome === 'unsuccessful' ? 'selected' : ''}>Unsuccessful</option>
`;
outcomeSelect.addEventListener('change', (e) => {
const candidateIdx = parseInt(e.target.dataset.candidateIndex, 10);
const newOutcome = e.target.value;
adminElectionCandidates[candidateIdx].outcome = newOutcome;
editedOutcomes.set(candidates[candidateIdx].username, newOutcome);
// Re-render subsequent steps that depend on outcomes (steps 1, 2, 3)
if (config.isAdminElection) {
const stepsContainerEl = getCachedElement(config.selectors.stepsContainer);
if (stepsContainerEl) {
// Re-render steps 1, 2, 3 (Process Promotions, Update Lists, Notify Candidates)
for (let stepIdx = 1; stepIdx <= 3; stepIdx++) {
const stepElement = stepsContainerEl.querySelector(`[data-step="${stepIdx}"]`);
if (stepElement && steps[stepIdx]) {
const descriptionContainer = stepElement.querySelector('.rfx-closer-step-description');
if (descriptionContainer) {
descriptionContainer.innerHTML = ''; // Clear previous content
// Re-render the step description
Promise.resolve().then(() => {
if (typeof steps[stepIdx].description === 'function') {
return steps[stepIdx].description();
}
}).then(content => {
if (content instanceof Node) {
descriptionContainer.appendChild(content);
} else if (content) {
descriptionContainer.textContent = content;
}
}).catch(error => {
console.error(`Error re-rendering step ${stepIdx}:`, error);
descriptionContainer.textContent = 'Error re-rendering step. Check console.';
descriptionContainer.style.color = 'red';
});
}
}
}
}
}
});
outcomeCell.appendChild(outcomeSelect);
row.appendChild(outcomeCell);
tbody.appendChild(row);
});
table.appendChild(tbody);
container.appendChild(table);
container.appendChild(createElement('p', {
textContent: `Found ${candidates.length} candidate(s). Edit outcomes above if needed.`,
style: { marginTop: '10px', fontStyle: 'italic' }
}));
} catch (error) {
loadingMsg.remove();
container.appendChild(createElement('p', {
textContent: `Error parsing results: ${error.message}. Please check the results page format.`,
style: { color: 'red' }
}));
}
return container;
}
/** Renders the batch promotions step for Admin Elections. */
async function renderAdminElectionPromotionsStep() {
const container = createElement('div');
container.appendChild(createElement('p', {
textContent: 'Process usergroup changes for all successful candidates. Select which usergroups to keep for each candidate.',
style: { marginBottom: '15px' }
}));
const loadingMsg = createElement('p', { textContent: 'Loading candidates...', style: { fontStyle: 'italic' } });
container.appendChild(loadingMsg);
try {
const candidates = await parseAdminElectionResults();
loadingMsg.remove();
const successfulCandidates = candidates.filter(c => {
const outcome = editedOutcomes.get(c.username) || c.outcome;
return outcome === 'successful';
});
if (successfulCandidates.length === 0) {
container.appendChild(createElement('p', {
textContent: 'No successful candidates found. This step is not applicable.',
style: { color: 'orange', fontStyle: 'italic' }
}));
return container;
}
container.appendChild(createElement('p', {
textContent: `Found ${successfulCandidates.length} successful candidate(s).`,
style: { marginBottom: '15px', fontWeight: 'bold' }
}));
// Create container for candidate usergroup selections
const candidatesContainer = createElement('div');
const usergroupSelections = new Map(); // Map of username -> array of groups to keep
for (const candidate of successfulCandidates) {
const candidateDiv = createElement('div', {
style: { marginBottom: '20px', padding: '10px', border: '1px solid #ccc', borderRadius: '4px' }
});
candidateDiv.appendChild(createElement('h4', { textContent: candidate.username }));
const loadingGroups = createElement('p', { textContent: 'Loading usergroups...', style: { fontStyle: 'italic' } });
candidateDiv.appendChild(loadingGroups);
// Load current usergroups
getUserGroups(candidate.username).then(groups => {
loadingGroups.remove();
if (!groups || groups.length === 0) {
candidateDiv.appendChild(createElement('p', {
textContent: 'No usergroups found or user not found.',
style: { color: 'orange' }
}));
usergroupSelections.set(candidate.username, []);
return;
}
// Filter out sysop and bot groups (these shouldn't be removed)
const removableGroups = groups.filter(g => g !== 'sysop' && g !== 'bot' && g !== '*' && g !== 'user');
if (removableGroups.length === 0) {
candidateDiv.appendChild(createElement('p', {
textContent: 'No removable usergroups found. User will receive sysop without removing any groups.',
style: { fontStyle: 'italic' }
}));
usergroupSelections.set(candidate.username, []);
return;
}
candidateDiv.appendChild(createElement('p', {
textContent: 'Select usergroups to keep (unchecked groups will be removed):',
style: { marginTop: '10px', marginBottom: '5px' }
}));
const checkboxContainer = createElement('div');
removableGroups.forEach(group => {
const label = createElement('label', {
style: { display: 'block', marginBottom: '5px' }
});
const checkbox = createElement('input', {
type: 'checkbox',
checked: true, // Default to keeping all groups
dataset: { group: group, username: candidate.username }
});
checkbox.addEventListener('change', () => {
const current = usergroupSelections.get(candidate.username) || [];
if (checkbox.checked) {
if (!current.includes(group)) current.push(group);
} else {
const idx = current.indexOf(group);
if (idx > -1) current.splice(idx, 1);
}
usergroupSelections.set(candidate.username, current);
});
label.appendChild(checkbox);
label.appendChild(document.createTextNode(` ${config.groupDisplayNames[group] || group}`));
checkboxContainer.appendChild(label);
// Initialize selection
const current = usergroupSelections.get(candidate.username) || [];
if (!current.includes(group)) current.push(group);
usergroupSelections.set(candidate.username, current);
});
candidateDiv.appendChild(checkboxContainer);
}).catch(err => {
loadingGroups.remove();
candidateDiv.appendChild(createElement('p', {
textContent: `Error loading usergroups: ${err.message}`,
style: { color: 'red' }
}));
usergroupSelections.set(candidate.username, []);
});
candidatesContainer.appendChild(candidateDiv);
}
container.appendChild(candidatesContainer);
// Process All button
const buttonContainer = createElement('div', { style: { marginTop: '20px' } });
const processButton = createActionButton('rfx-admin-election-process-promotions', 'Process All Promotions', async () => {
processButton.disabled = true;
const statusArea = document.getElementById('rfx-admin-election-promotions-status');
statusArea.textContent = 'Processing promotions...';
statusArea.style.color = 'inherit';
const results = [];
for (const candidate of successfulCandidates) {
try {
const groupsToKeep = usergroupSelections.get(candidate.username) || [];
const currentGroups = await getUserGroups(candidate.username);
if (!currentGroups) {
results.push({ username: candidate.username, success: false, error: 'Could not fetch current groups' });
continue;
}
// Determine groups to remove (all removable groups not in keep list)
const removableGroups = currentGroups.filter(g => g !== 'sysop' && g !== 'bot' && g !== '*' && g !== 'user');
const groupsToRemove = removableGroups.filter(g => !groupsToKeep.includes(g));
const groupsToRemoveString = groupsToRemove.length > 0 ? groupsToRemove.join('|') : null;
const reason = `Promoted to administrator via [[Wikipedia:Administrator_elections/${config.electionName}|Administrator Elections ${config.electionName.replace(/_/g, ' ')}]]${config.tagLine}`;
const data = await grantPermissionAPI(
candidate.username,
'sysop',
reason,
groupsToRemoveString
);
// Verify
await sleep(1000);
const finalGroups = await getUserGroups(candidate.username);
if (finalGroups && finalGroups.includes('sysop')) {
results.push({ username: candidate.username, success: true });
} else {
results.push({ username: candidate.username, success: false, error: 'Promotion may have failed - sysop not found after grant' });
}
} catch (error) {
results.push({ username: candidate.username, success: false, error: error.message || 'Unknown error' });
}
}
// Display results
const successCount = results.filter(r => r.success).length;
const failCount = results.filter(r => !r.success).length;
let resultText = `Processed ${successCount} of ${results.length} candidates successfully.`;
if (failCount > 0) {
resultText += `\n\nFailures:\n`;
results.filter(r => !r.success).forEach(r => {
resultText += `- ${r.username}: ${r.error}\n`;
});
}
statusArea.textContent = resultText;
statusArea.style.color = failCount === 0 ? 'green' : 'orange';
processButton.disabled = false;
});
const statusArea = createStatusArea('rfx-admin-election-promotions-status');
buttonContainer.appendChild(processButton);
buttonContainer.appendChild(statusArea);
container.appendChild(buttonContainer);
} catch (error) {
loadingMsg.remove();
container.appendChild(createElement('p', {
textContent: `Error: ${error.message}`,
style: { color: 'red' }
}));
}
return container;
}
/** Renders the batch list updates step for Admin Elections. */
async function renderAdminElectionListsStep() {
const container = createElement('div');
container.appendChild(createElement('p', {
textContent: 'Update list pages for all candidates. This will add entries to the successful and unsuccessful adminship candidacies pages.',
style: { marginBottom: '15px' }
}));
const loadingMsg = createElement('p', { textContent: 'Loading candidates...', style: { fontStyle: 'italic' } });
container.appendChild(loadingMsg);
try {
const candidates = await parseAdminElectionResults();
loadingMsg.remove();
if (candidates.length === 0) {
container.appendChild(createElement('p', {
textContent: 'No candidates found.',
style: { color: 'red' }
}));
return container;
}
// Get election date
const electionDate = extractElectionDate();
const month = MONTHS[electionDate.getMonth()];
const year = electionDate.getFullYear();
const electionDateFormatted = `${month} ${year}`; // Format: "July 2025" for AdErow
const formattedDate = formatDate(electionDate.getDate(), month, year); // Keep full date for alphabetical lists
const closerName = getCloserName(); // Get closer name for list entries
// Clean vote counts to ensure they're numeric only (remove % signs)
const cleanVoteCount = (count) => {
if (!count) return '0';
// Remove % signs and trim whitespace
return count.toString().replace(/%/g, '').trim() || '0';
};
// Separate successful and unsuccessful
const successful = [];
const unsuccessful = [];
candidates.forEach(candidate => {
const outcome = editedOutcomes.get(candidate.username) || candidate.outcome;
const candidateData = {
username: candidate.username,
support: candidate.support,
oppose: candidate.oppose,
neutral: candidate.neutral,
outcome: outcome
};
if (outcome === 'successful') {
successful.push(candidateData);
} else {
unsuccessful.push(candidateData);
}
});
container.appendChild(createElement('p', {
textContent: `Found ${successful.length} successful and ${unsuccessful.length} unsuccessful candidate(s).`,
style: { marginBottom: '15px', fontWeight: 'bold' }
}));
// --- Update Recent RfX table ---
const recentDiv = createElement('div', { style: { marginTop: '15px', marginBottom: '15px' } });
recentDiv.appendChild(createElement('p', { innerHTML: `<strong>1. Update <a href="/wiki/${config.recentRfxPage}" target="_blank">Recent RfX table</a>:</strong>` }));
const recentLoading = createElement('p', { textContent: ' Loading...', style: { fontStyle: 'italic' } });
recentDiv.appendChild(recentLoading);
container.appendChild(recentDiv);
try {
const recentWikitext = await fetchPageWikitext(config.recentRfxPage);
recentLoading.remove();
if (recentWikitext !== null) {
// Parse existing entries
let entries = parseRecentRfxEntries(recentWikitext);
// Remove entries for all candidates in this election
candidates.forEach(candidate => {
entries = entries.filter(entry =>
entry.username.toLowerCase() !== candidate.username.toLowerCase()
);
});
// Add entries for all candidates
candidates.forEach(candidate => {
const outcome = editedOutcomes.get(candidate.username) || candidate.outcome;
const status = mapOutcomeToStatus(outcome);
const newEntryText = `{{Recent RfX||${candidate.username}||${formattedDate}|${cleanVoteCount(candidate.support)}|${cleanVoteCount(candidate.oppose)}|${cleanVoteCount(candidate.neutral)}|${status}}}`;
// Parse date for candidate
let candidateDate = null;
try {
const dateParts = formattedDate.match(REGEX_PATTERNS.dateParse);
if (dateParts) {
const monthIndex = parseMonth(dateParts[2]);
if (monthIndex !== -1) {
candidateDate = new Date(parseInt(dateParts[3], 10), monthIndex, parseInt(dateParts[1], 10));
}
}
} catch (e) {
console.warn(`RfX Closer: Could not parse date "${formattedDate}"`, e);
}
// Add candidate entry
entries.push({
username: candidate.username,
dateStr: formattedDate,
date: candidateDate,
support: parseInt(cleanVoteCount(candidate.support), 10) || 0,
oppose: parseInt(cleanVoteCount(candidate.oppose), 10) || 0,
neutral: parseInt(cleanVoteCount(candidate.neutral), 10) || 0,
status: status,
originalText: newEntryText
});
});
// Sort entries by date (newest first)
entries.sort((a, b) => {
if (!a.date && !b.date) return 0;
if (!a.date) return 1;
if (!b.date) return -1;
return b.date.getTime() - a.date.getTime();
});
// Filter to past 3 months or 3 most recent
const now = new Date();
const filteredEntries = filterRecentEntries(entries, now);
// Rebuild the table
const modifiedRecentWikitext = rebuildRecentTable(recentWikitext, filteredEntries);
const noteText = ` Table updated with ${filteredEntries.length} entries (${filteredEntries.length === 1 ? 'entry' : 'entries'} from past 3 months or 3 most recent).`;
recentDiv.appendChild(createElement('p', { innerHTML: noteText }));
recentDiv.appendChild(createActionLinks(config.recentRfxPage, modifiedRecentWikitext, 'Recent RfX table'));
} else {
throw new Error(`Failed to fetch wikitext for ${config.recentRfxPage}`);
}
} catch (error) {
console.error("RfX Closer: Error processing Recent RfX table:", error);
recentLoading.remove();
recentDiv.appendChild(createElement('p', { innerHTML: ` Error processing Recent RfX table. Update manually.`, style: { color: 'red' } }));
}
// Generate AdErow templates
// Format: {{AdErow|username|Election Date|Result|Support|Oppose|Neutral}}
// Result: "elected" for successful, "Not elected" for unsuccessful
const successfulEntries = successful.map(c =>
`|{{AdErow|${c.username}|${electionDateFormatted}|elected|${cleanVoteCount(c.support)}|${cleanVoteCount(c.oppose)}|${cleanVoteCount(c.neutral)}}}`
);
const unsuccessfulEntries = unsuccessful.map(c =>
`|{{AdErow|${c.username}|${electionDateFormatted}|Not elected|${cleanVoteCount(c.support)}|${cleanVoteCount(c.oppose)}|${cleanVoteCount(c.neutral)}}}`
);
// --- Handle Successful List Updates ---
if (successful.length > 0) {
const successfulListPage = `Wikipedia:Successful adminship candidacies/${year}`;
const successfulDiv = createElement('div', { style: { marginTop: '15px', marginBottom: '15px' } });
successfulDiv.appendChild(createElement('p', { innerHTML: `<strong>2. Update <a href="/wiki/${successfulListPage}" target="_blank">${successfulListPage}</a>:</strong>` }));
const successfulLoading = createElement('p', { textContent: ' Loading...', style: { fontStyle: 'italic' } });
successfulDiv.appendChild(successfulLoading);
container.appendChild(successfulDiv);
try {
const successfulWikitext = await fetchPageWikitext(successfulListPage);
successfulLoading.remove();
if (successfulWikitext !== null) {
const result = updateYearlyCandidacyList(successfulWikitext, {
isSuccessfulList: true, entries: successfulEntries, count: successful.length, month, year
});
successfulDiv.appendChild(createElement('p', { innerHTML: result.noteText }));
if (result.modificationPerformed) {
successfulDiv.appendChild(createActionLinks(successfulListPage, result.wikitext, successfulListPage));
}
if (!result.headerFound && successfulEntries.length > 0) {
successfulDiv.appendChild(createCopyableBox(successfulEntries.join('\n'), 'Copy entries to manually insert'));
}
} else {
throw new Error(`Failed to fetch wikitext for ${successfulListPage}`);
}
} catch (error) {
console.error("RfX Closer: Error processing successful list:", error);
successfulLoading.remove();
successfulDiv.appendChild(createElement('p', { innerHTML: ` Error processing ${successfulListPage}. Update manually.`, style: { color: 'red' } }));
if (successfulEntries.length > 0) {
successfulDiv.appendChild(createCopyableBox(successfulEntries.join('\n'), 'Copy entries to manually insert'));
}
}
}
// --- Handle Unsuccessful List Updates (Yearly) ---
if (unsuccessful.length > 0) {
const unsuccessfulListPage = `Wikipedia:Unsuccessful adminship candidacies (Chronological)/${year}`;
const unsuccessfulDiv = createElement('div', { style: { marginTop: '15px', marginBottom: '15px' } });
unsuccessfulDiv.appendChild(createElement('p', { innerHTML: `<strong>3. Update <a href="/wiki/${unsuccessfulListPage}" target="_blank">${unsuccessfulListPage}</a>:</strong>` }));
const unsuccessfulLoading = createElement('p', { textContent: ' Loading...', style: { fontStyle: 'italic' } });
unsuccessfulDiv.appendChild(unsuccessfulLoading);
container.appendChild(unsuccessfulDiv);
try {
const unsuccessfulWikitext = await fetchPageWikitext(unsuccessfulListPage);
unsuccessfulLoading.remove();
if (unsuccessfulWikitext !== null) {
const result = updateYearlyCandidacyList(unsuccessfulWikitext, {
isSuccessfulList: false, entries: unsuccessfulEntries, count: unsuccessful.length, month, year
});
unsuccessfulDiv.appendChild(createElement('p', { innerHTML: result.noteText }));
if (result.modificationPerformed) {
unsuccessfulDiv.appendChild(createActionLinks(unsuccessfulListPage, result.wikitext, unsuccessfulListPage));
}
if (!result.headerFound && unsuccessfulEntries.length > 0) {
unsuccessfulDiv.appendChild(createCopyableBox(unsuccessfulEntries.join('\n'), 'Copy entries to manually insert'));
}
} else {
throw new Error(`Failed to fetch wikitext for ${unsuccessfulListPage}`);
}
} catch (error) {
console.error("RfX Closer: Error processing unsuccessful list:", error);
unsuccessfulLoading.remove();
unsuccessfulDiv.appendChild(createElement('p', { innerHTML: ` Error processing ${unsuccessfulListPage}. Update manually.`, style: { color: 'red' } }));
if (unsuccessfulEntries.length > 0) {
unsuccessfulDiv.appendChild(createCopyableBox(unsuccessfulEntries.join('\n'), 'Copy entries to manually insert'));
}
}
// --- Handle Alphabetical List Updates for Unsuccessful ---
// Group candidates by first letter
const candidatesByLetter = new Map();
unsuccessful.forEach(c => {
const firstLetter = c.username.charAt(0).toUpperCase();
const letter = (firstLetter >= 'A' && firstLetter <= 'Z') ? firstLetter : 'Other';
if (!candidatesByLetter.has(letter)) {
candidatesByLetter.set(letter, []);
}
candidatesByLetter.get(letter).push(c);
});
if (editMode === 'automatic') {
// In automatic mode, create separate step-like containers for each alphabetical page
for (const [letter, letterCandidates] of candidatesByLetter) {
const alphaPageName = getUnsuccessfulAlphaPageName(letter);
// Create a step-like container
const stepContainer = createElement('div', {
className: 'rfx-closer-step',
style: { marginTop: '15px' }
});
const stepTitle = createElement('h3', {
textContent: `Update ${alphaPageName}`
});
stepContainer.appendChild(stepTitle);
const stepDescription = createElement('div', {
className: 'rfx-closer-step-description'
});
const loadingMsg = createElement('p', { textContent: 'Loading...', style: { fontStyle: 'italic' } });
stepDescription.appendChild(loadingMsg);
stepContainer.appendChild(stepDescription);
container.appendChild(stepContainer);
// Process this page
(async () => {
try {
const alphaWikitext = await fetchPageWikitext(alphaPageName);
loadingMsg.remove();
if (alphaWikitext !== null) {
const modifiedAlphaWikitext = insertAlphabeticalEntries(alphaWikitext, letterCandidates, formattedDate, closerName);
const noteText = `${letterCandidates.length} entry/entries will be inserted alphabetically.`;
stepDescription.appendChild(createElement('p', { innerHTML: noteText }));
stepDescription.appendChild(createActionLinks(alphaPageName, modifiedAlphaWikitext, alphaPageName));
} else {
throw new Error(`Failed to fetch wikitext for ${alphaPageName}`);
}
} catch (error) {
console.error("RfX Closer: Error processing alphabetical list:", error);
loadingMsg.remove();
stepDescription.appendChild(createElement('p', { innerHTML: ` Error processing ${alphaPageName}. Update manually.`, style: { color: 'red' } }));
const letterEntries = letterCandidates.map(c => buildUnsuccessfulListEntry(c, formattedDate, closerName));
stepDescription.appendChild(createCopyableBox(letterEntries.join('\n'), 'Copy entries to manually insert'));
}
})();
}
} else {
// Manual mode: show all alphabetical pages grouped together (current behavior)
const alphaDiv = createElement('div', { style: { marginTop: '15px' } });
alphaDiv.appendChild(createElement('p', { innerHTML: `<strong>4. Update alphabetical list pages for unsuccessful candidates:</strong>` }));
container.appendChild(alphaDiv);
for (const [letter, letterCandidates] of candidatesByLetter) {
const alphaPageName = getUnsuccessfulAlphaPageName(letter);
const letterDiv = createElement('div', { style: { marginTop: '10px', marginBottom: '10px' } });
letterDiv.appendChild(createElement('p', { innerHTML: `<strong>${letter}:</strong> <a href="/wiki/${alphaPageName}" target="_blank">${alphaPageName}</a>` }));
const alphaLoading = createElement('p', { textContent: ' Loading...', style: { fontStyle: 'italic' } });
letterDiv.appendChild(alphaLoading);
alphaDiv.appendChild(letterDiv);
try {
const alphaWikitext = await fetchPageWikitext(alphaPageName);
alphaLoading.remove();
if (alphaWikitext !== null) {
const modifiedAlphaWikitext = insertAlphabeticalEntries(alphaWikitext, letterCandidates, formattedDate, closerName);
const noteText = `${letterCandidates.length} entry/entries inserted alphabetically.`;
letterDiv.appendChild(createElement('p', { innerHTML: noteText }));
letterDiv.appendChild(createActionLinks(alphaPageName, modifiedAlphaWikitext, alphaPageName));
} else {
throw new Error(`Failed to fetch wikitext for ${alphaPageName}`);
}
} catch (error) {
console.error("RfX Closer: Error processing alphabetical list:", error);
alphaLoading.remove();
letterDiv.appendChild(createElement('p', { innerHTML: ` Error processing ${alphaPageName}. Update manually.`, style: { color: 'red' } }));
const letterEntries = letterCandidates.map(c => buildUnsuccessfulListEntry(c, formattedDate, closerName));
letterDiv.appendChild(createCopyableBox(letterEntries.join('\n'), 'Copy entries to manually insert'));
}
}
}
}
} catch (error) {
loadingMsg.remove();
container.appendChild(createElement('p', {
textContent: `Error: ${error.message}`,
style: { color: 'red' }
}));
}
return container;
}
/** Renders the batch notifications step for Admin Elections. */
async function renderAdminElectionNotificationsStep() {
const container = createElement('div');
container.appendChild(createElement('p', {
textContent: 'Notify all candidates of their election results. Uncheck candidates to exclude them from notifications.',
style: { marginBottom: '15px' }
}));
const loadingMsg = createElement('p', { textContent: 'Loading candidates...', style: { fontStyle: 'italic' } });
container.appendChild(loadingMsg);
try {
const candidates = await parseAdminElectionResults();
loadingMsg.remove();
if (candidates.length === 0) {
container.appendChild(createElement('p', {
textContent: 'No candidates found.',
style: { color: 'red' }
}));
return container;
}
const closerName = getCloserName();
// Separate successful and unsuccessful candidates
const successfulCandidates = [];
const unsuccessfulCandidates = [];
const candidateSelections = new Map(); // Map of username -> boolean (selected)
candidates.forEach(candidate => {
const outcome = editedOutcomes.get(candidate.username) || candidate.outcome;
candidateSelections.set(candidate.username, true); // Default to selected
if (outcome === 'successful') {
successfulCandidates.push(candidate);
} else {
unsuccessfulCandidates.push(candidate);
}
});
// --- Successful Candidates Section ---
if (successfulCandidates.length > 0) {
const successfulSection = createElement('div', {
style: { marginBottom: '30px', padding: '15px', border: '1px solid #ccc', borderRadius: '4px', backgroundColor: '#f8f9fa' }
});
successfulSection.appendChild(createElement('h3', {
textContent: `Successful Candidates (${successfulCandidates.length})`,
style: { marginTop: '0', marginBottom: '10px' }
}));
// Candidate checkboxes
const successfulCheckboxes = createElement('div', { style: { marginBottom: '15px' } });
successfulCandidates.forEach(candidate => {
const label = createElement('label', {
style: { display: 'block', marginBottom: '5px', cursor: 'pointer' }
});
const checkbox = createElement('input', {
type: 'checkbox',
checked: true,
dataset: { username: candidate.username }
});
checkbox.addEventListener('change', () => {
candidateSelections.set(candidate.username, checkbox.checked);
});
label.appendChild(checkbox);
label.appendChild(document.createTextNode(` ${candidate.username}`));
successfulCheckboxes.appendChild(label);
});
successfulSection.appendChild(successfulCheckboxes);
// Message textarea for successful candidates
const successfulMessageLabel = createElement('label', {
textContent: 'Message for successful candidates:',
htmlFor: 'rfx-admin-election-successful-message',
style: { display: 'block', marginBottom: '5px', fontWeight: 'bold' }
});
successfulSection.appendChild(successfulMessageLabel);
const successfulMessageTextarea = createElement('textarea', {
id: 'rfx-admin-election-successful-message',
rows: 4,
style: { width: '100%', marginBottom: '10px' }
});
successfulMessageTextarea.value = `{{subst:New sysop}} ` + String.fromCharCode(126, 126, 126, 126);
successfulSection.appendChild(successfulMessageTextarea);
container.appendChild(successfulSection);
}
// --- Unsuccessful Candidates Section ---
if (unsuccessfulCandidates.length > 0) {
const unsuccessfulSection = createElement('div', {
style: { marginBottom: '30px', padding: '15px', border: '1px solid #ccc', borderRadius: '4px', backgroundColor: '#f8f9fa' }
});
unsuccessfulSection.appendChild(createElement('h3', {
textContent: `Unsuccessful Candidates (${unsuccessfulCandidates.length})`,
style: { marginTop: '0', marginBottom: '10px' }
}));
// Candidate checkboxes
const unsuccessfulCheckboxes = createElement('div', { style: { marginBottom: '15px' } });
unsuccessfulCandidates.forEach(candidate => {
const label = createElement('label', {
style: { display: 'block', marginBottom: '5px', cursor: 'pointer' }
});
const checkbox = createElement('input', {
type: 'checkbox',
checked: true,
dataset: { username: candidate.username }
});
checkbox.addEventListener('change', () => {
candidateSelections.set(candidate.username, checkbox.checked);
});
label.appendChild(checkbox);
label.appendChild(document.createTextNode(` ${candidate.username}`));
unsuccessfulCheckboxes.appendChild(label);
});
unsuccessfulSection.appendChild(unsuccessfulCheckboxes);
// Message textarea for unsuccessful candidates
const unsuccessfulMessageLabel = createElement('label', {
textContent: 'Message for unsuccessful candidates:',
htmlFor: 'rfx-admin-election-unsuccessful-message',
style: { display: 'block', marginBottom: '5px', fontWeight: 'bold' }
});
unsuccessfulSection.appendChild(unsuccessfulMessageLabel);
const unsuccessfulMessageTextarea = createElement('textarea', {
id: 'rfx-admin-election-unsuccessful-message',
rows: 4,
style: { width: '100%', marginBottom: '10px' }
});
// Default message template (will be personalized per candidate)
unsuccessfulMessageTextarea.value = `Hi [USERNAME]. I'm ${closerName} and I have closed your Administrator Election candidacy as unsuccessful. Thanks for submitting your candidacy. I hope the feedback left by editors is useful and know that many people have successfully gained administrator rights after initially being unsuccessful. ` + String.fromCharCode(126, 126, 126, 126);
unsuccessfulSection.appendChild(unsuccessfulMessageTextarea);
container.appendChild(unsuccessfulSection);
}
// Notify All button
const buttonContainer = createElement('div', { style: { marginTop: '20px' } });
const notifyButton = createActionButton('rfx-admin-election-notify-all', 'Notify Selected Candidates', async () => {
notifyButton.disabled = true;
const statusArea = document.getElementById('rfx-admin-election-notifications-status');
statusArea.textContent = 'Sending notifications...';
statusArea.style.color = 'inherit';
const successfulMessage = successfulCandidates.length > 0
? document.getElementById('rfx-admin-election-successful-message')?.value || ''
: '';
const unsuccessfulMessageTemplate = unsuccessfulCandidates.length > 0
? document.getElementById('rfx-admin-election-unsuccessful-message')?.value || ''
: '';
const results = [];
const candidatesToNotify = candidates.filter(c => candidateSelections.get(c.username));
for (const candidate of candidatesToNotify) {
try {
const outcome = editedOutcomes.get(candidate.username) || candidate.outcome;
let message = '';
if (outcome === 'successful') {
message = successfulMessage;
} else {
// Replace [USERNAME] placeholder with actual username
message = unsuccessfulMessageTemplate.replace(/\[USERNAME\]/g, candidate.username);
}
if (!message.trim()) {
results.push({ username: candidate.username, success: false, error: 'Message is empty' });
continue;
}
const candidateTalkPage = `User talk:${candidate.username}`;
const sectionTitle = `Outcome of your Administrator Election`;
const editSummary = `Notifying candidate of Administrator Election outcome${config.tagLine}`;
const result = await postToTalkPage(candidateTalkPage, sectionTitle, message, editSummary);
if (result.success) {
results.push({ username: candidate.username, success: true });
} else {
results.push({ username: candidate.username, success: false, error: result.error || 'Unknown error' });
}
} catch (error) {
results.push({ username: candidate.username, success: false, error: error.message || 'Unknown error' });
}
}
// Display results
const successCount = results.filter(r => r.success).length;
const failCount = results.filter(r => !r.success).length;
let resultText = `Sent ${successCount} of ${results.length} notifications successfully.`;
if (failCount > 0) {
resultText += `\n\nFailures:\n`;
results.filter(r => !r.success).forEach(r => {
resultText += `- ${r.username}: ${r.error}\n`;
});
}
statusArea.textContent = resultText;
statusArea.style.color = failCount === 0 ? 'green' : 'orange';
notifyButton.disabled = false;
});
const statusArea = createStatusArea('rfx-admin-election-notifications-status');
buttonContainer.appendChild(notifyButton);
buttonContainer.appendChild(statusArea);
container.appendChild(buttonContainer);
} catch (error) {
loadingMsg.remove();
container.appendChild(createElement('p', {
textContent: `Error: ${error.message}`,
style: { color: 'red' }
}));
}
return container;
}
// --- Step Definitions Array ---
const steps = config.isAdminElection ? [
// Admin Elections workflow - outcomes already determined
{ title: 'Review and Edit Outcomes', description: renderAdminElectionOutcomesStep, completed: false }, // 0
{ title: 'Process Promotions', description: renderAdminElectionPromotionsStep, completed: false }, // 1
{ title: 'Update Lists', description: renderAdminElectionListsStep, completed: false }, // 2
{ title: 'Notify Candidates', description: renderAdminElectionNotificationsStep, completed: false } // 3
] : [
// Traditional RfX workflow
{ title: 'Check Timing', description: renderStep0Description, completed: false }, // 0
{ title: 'Verify History', description: renderStep1Description, completed: false }, // 1
{ title: 'Determine Consensus', description: renderStep2Description, completed: false }, // 2
{ title: 'Select Outcome', description: 'Based on the consensus determination, select the appropriate outcome:', completed: false, isSelectionStep: true }, // 3
{ title: 'Prepare RfX Page Wikitext', description: renderStep4Description, completed: false, showFor: ['successful', 'unsuccessful', 'withdrawn', 'notnow', 'snow', 'onhold'] }, // 4
{ title: 'Start Bureaucrat Chat', description: renderStep5Description, completed: false, showFor: ['onhold'] }, // 5
{ title: 'Notify Bureaucrats', description: renderStep6Description, completed: false, showFor: ['onhold'] }, // 6
{ title: 'Notify Candidate (On Hold)', description: renderStep7Description, completed: false, showFor: ['onhold'] }, // 7
{ title: 'Process Promotion', description: renderStep8Description, completed: false, showFor: ['successful'] }, // 8
{ title: 'Update Lists', description: renderStep9Description, completed: false, showFor: ['successful', 'unsuccessful', 'withdrawn', 'notnow', 'snow'] }, // 9
{ title: 'Notify Candidate (Closing)', description: renderStep10Description, completed: false, showFor: ['successful', 'unsuccessful', 'withdrawn', 'notnow', 'snow'] } // 10
];
// --- Step Rendering and Logic ---
/** Renders a single step based on current state. */
function renderStep(step, index, selectedOutcome = '', currentVotes = {}) {
const stepElement = createElement('div', {
className: 'rfx-closer-step',
dataset: { step: index, completed: step.completed }
});
const titleElement = createElement('h3');
const descriptionContainer = createElement('div', { className: 'rfx-closer-step-description' });
const displayIndex = index + 1; // 1-based index for display
if (step.isSelectionStep) {
titleElement.textContent = `${displayIndex}. ${step.title}`;
descriptionContainer.textContent = step.description;
const templateSelector = createElement('select', { id: config.selectors.outcomeSelector.substring(1) }); // Remove # for ID
templateSelector.innerHTML = `
<option value="" disabled selected>-- Select Outcome --</option>
<option value="successful">Successful</option>
<option value="unsuccessful">Unsuccessful</option>
<option value="withdrawn">Withdrawn</option>
<option value="notnow">NOTNOW</option>
<option value="snow">SNOW</option>
<option value="onhold">On hold</option>`;
templateSelector.addEventListener('change', handleOutcomeChange); // Attach listener
stepElement.appendChild(titleElement);
stepElement.appendChild(descriptionContainer);
stepElement.appendChild(templateSelector);
} else {
const checkbox = createElement('input', { type: 'checkbox', checked: step.completed, dataset: { stepIndex: index } });
checkbox.addEventListener('change', (e) => {
const stepIndex = parseInt(e.target.dataset.stepIndex, 10);
steps[stepIndex].completed = e.target.checked;
stepElement.dataset.completed = steps[stepIndex].completed;
});
titleElement.appendChild(checkbox);
titleElement.appendChild(document.createTextNode(` ${displayIndex}. ${step.title}`)); // Add space
// Handle step description rendering (sync or async)
Promise.resolve().then(() => {
if (typeof step.description === 'function') {
// Admin Elections steps don't use selectedOutcome/currentVotes
if (config.isAdminElection) {
return step.description(); // Admin Elections steps take no parameters
} else if (!step.showFor || step.showFor.includes(selectedOutcome)) {
return step.description(selectedOutcome, currentVotes); // Call the specific render function
} else {
// Provide specific messages for hidden steps
if (selectedOutcome === 'onhold' && (index === 9 || index === 10)) return '(This step is not applicable for the "on hold" outcome.)';
if (selectedOutcome !== 'successful' && index === 8) return '(This step is only applicable for successful outcomes.)';
if (selectedOutcome !== 'onhold' && (index === 5 || index === 6 || index === 7)) return '(This step is only applicable for the "on hold" outcome.)';
return 'This step is not applicable for the selected outcome.';
}
} else {
return step.description; // Should not happen with current structure
}
}).then(content => {
descriptionContainer.innerHTML = ''; // Clear previous content
if (content instanceof Node) {
descriptionContainer.appendChild(content);
} else {
descriptionContainer.textContent = content || '';
}
}).catch(error => {
console.error(`Error rendering description for step ${displayIndex}:`, error);
descriptionContainer.textContent = 'Error loading step content. Check console.';
descriptionContainer.style.color = 'red';
});
stepElement.appendChild(titleElement);
stepElement.appendChild(descriptionContainer);
}
// Determine visibility
if (config.isAdminElection) {
// All Admin Elections steps are always visible
stepElement.style.display = 'block';
} else if (index <= 3) { // Steps 0-3 always show initially
stepElement.style.display = 'block';
} else {
const shouldShow = (index === 4 && selectedOutcome) || (step.showFor && step.showFor.includes(selectedOutcome));
stepElement.style.display = shouldShow ? 'block' : 'none';
}
return stepElement;
}
/** Renders all steps based on the selected outcome. */
function renderAllSteps(selectedOutcome = '', currentVotes = {}) {
const stepsContainerEl = getCachedElement(config.selectors.stepsContainer);
if (!stepsContainerEl) return;
stepsContainerEl.innerHTML = ''; // Clear existing steps
// Add edit mode toggle above step 1
const toggleContainer = createElement('div', {
className: 'rfx-edit-mode-toggle'
});
const toggleLabel = createElement('label', {
textContent: 'Edit Mode: ',
style: { marginRight: '10px', fontWeight: 'bold' }
});
const manualRadio = createElement('input', {
type: 'radio',
name: 'edit-mode',
id: 'edit-mode-manual',
value: 'manual'
});
if (editMode === 'manual') {
manualRadio.checked = true;
}
manualRadio.addEventListener('change', (e) => {
editMode = 'manual';
// Re-render steps to update action links
renderAllSteps(selectedOutcome, currentVotes);
});
const automaticRadio = createElement('input', {
type: 'radio',
name: 'edit-mode',
id: 'edit-mode-automatic',
value: 'automatic'
});
if (editMode === 'automatic') {
automaticRadio.checked = true;
}
automaticRadio.addEventListener('change', (e) => {
editMode = 'automatic';
// Re-render steps to update action links
renderAllSteps(selectedOutcome, currentVotes);
});
const manualLabel = createElement('label', {
htmlFor: 'edit-mode-manual',
textContent: 'Manual',
style: { marginRight: '15px', cursor: 'pointer' }
});
const automaticLabel = createElement('label', {
htmlFor: 'edit-mode-automatic',
textContent: 'Automatic (Caution: in beta)',
style: { cursor: 'pointer' }
});
toggleContainer.appendChild(toggleLabel);
toggleContainer.appendChild(manualRadio);
toggleContainer.appendChild(manualLabel);
toggleContainer.appendChild(automaticRadio);
toggleContainer.appendChild(automaticLabel);
stepsContainerEl.appendChild(toggleContainer);
steps.forEach((step, index) => {
const stepElement = renderStep(step, index, selectedOutcome, currentVotes);
stepsContainerEl.appendChild(stepElement);
});
// Re-attach selector value
const selector = getCachedElement(config.selectors.outcomeSelector);
if (selector) selector.value = selectedOutcome;
}
// --- Event Handlers ---
/** Handles clicks on the "Notify Bureaucrats" button (Step 6). */
async function handleNotifyCratsClick() {
const postButton = getCachedElement(config.selectors.cratNotifyButton);
const statusArea = getCachedElement(config.selectors.cratNotifyStatus);
const cratListTextarea = getCachedElement(config.selectors.cratListTextarea);
const messageTextarea = getCachedElement(config.selectors.cratNotifyMessage);
if (!postButton || !statusArea || !cratListTextarea || !messageTextarea) return;
postButton.disabled = true;
statusArea.innerHTML = 'Starting notifications... (This may take a while)<ul id="crat-notify-progress"></ul>';
const progressList = statusArea.querySelector('#crat-notify-progress'); // Get list element
const messageContent = messageTextarea.value.trim();
const editSummary = `Notification: Bureaucrat chat created for [[${config.pageName}]]${config.tagLine}`;
const sectionTitle = `Bureaucrat chat for ${actualCandidateUsername}`;
let successCount = 0, failCount = 0;
const bureaucratsToNotify = cratListTextarea.value.trim().split('\n').map(name => name.trim()).filter(name => name);
if (bureaucratsToNotify.length === 0) {
statusArea.textContent = 'Error: Bureaucrat list is empty.'; statusArea.style.color = 'red';
postButton.disabled = false; if (progressList) progressList.remove(); return;
}
if (!messageContent) {
statusArea.textContent = 'Error: Message cannot be empty.'; statusArea.style.color = 'red';
postButton.disabled = false; if (progressList) progressList.remove(); return;
}
for (const cratUsername of bureaucratsToNotify) {
if (!cratUsername || cratUsername.includes(':') || cratUsername.includes('/') || cratUsername.includes('#')) {
const progressItem = createElement('li', { textContent: `✗ Skipping invalid username: ${cratUsername}`, className: 'warning' });
if (progressList) progressList.appendChild(progressItem);
failCount++; continue;
}
const talkPage = `User talk:${cratUsername}`;
const progressItem = createElement('li', { textContent: `Notifying ${cratUsername}...` });
if (progressList) progressList.appendChild(progressItem);
statusArea.scrollTop = statusArea.scrollHeight;
const result = await postToTalkPage(talkPage, sectionTitle, messageContent, editSummary);
if (result.success) {
progressItem.textContent = `✓ Notified ${cratUsername}`; progressItem.classList.add('success'); successCount++;
} else {
progressItem.textContent = `✗ Failed ${cratUsername}: ${result.error}`; progressItem.classList.add('error'); failCount++;
}
await sleep(300); // Delay
}
const finalStatus = createElement('p', {
textContent: `Finished: ${successCount} successful, ${failCount} failed.`,
style: { fontWeight: 'bold', color: failCount > 0 ? 'orange' : 'green' }
});
statusArea.appendChild(finalStatus);
statusArea.scrollTop = statusArea.scrollHeight;
if (failCount === 0) { // Only mark complete if all succeed
const stepElement = postButton.closest(config.selectors.stepElement);
const stepIndex = parseInt(stepElement?.dataset.step, 10);
if (stepElement && !isNaN(stepIndex) && steps[stepIndex]) {
steps[stepIndex].completed = true; stepElement.dataset.completed = true;
const checkbox = stepElement.querySelector(config.selectors.stepCheckbox); if (checkbox) checkbox.checked = true;
}
postButton.textContent = 'Notifications Sent'; // Keep disabled on full success
} else {
postButton.disabled = false; // Re-enable if some failed
}
}
/** Handles clicks on the "Notify Candidate (On Hold)" button (Step 7). */
async function handleNotifyCandidateOnholdClick() {
const postButton = getCachedElement(config.selectors.candidateOnholdNotifyButton);
const statusArea = getCachedElement(config.selectors.candidateOnholdNotifyStatus);
const messageTextarea = getCachedElement(config.selectors.candidateOnholdNotifyMessage);
if (!postButton || !statusArea || !messageTextarea) return;
postButton.disabled = true;
statusArea.textContent = 'Posting message...'; statusArea.style.color = 'inherit';
const messageContent = messageTextarea.value.trim();
const candidateTalkPage = `User talk:${actualCandidateUsername}`;
const editSummary = `Notifying candidate about RfX hold${config.tagLine}`;
const sectionTitle = `Your ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'}`;
if (!messageContent) {
statusArea.textContent = 'Error: Message cannot be empty.'; statusArea.style.color = 'red';
postButton.disabled = false; return;
}
const result = await postToTalkPage(candidateTalkPage, sectionTitle, messageContent, editSummary);
if (result.success) {
statusArea.textContent = 'Success! Message posted to candidate talk page.'; statusArea.style.color = 'green';
const stepElement = postButton.closest(config.selectors.stepElement);
const stepIndex = parseInt(stepElement?.dataset.step, 10);
if (stepElement && !isNaN(stepIndex) && steps[stepIndex]) {
steps[stepIndex].completed = true; stepElement.dataset.completed = true;
const checkbox = stepElement.querySelector(config.selectors.stepCheckbox); if (checkbox) checkbox.checked = true;
}
postButton.textContent = 'Posted'; // Keep disabled on success
} else {
statusArea.textContent = `Error posting message: ${result.error}. Please post manually.`; statusArea.style.color = 'red';
postButton.disabled = false; // Re-enable on error
}
}
/** Handles clicks on the "Grant Rights" button (Step 8). */
async function handleGrantRightsClick(removeCheckboxesMap) {
const grantButton = document.getElementById('rfx-grant-rights-button'); // Use specific ID
const statusArea = document.getElementById('rfx-grant-rights-status'); // Use specific ID
if (!grantButton || !statusArea) return;
grantButton.disabled = true; statusArea.textContent = 'Processing...'; statusArea.style.color = 'inherit';
const groupToAdd = config.rfxType === 'adminship' ? 'sysop' : 'bureaucrat';
const promotionReason = `Per [[${config.pageName}|successful RfX]]${config.tagLine}`;
const groupsToRemoveList = Object.entries(removeCheckboxesMap)
.filter(([groupName, checkboxWidget]) => checkboxWidget.isSelected())
.map(([groupName]) => groupName);
const groupsToRemoveString = groupsToRemoveList.length > 0 ? groupsToRemoveList.join('|') : null;
console.log("RfX Closer: Attempting grant.", { add: groupToAdd, remove: groupsToRemoveString });
try {
const currentGroups = await getUserGroups(actualCandidateUsername); // Re-check just before granting
const alreadyHasGroup = currentGroups && currentGroups.includes(groupToAdd);
if (alreadyHasGroup && !groupsToRemoveString) {
statusArea.textContent = `User already has '${groupToAdd}'. No action taken.`; statusArea.style.color = 'blue'; grantButton.disabled = false; return;
}
const data = await grantPermissionAPI(actualCandidateUsername, alreadyHasGroup ? null : groupToAdd, promotionReason, groupsToRemoveString);
console.log('Userrights API Success Response:', data); statusArea.textContent = 'API call successful. Verifying...';
const finalGroups = await getUserGroups(actualCandidateUsername); // Verify after grant
let finalMessage = "", finalColor = "orange", stepCompleted = false;
if (finalGroups && finalGroups.includes(groupToAdd)) {
finalMessage = `Success! User now has '${groupToAdd}'. `; finalColor = 'green'; stepCompleted = true;
} else if (finalGroups) {
if (alreadyHasGroup && groupsToRemoveString) { finalMessage = `User already had '${groupToAdd}'. `; finalColor = 'green'; stepCompleted = true; }
else { finalMessage = `API OK, but user does NOT have '${groupToAdd}'! Manual check required. `; finalColor = 'red'; }
} else { finalMessage = `API OK, but could not verify final groups. Manual check required. `; finalColor = 'orange'; }
const actuallyRemoved = data.userrights?.removed?.map(g => g.group) || [];
if (groupsToRemoveString) {
finalMessage += (actuallyRemoved.length > 0) ? `Removed: ${actuallyRemoved.join(', ')}.` : ` (No selected groups were removed).`;
}
statusArea.textContent = finalMessage; statusArea.style.color = finalColor;
if (stepCompleted) {
const stepElement = grantButton.closest(config.selectors.stepElement);
const stepIndex = parseInt(stepElement?.dataset.step, 10);
if (stepElement && !isNaN(stepIndex) && steps[stepIndex]) {
steps[stepIndex].completed = true; stepElement.dataset.completed = true;
const checkbox = stepElement.querySelector(config.selectors.stepCheckbox); if (checkbox) checkbox.checked = true;
}
}
} catch (error) {
console.error('Userrights API Error:', error);
statusArea.textContent = `Error: ${error.info || 'Unknown API error'}. Please grant manually.`; statusArea.style.color = 'red';
} finally {
grantButton.disabled = false; // Always re-enable button unless specific success case handled above
}
}
/** Handles clicks on the "Notify Candidate (Closing)" button (Step 10). */
async function handleNotifyCandidateClosingClick(messageGetter) {
const postButton = document.getElementById('rfx-notify-candidate-closing-button'); // Use specific ID
const statusArea = document.getElementById('rfx-notify-status-closing'); // Use specific ID
if (!postButton || !statusArea || !messageGetter) return;
postButton.disabled = true;
statusArea.textContent = 'Posting message...'; statusArea.style.color = 'inherit';
const messageContent = messageGetter(); // Get current message from the appropriate source
const candidateTalkPage = `User talk:${actualCandidateUsername}`;
const editSummary = `Notifying candidate of ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'} outcome${config.tagLine}`;
const sectionTitle = `Outcome of your ${config.rfxType === 'adminship' ? 'RfA' : 'RfB'}`;
if (!messageContent) {
statusArea.textContent = 'Error: Message cannot be empty.'; statusArea.style.color = 'red';
postButton.disabled = false; return;
}
const result = await postToTalkPage(candidateTalkPage, sectionTitle, messageContent, editSummary);
if (result.success) {
statusArea.textContent = 'Success! Message posted to talk page.'; statusArea.style.color = 'green';
const stepElement = postButton.closest(config.selectors.stepElement);
const stepIndex = parseInt(stepElement?.dataset.step, 10);
if (stepElement && !isNaN(stepIndex) && steps[stepIndex]) {
steps[stepIndex].completed = true; stepElement.dataset.completed = true;
const checkbox = stepElement.querySelector(config.selectors.stepCheckbox); if (checkbox) checkbox.checked = true;
}
postButton.textContent = 'Posted'; // Keep disabled on success
} else {
statusArea.textContent = `Error posting message: ${result.error}. Please post manually.`; statusArea.style.color = 'red';
postButton.disabled = false; // Re-enable on error
}
}
/** Handles change in the outcome selector dropdown (Step 3). */
function handleOutcomeChange(event) {
const selectedOutcome = event.target.value;
const currentVotes = getCurrentVoteCounts();
// Mark step 3 as completed if an outcome is selected
if (steps[3]) steps[3].completed = selectedOutcome !== '';
const isClosingOutcome = selectedOutcome && !['', 'onhold'].includes(selectedOutcome);
const promises = [fetchRfaData()]; // Always ensure summary data
// Always fetch RfX page itself if an outcome is selected (for Step 4)
if (selectedOutcome) promises.push(fetchRfXWikitext());
// Pre-fetch pages needed for closing lists (Step 9)
if (isClosingOutcome) {
promises.push(fetchPageWikitext(config.baseRfxPage));
const year = new Date().getFullYear(); // Use current year
let yearlyListPageName = '', alphabeticalListPageName = '';
if (selectedOutcome === 'successful') {
yearlyListPageName = `Wikipedia:Successful ${config.rfxType} candidacies/${year}`;
} else { // Unsuccessful outcomes
yearlyListPageName = `Wikipedia:Unsuccessful ${config.rfxType} candidacies (Chronological)/${year}`;
const firstLetter = actualCandidateUsername.charAt(0).toUpperCase();
let alphaBase = `Wikipedia:Unsuccessful ${config.rfxType} candidacies`;
if (config.rfxType === 'adminship') { alphabeticalListPageName = (firstLetter >= 'A' && firstLetter <= 'Z') ? `${alphaBase}/${firstLetter}` : `${alphaBase} (Alphabetical)`; }
else { alphabeticalListPageName = `${alphaBase} (Alphabetical)`; }
}
if (yearlyListPageName) promises.push(fetchPageWikitext(yearlyListPageName));
if (alphabeticalListPageName) promises.push(fetchPageWikitext(alphabeticalListPageName));
}
// Wait for fetches before re-rendering
Promise.all(promises).then(() => {
renderAllSteps(selectedOutcome, currentVotes);
}).catch(error => {
console.error("RfX Closer: Error during pre-fetch in handleOutcomeChange:", error);
renderAllSteps(selectedOutcome, currentVotes); // Still try to render
});
}
/** Handles dragging the header. */
function handleHeaderMouseDown(e) {
if (e.target.tagName === 'BUTTON') return; // Ignore clicks on buttons
const containerEl = getCachedElement(config.selectors.container);
if (!containerEl) return;
isDragging = true;
dragStartX = e.clientX;
dragStartY = e.clientY;
const rect = containerEl.getBoundingClientRect();
containerStartX = rect.left;
containerStartY = rect.top;
containerEl.style.position = 'fixed';
containerEl.style.left = containerStartX + 'px';
containerEl.style.top = containerStartY + 'px';
containerEl.style.transform = ''; // Remove centering transform
containerEl.style.cursor = 'grabbing';
containerEl.style.userSelect = 'none';
document.addEventListener('mousemove', handleDocumentMouseMove);
document.addEventListener('mouseup', handleDocumentMouseUp);
}
function handleDocumentMouseMove(e) {
if (!isDragging) return;
const containerEl = getCachedElement(config.selectors.container);
if (!containerEl) return;
e.preventDefault();
const dx = e.clientX - dragStartX;
const dy = e.clientY - dragStartY;
containerEl.style.left = (containerStartX + dx) + 'px';
containerEl.style.top = (containerStartY + dy) + 'px';
}
function handleDocumentMouseUp() {
if (isDragging) {
const containerEl = getCachedElement(config.selectors.container);
if (containerEl) {
containerEl.style.cursor = 'grab';
containerEl.style.userSelect = '';
}
isDragging = false;
document.removeEventListener('mousemove', handleDocumentMouseMove);
document.removeEventListener('mouseup', handleDocumentMouseUp);
}
}
/** Handles the collapse/expand button click. */
function handleCollapseClick() {
const containerEl = getCachedElement(config.selectors.container);
const contentAndInputContainerEl = getCachedElement(config.selectors.contentAndInputContainer);
const collapseButtonEl = getCachedElement(config.selectors.collapseButton);
if (!containerEl || !contentAndInputContainerEl || !collapseButtonEl) return;
isCollapsed = !isCollapsed;
if (isCollapsed) {
contentAndInputContainerEl.style.display = 'none';
collapseButtonEl.innerHTML = '+';
containerEl.style.maxHeight = 'unset';
containerEl.style.height = 'auto';
} else {
contentAndInputContainerEl.style.display = 'flex';
collapseButtonEl.innerHTML = '−';
containerEl.style.maxHeight = '90vh';
containerEl.style.height = '';
// Force a reflow to ensure proper display
containerEl.style.display = 'flex';
containerEl.style.flexDirection = 'column';
// Re-render content
updateInputFields();
renderAllSteps(getCachedElement(config.selectors.outcomeSelector)?.value || '', getCurrentVoteCounts());
}
}
/** Handles the close button click. */
function handleCloseClick() {
const containerEl = getCachedElement(config.selectors.container);
if (containerEl) containerEl.style.display = 'none';
}
/** Handles the main launch button click. */
function handleLaunchClick(e) {
e.preventDefault();
const containerEl = getCachedElement(config.selectors.container);
if (!containerEl) return;
if (containerEl.style.display === 'none' || containerEl.style.display === '') {
if (config.isAdminElection) {
// Admin Elections: just render steps (no need to fetch RfA data)
renderAllSteps('', {});
containerEl.style.display = 'flex';
} else {
// Traditional RfX: fetch data first
fetchRfaData().then(() => {
updateInputFields();
renderAllSteps('', getCurrentVoteCounts());
containerEl.style.display = 'flex';
const supportInputEl = getCachedElement(config.selectors.supportInput);
const opposeInputEl = getCachedElement(config.selectors.opposeInput);
if (supportInputEl && !supportInputEl.dataset.listenerAttached) {
supportInputEl.addEventListener('input', updatePercentageDisplay);
supportInputEl.dataset.listenerAttached = 'true';
}
if (opposeInputEl && !opposeInputEl.dataset.listenerAttached) {
opposeInputEl.addEventListener('input', updatePercentageDisplay);
opposeInputEl.dataset.listenerAttached = 'true';
}
}).catch(err => {
console.error("RfX Closer: Failed to fetch initial data on launch.", err);
containerEl.style.display = 'flex';
const stepsContainerEl = getCachedElement(config.selectors.stepsContainer);
if (stepsContainerEl) stepsContainerEl.innerHTML = '<p style="color: red;">Error fetching initial data. Check console.</p>';
});
}
} else {
containerEl.style.display = 'none';
}
}
// --- UI Element Creation ---
function buildInitialUI() {
const container = createElement('div', { id: config.selectors.container.substring(1), style: { display: 'none' } });
// Header
const title = createElement('h2', { textContent: 'RfX Closer', className: config.selectors.title.substring(1) });
const collapseButton = createElement('button', { innerHTML: '−', title: 'Collapse/Expand', className: 'rfx-closer-button rfx-closer-collapse' });
const closeButton = createElement('button', { innerHTML: '×', title: 'Close', className: 'rfx-closer-button rfx-closer-close' });
const headerButtonContainer = createElement('div', {}, [collapseButton, closeButton]);
const header = createElement('div', { className: config.selectors.header.substring(1) }, [title, headerButtonContainer]);
// Input Section Helper
const createInputField = (label, id, type = 'number', attributes = {}) => {
const inputAttrs = type === 'number' ? { type: type, id: id, min: '0', ...attributes } : { type: type, id: id, ...attributes };
return createElement('div', {}, [
createElement('label', { textContent: label, htmlFor: id }),
createElement('input', inputAttrs)
]);
};
// Input Section
const supportInputContainer = createInputField('Support', config.selectors.supportInput.substring(1));
const opposeInputContainer = createInputField('Oppose', config.selectors.opposeInput.substring(1));
const neutralInputContainer = createInputField('Neutral', config.selectors.neutralInput.substring(1));
const closerInputContainer = createInputField('Closer', config.selectors.closerInput.substring(1), 'text', { value: config.userName });
const inputFields = createElement('div', { className: config.selectors.inputFields.substring(1) }, [supportInputContainer, opposeInputContainer, neutralInputContainer, closerInputContainer]);
const percentageDiv = createElement('div', { className: config.selectors.percentageDisplay.substring(1), textContent: 'Support percentage: N/A' });
const inputSection = createElement('div', { className: config.selectors.inputSection.substring(1) }, [inputFields, percentageDiv]);
// Hide input section for Admin Elections (data is parsed from results table)
if (config.isAdminElection) {
inputSection.style.display = 'none';
}
// Content Section
const stepsContainer = createElement('div', { id: config.selectors.stepsContainer.substring(1) });
const contentContainer = createElement('div', { className: config.selectors.contentContainer.substring(1) }, [stepsContainer]);
// Assembly
const contentAndInputContainer = createElement('div', { className: config.selectors.contentAndInputContainer.substring(1) }, [inputSection, contentContainer]);
container.appendChild(header);
container.appendChild(contentAndInputContainer);
document.body.appendChild(container);
// Add Event Listeners to dynamically created elements
header.addEventListener('mousedown', handleHeaderMouseDown);
collapseButton.addEventListener('click', handleCollapseClick);
closeButton.addEventListener('click', handleCloseClick);
}
// --- CSS Styling ---
function addStyles() {
const styles = `
:root {
--border-color: #a2a9b1;
--border-color-light: #ccc;
--background-light: #f8f9fa;
--background-hover: #eaecf0;
--text-color: #202122;
--text-muted: #54595d;
--link-color: #0645ad;
--button-primary: #36c;
--button-hover: #447ff5;
--success-bg: #e6f3e6;
--success-border: #c3e6cb;
--error-bg: #f8d7da;
--error-border: #f5c6cb;
--warning-bg: #fcf8e3;
--warning-border: #faebcc;
--warning-text: #8a6d3b;
}
/* Animations */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Base Container */
#rfx-closer-container {
position: fixed;
right: 10px;
top: 10px;
width: 380px;
max-height: 90vh;
background: var(--background-light);
border: 1px solid var(--border-color);
border-radius: 5px;
z-index: 1001;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
font-family: sans-serif;
font-size: 14px;
color: var(--text-color);
display: flex;
flex-direction: column;
padding: 10px;
overflow: hidden;
}
/* Content Container */
.rfx-closer-main-content {
display: flex;
flex-direction: column;
flex: 1;
overflow: auto;
min-height: 0;
}
/* Content and Input Container */
.rfx-closer-content-container {
flex: 1;
overflow-y: auto;
padding: 20px;
min-height: 100px;
}
/* Header Styles */
.rfx-closer-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
background: var(--background-light);
border-bottom: 1px solid var(--border-color);
cursor: grab;
flex-shrink: 0;
}
.rfx-closer-title {
margin: 0;
font-size: 1.15em;
font-weight: bold;
}
/* Button Styles */
.rfx-closer-button,
.rfx-closer-action-button,
.rfx-notify-editlink {
border-radius: 3px;
cursor: pointer;
}
.rfx-closer-button {
background: none;
border: 1px solid transparent;
font-size: 1.5em;
color: var(--text-muted);
padding: 0 5px;
line-height: 1;
}
.rfx-closer-button:hover {
background-color: var(--background-hover);
}
.rfx-closer-action-button {
padding: 5px 10px;
background-color: var(--button-primary);
color: white;
border: 1px solid var(--button-primary);
margin: 10px 0;
font-size: 0.95em;
}
.rfx-closer-action-button:hover {
background-color: var(--button-hover);
}
.rfx-closer-action-button:disabled {
background-color: var(--border-color);
border-color: var(--border-color);
cursor: not-allowed;
}
/* Input Styles */
.rfx-closer-input-section {
padding: 15px;
border-bottom: 1px solid var(--border-color);
background: white;
flex-shrink: 0;
margin-bottom: 15px;
}
.rfx-closer-input-fields {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}
.rfx-closer-input-fields div {
display: flex;
flex-direction: column;
gap: 4px;
}
.rfx-closer-input-fields label {
font-size: 0.85em;
color: var(--text-muted);
}
/* Common Input Elements */
.rfx-closer-input-fields input,
.rfx-notify-textarea,
.rfx-crat-chat-textarea,
.rfx-onhold-notify-textarea {
padding: 5px;
border: 1px solid var(--border-color);
border-radius: 3px;
width: 100%;
box-sizing: border-box;
margin: 5px 0;
}
/* Status Elements */
.rfx-closer-api-status,
.rfx-notify-status,
.rfx-crat-notify-status,
.rfx-candidate-onhold-notify-status {
font-size: 0.9em;
margin-top: 8px;
}
/* Info Boxes */
.rfx-closer-info-box,
.rfx-closer-known-issue,
.rfx-closer-percentage {
margin-top: 10px;
padding: 8px 10px;
border-radius: 3px;
font-size: 0.9em;
}
.rfx-closer-info-box {
border: 1px solid var(--border-color-light);
background-color: var(--background-light);
}
.rfx-closer-info-box.error {
background-color: var(--error-bg);
border-color: var(--error-border);
color: #721c24;
}
.rfx-closer-known-issue {
border: 1px solid var(--warning-border);
background-color: var(--warning-bg);
color: var(--warning-text);
}
/* Launch Button */
#rfx-closer-launch {
color: var(--link-color) !important;
text-decoration: none;
cursor: pointer;
}
#rfx-closer-launch:hover {
text-decoration: underline !important;
}
/* Step Styles */
.rfx-closer-step {
margin-bottom: 20px;
padding: 15px;
border: 1px solid var(--border-color);
border-radius: 4px;
background: white;
transition: background-color 0.3s ease;
overflow-x: auto; /* Allow horizontal scrolling if needed */
}
.rfx-closer-step[data-completed="true"] {
background-color: var(--success-bg);
border-color: var(--success-border);
}
/* Status Colors */
.rfx-crat-notify-status .success { color: green; }
.rfx-crat-notify-status .error { color: red; }
.rfx-crat-notify-status .warning { color: orange; }
/* OOUI Overrides */
.rfx-closer-checkbox.oo-ui-widget-disabled,
.rfx-closer-checkbox.oo-ui-widget-disabled .oo-ui-checkboxInputWidget-checkIcon {
opacity: 1 !important;
}
/* Link Styles */
.rfx-action-link {
display: inline-block;
margin: 5px 0;
padding: 5px 10px;
background-color: var(--background-light);
border: 1px solid var(--border-color);
border-radius: 3px;
text-decoration: none;
color: var(--link-color);
}
.rfx-action-link:hover {
background-color: var(--background-hover);
}
.rfx-action-links-container {
margin-top: 10px;
margin-bottom: 10px;
}
/* Edit Mode Toggle Styles */
.rfx-edit-mode-toggle {
margin-bottom: 15px;
padding: 10px;
background-color: var(--background-light);
border: 1px solid var(--border-color);
border-radius: 4px;
}
.rfx-edit-mode-toggle label {
margin-right: 10px;
font-weight: bold;
cursor: default;
}
.rfx-edit-mode-toggle input[type="radio"] {
margin-right: 5px;
cursor: pointer;
}
.rfx-edit-mode-toggle label[for^="edit-mode"] {
margin-right: 15px;
cursor: pointer;
font-weight: normal;
}
/* Dropdown Styles */
#rfx-outcome-selector {
width: 100%;
padding: 5px;
margin-top: 10px;
border: 1px solid var(--border-color);
border-radius: 3px;
background-color: white;
}
`;
document.head.appendChild(createElement('style', { textContent: styles }));
}
// --- Initialization ---
mw.loader.using(['oojs-ui-core', 'oojs-ui-widgets', 'mediawiki.api', 'mediawiki.widgets.DateInputWidget', 'mediawiki.util'], function() {
buildInitialUI(); // Create the UI elements
addStyles(); // Add the CSS
// Remove any existing launch button/list item to prevent duplicates
const existingButton = getCachedElement(config.selectors.launchButton);
if (existingButton) {
existingButton.remove();
}
const existingListItem = getCachedElement(config.selectors.launchListItem);
if (existingListItem) {
existingListItem.remove();
}
// Create and add launch button
const launchButton = createElement('a', {
id: config.selectors.launchButton.substring(1),
textContent: 'RfX Closer',
href: '#'
});
launchButton.addEventListener('click', handleLaunchClick); // Attach listener
const pageTools = getCachedElement(config.selectors.toolsMenu);
if (pageTools) {
const li = createElement('li', { id: config.selectors.launchListItem.substring(1) }, [launchButton]);
pageTools.appendChild(li);
}
});
console.log("RfX Closer: Script loaded (Refactored).");
})();
rcojhm2a0p0t7azrpsf33u14pfsosyf
User:Supertian8
2
166966
750460
750097
2026-07-08T00:18:33Z
Supertian8
67751
mnwwikt only
750460
wikitext
text/x-wiki
<div style="
position: relative;
position:absolute;
bottom: -1028px;
">FOOBAR</div>Test
<div class="global-recent-changes"
data-limit="100"
data-wiktionary="mnw"
data-rcnamespace="2|3|4|5">
</div>
pa7hwcd747rkl8b7l9y07fzvg8v4qcq
750461
750460
2026-07-08T00:20:09Z
Supertian8
67751
nowikt
750461
wikitext
text/x-wiki
<div style="
position: relative;
position:absolute;
bottom: -1028px;
">FOOBAR</div>Test
<div class="global-recent-changes"
data-limit="100"
data-wiktionary="mnw|no"
data-rcnamespace="2|3|4|5">
</div>
7n8azdfjyn09onygzbjrocq598ljv55
User:Ponor/wAwB-worker.js
2
171632
750462
749097
2026-07-08T03:33:01Z
Ponor
47975
Refactor JSON loader: use optional chaining and nullish coalescing for safe backward compatibility with older/partial project files.
750462
javascript
text/javascript
/*
* wAwB – An in-browser application for automated editing of wiki pages.
* Features: customizable regex or JavaScript search-and-replace rules,
* custom JavaScript pre/post-processing functions and function libraries,
* granular protection or targeting of different parts of wikitext,
* a full-fledged CodeMirror editor, and options to move, delete, and protect pages.
* Author: [[User:Ponor]]
* Documentation: [[User:Ponor/wAwB]]
* License: GNU General Public License (GPL)
*/
//<nowiki>
mw.loader.using([
'oojs-ui-core',
'oojs-ui-widgets',
'oojs-ui-windows',
'mediawiki.api',
'mediawiki.diff.styles',
'mediawiki.util',
'mediawiki.page.gallery.styles',
'oojs-ui.styles.icons-content',
'oojs-ui.styles.icons-interactions',
'oojs-ui.styles.icons-movement',
'oojs-ui.styles.icons-moderation',
'oojs-ui.styles.icons-editing-core',
'oojs-ui.styles.icons-editing-advanced'
]).then(function() {
// =====================================================================
// 1. STATE & CONFIGURATION
// =====================================================================
var SCRIPT_TIMEOUT_MS = window.wa_timeout || 5000;
var FETCH_SAFETY_LIMIT = window.wa_fetchLimit || 10000;
var APP_NAME = "wAwB";
var DO_TAG = false;
var SUMMARY_SUFFIX = window.wa_suffix || " [[:w:en:User:Ponor/wAwB| #wAwB]]";
var APP_VERSION = "0.7";
var DOC_URL = window.wa_docUrl || "https://en.wikipedia.org/wiki/User:Ponor/wAwB";
document.title = window.wa_editIn || "Edit in wAwB";
var PERMS = {
canSave: false,
allowBot: false,
saveDelay: 0
};
var IS_ADMIN = mw.config.get('wgUserGroups').includes('sysop');
var CAN_MOVE = IS_ADMIN || mw.config.get('wgUserGroups').includes('extendedmover') || mw.config.get('wgUserGroups').includes('filemover') || mw.config.get('wgUserGroups').includes('pagemover');
var WIKI = mw.config.get('wgDBname');
var ON_NOTIFY = window.wa_onNotification || 'warn'; // warn, stop, nothing
var ON_NOTIFY_FREQ = 30 * 1000; // every 30s
var SAVED_RUN = 0;
var SAVED_SESSION = 0;
var currentPageExists = false;
var isRunning = false;
var isFetching = false;
var currentTitle = null;
var currentVars = {};
var currentLibrary = {
name: null,
code: null
};
var originalWikitext = "";
var currentPageSummaryAppend = "";
var currentPageSummaryOverride = null;
var baseRevId = 0;
var currentViewMode = 'diff';
var autoSaveTimer = null;
var propNamesLoaded = false;
var hasNewSources = false;
var currentHeightMode = 1; // 0=25%, 1=45% (default), 2=72%
var heightValues = ['25%', '45%', '72%'];
// EXTERNAL RULES STATE
var wikiTypos = [];
var localTypos = [];
// LOADING FLAG
var isLoadingProject = false;
// NAMESPACE ALIASES
var nsIds = mw.config.get('wgNamespaceIds');
var catAliases = [],
fileAliases = [];
for (var key in nsIds) {
if (nsIds[key] === 14) catAliases.push(key.replace(/_/g, ' '));
if (nsIds[key] === 6) fileAliases.push(key.replace(/_/g, ' '));
}
catAliases.sort((a, b) => b.length - a.length);
fileAliases.sort((a, b) => b.length - a.length);
var REGEX_CAT_PFX = catAliases.map(mw.util.escapeRegExp).join('|');
var REGEX_FILE_PFX = fileAliases.map(mw.util.escapeRegExp).join('|');
// MASTER PROTECTION DEFINITIONS
var PROTECTION_DEFS = [{
id: 'nowiki',
isOn: true,
label: 'Nowiki: <nowiki>',
regex: /<nowiki>[\s\S]*?<\/nowiki>|<nowiki\s*\/>/gi
},
{
id: 'comments',
isOn: true,
label: 'Comments: <!' + '-- -->',
regex: new RegExp('<!' + '--[\\s\\S]*?--' + '>', 'g')
},
{
id: 'headers',
isOn: false,
label: 'Headers: == Title ==',
regex: /^==+[\s\S]+?==+\s*$/gm
},
{
id: 'templates',
isOn: false,
label: 'Templates: {{...}}',
open: '{{',
close: '}}',
species: null,
regex: null
},
{
id: 'tables',
isOn: false,
label: 'Tables: {|...|}',
open: '\n{|',
close: '\n|}',
regex: null
},
{
id: 'images',
isOn: false,
label: 'Images: [[File:...|...|...]]',
open: '[[',
close: ']]',
species: '(?:' + REGEX_FILE_PFX + ')\\s*:',
regex: null
},
{
id: 'refs',
isOn: true,
label: 'Refs: <ref...',
regex: /<ref[^>]*?\/>|<ref[^>]*?(?<!\/)>[\s\S]*?<\/ref>/gi
},
{
id: 'blocks',
isOn: false,
label: 'Blocks: math, gallery...',
regex: null
},
{
id: 'categories',
isOn: true,
label: 'Categories: [[Category:...]]',
regex: new RegExp('\\[\\[\\s*(' + REGEX_CAT_PFX + ')\\s*:[^\\]]+\\]\\]', 'giu')
},
{
id: 'files',
isOn: true,
label: 'File names: File:...',
regex: new RegExp('(?<=\\[\\[\\s*:?(:?' + REGEX_FILE_PFX + ')\\s*:)[^|\\]]+' + '|^\\s*(?:' + REGEX_FILE_PFX + ')\\s*:([^\\][}{|\\n]{1,150}\\.(?:svg|png|jpe?g|gif|tiff|webp|xcf|mp3|midi|ogg|webm|flac|wav|mpe?g|pdf|djv))', 'gmiu')
},
{
id: 'targets',
isOn: false,
label: 'Targets of [[...|',
regex: /(?<=\[\[:?)[^|\]]+?(?=\||\]\])/g
},
{
id: 'extlinks',
isOn: true,
label: 'External links: [...]',
regex: /(?<=\[)(https?:\/\/|ftps?:\/\/|mailto:)[^\]]+(?=\])/gi
},
{
id: 'urls',
isOn: true,
label: 'URLs: http...',
regex: /https?:\/\/[^\s<>[\]"'`()]+/gi
}
];
// =====================================================================
// 2. CSS STYLES
// =====================================================================
var styles = `
* { box-sizing: border-box; }
#wa-root { font-family: sans-serif; height: 100vh; width: 100vw; overflow: hidden; display: flex; font-size: 14px; }
#wa-left-panel { width: 400px; min-width: 400px; max-width: 400px; background: var(--background-color-base, #fff); border-right: 1px solid #c8ccd1; display: flex; flex-direction: column; z-index: 10; overflow-x: hidden; }
#wa-left-panel h3 { color: #3f6fcf; text-align: center; margin: 12px 0 0 0; }
#wa-username { color: #3f6fcf; text-align: center; margin: 2px 0; font-size: 92%; }
#wa-content-area { flex: 1; padding: 10px 10px 100px 10px; overflow-y: auto; overflow-x: hidden; }
#wa-right-panel { flex: 1; display: flex; flex-direction: column; height: 100%; background: var(--background-color-interactive, #eaecf0); overflow: hidden; }
#wa-visual-output { flex: 0 0 45%; min-height: 0; overflow-y: auto; background: var(--background-color-base, #fff); padding: 20px; border-bottom: 1px solid #c8ccd1; }
.wa-editor-header { flex: 0 0 40px; min-height: 40px; padding: 0 10px; background: var(--background-color-interactive-subtle, #f8f9fa); border-bottom: 1px solid #c8ccd1; display: flex; gap: 25px; justify-content: space-between; align-items: center; z-index: 10; }
.wa-editor-header.wa-dirty { background: var(--background-color-warning-subtle, #fdf2d5); border-bottom: 1px solid #e6a700; }
@keyframes wa-header-pulse { 0% { background-color: var(--background-color-destructive-subtle, #fee7e6); } 50% { background-color: var(--background-color-interactive-subtle, transparent); } 100% { background-color: var(--background-color-destructive-subtle, #fee7e6); } }
.wa-editor-header.wa-header-alert { border-bottom: 2px solid var(--border-color-destructive, #b32424) !important; animation: wa-header-pulse 1s 60 ease-in-out forwards !important; }
.wa-header-left { flex: 1; display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.wa-header-right { flex: 0 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--color-placeholder, #72777d); font-size: 0.9em; }
.wa-title-link { font-weight: bold; font-size: 1.1em; color: var(--color-progressive--focus, #36c) !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 40%; }
.wa-title-link:hover { text-decoration: underline; }
#wa-status-indicator { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background-color: #00af89; cursor: help; transition: background-color 0.2s; margin-right: 2px; }
#wa-status-indicator.wa-status-working { background-color: #36c; animation: wa-pulse-blue 1.5s infinite; }
#wa-status-indicator.wa-status-error { background-color: #bf3c2c; }
@keyframes wa-pulse-blue { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.wa-header-sep { border-left: 1px solid #ccc; height: 16px; flex-shrink: 0; margin: 0 2px; }
#wa-summary-preview { flex-grow: 1; color: #d00; font-style: italic; white-space: nowrap; text-overflow: ellipsis; overflow-x: auto; background: transparent; border: none; outline: none; box-shadow: none; min-width: 50px; padding: 2px 5px; scrollbar-width: none; -ms-overflow-style: none; font-size: 1em; }
#wa-summary-preview::-webkit-scrollbar { display: none; }
#wa-summary-preview:hover { background: rgba(0, 0, 0, 0.05); cursor: text; }
#wa-summary-preview:focus { background: #fff; }
.wa-info-container { margin-right: 10px; }
.wa-tools-container { display: flex; align-items: center; gap: 2px; }
.wa-resize-container { display: flex; flex-direction: column; justify-content: center; height: 100%; margin-left: 10px; padding-left: 5px; border-left: 1px solid #ccc; }
.wa-resize-btn { cursor: pointer; color: #72777d; user-select: none; width: 20px; height: 14px; display: flex; align-items: center; justify-content: center; transition: color 0.1s ease-in-out; }
.wa-resize-btn:hover { color: #36c; }
.wa-resize-btn.wa-resize-disabled { color: #ccc; cursor: default; }
#wa-proc-header { margin-top: 15px !important; border-bottom: none !important; cursor: default; }
#wa-proc-title { font-weight: bold; padding: 10px; display: block; }
#wa-proc-content { padding: 0 10px 15px 10px; }
#wa-editor-area { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--background-color-base, #fff); position: relative; overflow: hidden; }
#wa-editor-textarea { flex: 1; height: 100%; font-family: monospace; font-size: 13px; border: none; outline: none; padding: 10px; resize: none; width: 100%; }
.cm-editor { height: 100% !important; flex: 1; }
.wa-section-header { margin-top: 12px; border-bottom: 1px solid #eee; width: 100%; display: block; margin-left: 0 !important; }
#wa-content-area .wa-section-header:first-child, #wa-content-area .wa-section-header.oo-ui-buttonElement-frameless:first-child { margin-top: 0; margin-left: 0 !important; }
.wa-section-header > .oo-ui-buttonElement-button { text-align: left; padding: 10px 10px !important; margin: 0 !important; display: block; width: 100%; position: relative; border-left: 3px solid #3f6fcf !important; border-radius: 3px !important; background-color: transparent !important; }
.wa-section-header > .oo-ui-buttonElement-button:focus { outline: none !important; }
.wa-section-header .oo-ui-labelElement-label { font-weight: bold; padding-left: 0 !important; margin-left: 0 !important; color: var(--color-base, #202122); }
.wa-section-header .oo-ui-indicatorElement-indicator { position: absolute; right: 10px !important; top: 50%; margin-top: -10px; left: auto !important; width: 20px; }
.wa-foldable-content { display: none; padding: 10px 0; }
.wa-source-options { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; border-top: none; padding: 8px; margin-bottom: 10px; font-size: 0.9em; }
.wa-opt-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 5px; }
.wa-opt-label { font-weight: bold; width: 100%; margin-bottom: 5px; color: var(--color-base, #202122); }
.wa-opt-row > div { margin-top: 8px !important; margin-bottom: 8px !important; }
.wa-rule-row { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; padding: 8px; margin-bottom: 8px; border-radius: 4px; display: flex; align-items: stretch; transition: background-color 0.3s; }
.wa-rule-row.wa-highlight { background-color: var(--background-color-interactive, #eaecf0); border-color: #36c; }
.wa-rule-controls { display: flex; flex-direction: column; justify-content: center; gap: 0px; padding-right: 4px; border-right: 1px solid #eee; margin-right: 8px; }
.wa-rule-btn { margin: 0 !important; margin-right: 0 !important; margin-left: 0 !important; }
.wa-rule-btn > .oo-ui-buttonElement-button { margin: 0 !important; }
.wa-rule-content { flex: 1; min-width: 0; }
.wa-rule-opt-row { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
#wa-ns-selector { width: 100%; margin-bottom: 10px; font-family: sans-serif; font-size: 0.9em; border: 1px solid #a2a9b1; }
.wa-lib-dialog > .oo-ui-window-frame { width: 80vw !important; max-width: none !important; height: 80vh !important; max-height: none !important; }
.wa-lib-editorwrapper { height: 100%; border: 1px solid #c8ccd1; position: relative; boxSizing: border-box; }
.wa-page-list-raw textarea { font-family: monospace; font-size: 0.9em; white-space: pre; overflow-x: auto; }
.wa-list-running textarea { background-color: var(--background-color-neutral-subtle, #f8f8f8) !important; color: var(--color-base, #202122) !important; }
.wa-grid-container { display: flex; gap: 6px; margin-bottom: 10px; }
.wa-grid-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wa-grid-col .oo-ui-buttonWidget { width: 100%; }
.wa-grid-col .oo-ui-buttonWidget .oo-ui-buttonElement-button { width: 100%; text-align: center; justify-content: center; }
.wa-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 4px; border-bottom: 1px solid #eee; padding-bottom: 4px; margin-bottom: 4px; }
.wa-list-counter { margin-right: auto; font-weight: bold; color: var(--color-subtle, #54595d); font-size: 0.9em; padding-left: 5px; }
.wa-project-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px; margin: 8px 0; justify-content: center; }
.wa-project-bar .oo-ui-buttonElement-button { padding-left: 36px !important; padding-right: 12px !important; font-size: 0.9em; }
.wa-project-bar .oo-ui-iconElement-icon { left: 10px !important; }
.wa-settings-header { font-weight: bold; color: var(--color-subtle, #54595d); margin-bottom: 8px; display: block; text-transform: uppercase; font-size: 0.9em; }
.wa-setting-row { display: flex; align-items: center; margin-bottom: 6px; }
.wa-bot-row { background: var(--background-color-success-subtle, #dff2eb); border: 1px solid #a5d6a7; padding: 8px; margin-bottom: 10px; border-radius: 4px; display: flex; align-items: center; justify-content: flex-start; gap: 15px; }
table.diff { width: 100%; font-family: "Adwaita Mono", "Courier New", monospace }
table.diff td { vertical-align: top; }
table.diff tr:hover td { background-color: var(--background-color-progressive-subtle--hover, #d9e2ff); cursor: pointer; }
@keyframes wa-pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); border-color: #ff0000; } 70% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); border-color: #ff0000; } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); border-color: #ff0000; } }
.wa-summary-warning input { animation: wa-pulse-red 1s infinite; border-color: #ff0000 !important; }
`;
$('<style>').text(styles).appendTo('head');
$('body').empty();
// =====================================================================
// 3. HELPER FUNCTIONS
// =====================================================================
function checkPermissions() {
return new Promise(function(resolve) {
var api = new mw.Api();
var projectNs = mw.config.get('wgFormattedNamespaces')[4];
var checkTitles = {
'permissions': projectNs + ':AutoWikiBrowser/CheckPageJSON',
'tag': 'MediaWiki:Tag-wAwB'
};
api.get({
action: 'query',
prop: 'revisions',
titles: Object.values(checkTitles).join('|'),
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(data) {
var pagePerms = data.query.pages.find(p => p.title === checkTitles['permissions']);
var pageTag = data.query.pages.find(p => p.title === checkTitles['tag']);
DO_TAG = pageTag.missing === undefined;
var userName = mw.config.get('wgUserName');
var userGroups = mw.config.get('wgUserGroups');
var isSysop = userGroups.includes('sysop');
if (!pagePerms.missing) {
try {
var content = pagePerms.revisions[0].slots.main.content;
var json = JSON.parse(content);
var inEnabledUsers = json.enabledusers && json.enabledusers.includes(userName);
var inEnabledBots = json.enabledbots && json.enabledbots.includes(userName);
var isBotGroup = userGroups.includes('bot');
var canSave = inEnabledUsers || inEnabledBots || isSysop;
var allowBot = inEnabledBots && isBotGroup;
resolve({
canSave: canSave,
allowBot: allowBot,
saveDelay: 0
});
} catch (e) {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
} else {
var editCount = mw.config.get('wgUserEditCount');
if (editCount > 500) resolve({
canSave: true,
allowBot: false,
saveDelay: 20000
});
else resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
}).catch(function() {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
});
});
}
function getUserCode(widget, globalName) {
var val = widget.getValue().trim();
if (!val || val.startsWith('// Enter')) {
if (window[globalName] && typeof window[globalName] === 'function') {
var s = window[globalName].toString();
return s.substring(s.indexOf('{') + 1, s.lastIndexOf('}'));
}
return "";
}
if (val.startsWith('function')) {
return val.substring(val.indexOf('{') + 1, val.lastIndexOf('}'));
}
return val;
}
function normalizeLine(line) {
if (!line) return null;
// Pass through comments/STOP commands (trimmed)
if (line.trim().startsWith('####')) return line.trim();
// Handle Title|Variables
var parts = line.split('|');
var title = parts[0].trim();
if (!title) return null; // Skip if title is empty
// Reassemble: Clean Title + Original Variables (preserving whitespace)
var rest = parts.length > 1 ? parts.slice(1).join('|') : null;
return title + (rest !== null ? '|' + rest : '');
}
function getNormalizedList(text) {
if (!text) return [];
return text.split('\n')
.map(normalizeLine)
.filter(function(l) {
return l !== null;
});
}
function getDeduplicatedList(text) {
if (!text) return [];
var seen = new Set();
var out = [];
var lines = text.split('\n');
for (var i = 0; i < lines.length; i++) {
var clean = normalizeLine(lines[i]);
if (clean && !seen.has(clean)) {
seen.add(clean);
out.push(clean);
}
}
return out;
}
function parseTypoContent(content) {
if (!content) return [];
try {
var $wrapper = $('<body>').html(content);
var rules = [];
$wrapper.find('Typo:not([disabled])').each(function() {
var $t = $(this);
var find = $t.attr('find');
var replace = $t.attr('replace');
if (find && replace !== undefined) {
rules.push({
find: find,
replace: replace,
regex: true,
flags: 'gmu',
enabled: true,
isFunc: false
});
}
});
return rules;
} catch (e) {
return [];
}
}
function updateSummaryPreview(baseText) {
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : (baseText || "");
var finalSum = base + (currentPageSummaryAppend || "");
var previewText = finalSum ? injectVars(finalSum) : '';
$('#wa-summary-preview').val(previewText);
}
function injectVars(text) {
if (!text) return "";
return text.replace(/\$x([A-Z]|x)/g, function(match) {
return currentVars[match] || match; // Swap it, or leave it alone if undefined
});
}
// =====================================================================
// 4. UI CONSTRUCTION
// =====================================================================
checkPermissions().then(function(pState) {
PERMS = pState;
var $main = $('<div>').attr('id', 'wa-root').appendTo('body');
var $left = $('<div>').attr('id', 'wa-left-panel').appendTo($main);
$left.append($('<h3>').append($('<a>').attr('href', DOC_URL).attr('target', '_blank').text(APP_NAME).css({
'text-decoration': 'none',
'color': 'inherit'
})));
$left.append($('<div>').attr('id', 'wa-username').append($('<a>').attr('href', mw.util.getUrl('Special:Contributions/' + mw.config.get('wgUserName'))).attr('target', '_blank').text('User: ' + mw.config.get('wgUserName')).css({
'text-decoration': 'none',
'color': 'inherit'
})));
var btnSaveProj = new OO.ui.ButtonWidget({
icon: 'download',
label: 'Save project',
framed: false,
flags: 'progressive'
});
var btnLoadProj = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load project',
framed: false
});
var $projBar = $('<div>').addClass('wa-project-bar').append(btnSaveProj.$element, btnLoadProj.$element);
$left.append($projBar);
var $fileInput = $('<input type="file" accept=".json">').hide().appendTo('body');
var $content = $('<div>').attr('id', 'wa-content-area').appendTo($left);
var $right = $('<div>').attr('id', 'wa-right-panel').appendTo($main);
var $editorHeader = $('<div>').addClass('wa-editor-header').appendTo($right);
var $headerLeft = $('<div>').addClass('wa-header-left').appendTo($editorHeader);
var $statusIndicator = $('<span>').attr('id', 'wa-status-indicator').attr('title', 'Ready').appendTo($headerLeft);
var $titleLink = $('<a>').addClass('wa-title-link').text('Page content').attr('target', '_blank').appendTo($headerLeft);
$('<span>').addClass('wa-header-sep').appendTo($headerLeft);
var $summaryPreview = $('<input type="text">').attr('id', 'wa-summary-preview').attr('autocomplete', 'off').appendTo($headerLeft);
var $headerRight = $('<div>').addClass('wa-header-right').appendTo($editorHeader);
var $infoContainer = $('<span>').addClass('wa-info-container').appendTo($headerRight);
var $toolsContainer = $('<div>').addClass('wa-tools-container').appendTo($headerRight);
var $resizeContainer = $('<div>').addClass('wa-resize-container').appendTo($headerRight);
var $adminTools = $('<div>').addClass('wa-admin-tools').hide().appendTo($toolsContainer);
// Wide chevron SVGs
var svgUp = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 10 L12 2 L22 10" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var svgDown = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 2 L12 10 L22 2" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var $btnSizeUp = $('<div>').addClass('wa-resize-btn').html(svgUp).attr('title', 'Decrease view size');
var $btnSizeDown = $('<div>').addClass('wa-resize-btn').html(svgDown).attr('title', 'Increase view size');
$resizeContainer.append($btnSizeUp, $btnSizeDown);
function setPanelHeight(modeIndex) {
currentHeightMode = modeIndex;
if (currentHeightMode < 0) currentHeightMode = 0;
if (currentHeightMode > 2) currentHeightMode = 2;
$('#wa-visual-output').css('flex-basis', heightValues[currentHeightMode]);
$btnSizeUp.toggleClass('wa-resize-disabled', currentHeightMode === 0);
$btnSizeDown.toggleClass('wa-resize-disabled', currentHeightMode === 2);
}
$btnSizeUp.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode - 1);
});
$btnSizeDown.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode + 1);
});
setPanelHeight(1);
if (CAN_MOVE) {
var btnAdminMove = new OO.ui.ButtonWidget({
icon: 'move',
title: 'Move page to $xA',
disabled: true,
framed: false
});
$adminTools.append(btnAdminMove.$element).show();
}
if (IS_ADMIN) {
var btnAdminDel = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Delete page',
disabled: true,
framed: false
});
var btnAdminProt = new OO.ui.ButtonWidget({
icon: 'lock',
title: 'Protect page',
disabled: true,
framed: false
});
$adminTools.append(btnAdminDel.$element, btnAdminProt.$element).show();
}
var btnManualEdit = new OO.ui.ButtonWidget({
icon: 'edit',
title: 'Open in manual editor',
framed: false,
disabled: true
});
var btnWatch = new OO.ui.ButtonWidget({
icon: 'star',
title: 'Watch this page',
framed: false,
disabled: true,
accessKey: 'w'
});
$toolsContainer.append(btnManualEdit.$element, btnWatch.$element);
var $visualOut = $('<div>').attr('id', 'wa-visual-output').html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready to start...</div>').prependTo($right);
var $editorArea = $('<div>').attr('id', 'wa-editor-area').appendTo($right);
var $textArea = $('<textarea>').attr('id', 'wa-editor-textarea').attr('placeholder', 'Page text will appear here...').appendTo($editorArea);
function setStatus(msg, type) {
if (!msg) msg = "Ready";
$statusIndicator.attr('title', msg).removeClass('wa-status-error wa-status-working');
if (type === 'error') $statusIndicator.addClass('wa-status-error');
if (type === 'working') $statusIndicator.addClass('wa-status-working');
}
// EDITOR OBJECT
var Editor = {
mode: 'textarea',
cmInstance: null,
init: function() {
var self = this;
mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.mode.mediawiki']).then(function(require) {
try {
self.cmInstance = new(require('ext.CodeMirror'))($textArea[0], (require('ext.CodeMirror.mode.mediawiki')).mediawiki());
self.cmInstance.initialize();
self.mode = 'codemirror';
} catch (e) {
console.error("CM Error", e);
}
}).catch(function(err) {
console.error("CM Load Error:", err);
});
$textArea.on('input', updateDirtyState);
},
getValue: function() {
return (this.mode === 'codemirror' && this.cmInstance) ? this.cmInstance.view.state.doc.toString() : $textArea.val();
},
setValue: function(text) {
$textArea.val(text);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.dispatch({
changes: {
from: 0,
to: this.cmInstance.view.state.doc.length,
insert: text
}
});
} else {
$textArea[0].dispatchEvent(new Event('input'));
}
},
setDisabled: function(d) {
$textArea.prop('disabled', d);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.contentDOM.contentEditable = !d;
$($textArea).parent().find('.cm-editor').css('opacity', d ? 0.5 : 1);
}
},
scrollToLine: function(n) {
if (isNaN(n)) return;
if (this.mode === 'codemirror' && this.cmInstance) {
var v = this.cmInstance.view;
var l = v.state.doc.line(n);
v.dispatch({
effects: v.constructor.scrollIntoView(l.from, {
y: 'center'
}),
selection: {
anchor: l.from
}
});
v.focus();
}
}
};
var WorkerEngine = {
activeWorker: null,
workerURL: null,
currentLibCode: null,
timeoutTimer: null,
initWorker: function(libCode) {
this.destroy(); // Clean up existing if any
this.currentLibCode = libCode || "";
var scriptContent = this.currentLibCode + "\n\n" + `
self.onmessage = async function(e) {
try {
var data = e.data;
var inputs = data.texts || [data.text];
var vars = data.vars;
var outputs = [];
// Helper to construct async functions dynamically
var AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
function inject(str) {
if (!str) return "";
return str.replace(/\\$x([A-Z]|x)/g, function(m) { return vars[m] || ""; });
}
// Returns a Promise and handles 'await' inside user code
async function execUserFunc(code, currentText, currentVars, sharedObj) {
if (!code || code.trim() === "") return currentText;
try {
var func = new AsyncFunction('text', 'vars', 'shared', code);
var res = await func(currentText, currentVars, sharedObj);
if (res && typeof res === 'object' && res.skip) {
return { _skipSignal: true, reason: res.reason || 'Script-requested skip' };
}
return (res !== undefined) ? res : currentText;
} catch (err) {
throw err; // or: return currentText
}
}
var shared = {}; // Shared context for this page
for (var i = 0; i < inputs.length; i++) {
var text = inputs[i];
// 1. Pre-Process
var preRes;
if (data.preCode && data.preCode.trim() !== "") {
preRes = await execUserFunc(data.preCode, text, vars, shared);
} else if (typeof wAwB_Pre === 'function') {
try {
preRes = await wAwB_Pre(text, vars, shared);
if (preRes && typeof preRes === 'object' && preRes.skip) {
preRes = { _skipSignal: true, reason: preRes.reason || 'Script-requested skip' };
}
} catch (err) { preRes = text; }
} else {
preRes = text;
}
if (preRes && preRes._skipSignal) {
self.postMessage({ skipped: true, reason: preRes.reason });
return;
}
text = (preRes !== undefined) ? preRes : text;
// 2. Rules Processing
if (data.rules && data.rules.length > 0) {
data.rules.forEach(function(rule) {
var findStr = inject(rule.find);
if (!findStr) return;
if (rule.isFunc) {
try {
var userFunc = new Function('match', 'groups', 'vars', 'shared', rule.replace);
text = text.replace(new RegExp(findStr, (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '')), function(...args) {
var match = args[0];
var groups = args.slice(1, -2);
try {
var res = userFunc(match, groups, vars, shared);
return res !== undefined ? res : match;
} catch (err) { return match; }
});
} catch (e) {}
} else {
var repStr = inject(rule.replace).replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
if (rule.regex) {
try {
var flags = (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '');
text = text.replace(new RegExp(findStr, flags), repStr);
} catch (e) {}
} else {
var finalFind = findStr.replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
text = text.split(finalFind).join(repStr);
}
}
});
}
// 3. Post-Process
var postRes;
if (data.postCode && data.postCode.trim() !== "") {
postRes = await execUserFunc(data.postCode, text, vars, shared);
} else if (typeof wAwB_Post === 'function') {
try {
postRes = await wAwB_Post(text, vars, shared);
if (postRes && typeof postRes === 'object' && postRes.skip) {
postRes = { _skipSignal: true, reason: postRes.reason || 'Script-requested skip' };
}
} catch (err) { postRes = text; }
} else {
postRes = text;
}
if (postRes && postRes._skipSignal) {
self.postMessage({ skipped: true, reason: postRes.reason });
return;
}
text = (postRes !== undefined) ? postRes : text;
outputs.push(text);
}
self.postMessage({ success: true, texts: outputs, summaryAppend: shared.summaryAppend, summaryOverride: shared.summaryOverride });
} catch (err) { self.postMessage({ success: false, error: err.toString() }); }
};
`;
var blob = new Blob([scriptContent], {
type: 'application/javascript'
});
this.workerURL = URL.createObjectURL(blob);
this.activeWorker = new Worker(this.workerURL);
},
run: function(payload) {
var self = this;
return new Promise(function(resolve, reject) {
// Re-init if no worker exists, or if the user changed the library code
if (!self.activeWorker || self.currentLibCode !== (payload.libraryCode || "")) {
self.initWorker(payload.libraryCode);
}
if (self.timeoutTimer) clearTimeout(self.timeoutTimer);
self.timeoutTimer = setTimeout(function() {
self.destroy(); // Assassinate the stuck worker
reject("Script timed out (" + SCRIPT_TIMEOUT_MS + "ms).");
}, SCRIPT_TIMEOUT_MS);
self.activeWorker.onmessage = function(e) {
clearTimeout(self.timeoutTimer);
if (e.data.skipped) resolve({
skipped: true,
reason: e.data.reason
});
else if (e.data.success) resolve({
success: true,
texts: e.data.texts,
summaryAppend: e.data.summaryAppend,
summaryOverride: e.data.summaryOverride
});
else reject(e.data.error);
};
self.activeWorker.postMessage(payload);
});
},
destroy: function() {
if (this.activeWorker) {
this.activeWorker.terminate();
this.activeWorker = null;
}
if (this.workerURL) {
URL.revokeObjectURL(this.workerURL);
this.workerURL = null;
}
if (this.timeoutTimer) {
clearTimeout(this.timeoutTimer);
this.timeoutTimer = null;
}
}
};
var PageProtector = {
store: [],
getKey: function() {
var id = this.store.length.toString();
var p = "";
for (var i = 0; i < id.length; i++) {
p += String.fromCharCode(0xE010 + parseInt(id[i]));
}
return '\uE000' + p + '\uE001';
},
protect: function(text, mode, config, templateSpecies = null) {
this.store = [];
var self = this;
var safeRep = function(t, r) {
return t.replace(r, function(m) {
if (!m) return m;
var key = self.getKey();
self.store.push(m);
return key;
});
};
var shouldProcess = function(id) {
if (mode === 'target') return config === id;
return config[id] === true;
};
var matchedBrackets = function(text, op, cl, species = '') {
var newText = "",
depth = 0,
start = 0,
cursor = 0;
var speciesRegex = species ? new RegExp(species, 'iu') : null;
for (var i = 0; i < text.length; i++) {
if (text[i] === op[0] && text.slice(i, i + op.length) === op) {
if (depth === 0) start = i;
depth++;
i += op.length - 1;
} else if (text[i] === cl[0] && text.slice(i, i + cl.length) === cl) {
if (depth > 0) {
depth--;
if (depth === 0) {
var chunk = text.substring(start, i + cl.length);
if (!speciesRegex || speciesRegex.test(chunk)) {
var key = self.getKey();
self.store.push(chunk);
newText += text.substring(cursor, start) + key;
} else {
newText += text.substring(cursor, i + cl.length);
}
cursor = i + cl.length;
}
i += cl.length - 1;
}
}
}
newText += text.substring(cursor);
return newText;
};
PROTECTION_DEFS.forEach(function(def) {
if (shouldProcess(def.id)) {
if (def.id === 'blocks') {
['math', 'pre', 'source', 'syntaxhighlight', 'code', 'gallery'].forEach(t => text = safeRep(text, new RegExp('<' + t + '[^>]*?>[\\s\\S]*?<\\/' + t + '>|<' + t + '[^>]*?/>', 'gi')));
} else if (['templates', 'tables', 'images'].includes(def.id)) {
var activeSpecies = (def.id === 'templates') ? templateSpecies : def.species;
text = matchedBrackets(text, def.open, def.close, activeSpecies || '');
} else if (def.regex) {
text = safeRep(text, def.regex);
}
}
});
return text;
},
restore: function(text) {
var self = this;
var loop = 100;
while (/(\uE000[\uE010-\uE019]+\uE001)/.test(text) && loop > 0) {
text = text.replace(/\uE000([\uE010-\uE019]+)\uE001/g, function(m, d) {
var id = "";
for (var i = 0; i < d.length; i++) id += (d.charCodeAt(i) - 0xE010).toString();
return self.store[parseInt(id, 10)] || m;
});
loop--;
}
return text;
}
};
var accordionRegistry = [];
function addSection(title, $inner) {
var btn = new OO.ui.ButtonWidget({
label: title,
indicator: 'down',
framed: false,
classes: ['wa-section-header']
});
var box = $('<div>').addClass('wa-foldable-content').append($inner);
var sectionObj = {
btn: btn,
box: box,
label: title
};
accordionRegistry.push(sectionObj);
btn.on('click', function() {
var isOpening = !box.is(':visible');
if (isOpening) {
accordionRegistry.forEach(function(sec) {
if (sec !== sectionObj) {
sec.box.hide();
sec.btn.setIndicator('down');
}
});
}
box.toggle();
btn.setIndicator(box.is(':visible') ? 'up' : 'down');
});
$content.append(btn.$element, box);
return sectionObj;
}
// WIDGETS
var srcSelect = new OO.ui.DropdownInputWidget({
options: [{
data: 'cat',
label: 'Category'
}, {
data: 'linksto',
label: 'Pages linking to...'
}, {
data: 'linkson',
label: 'Links on page...'
}, {
data: 'prefix',
label: 'Pages with prefix...'
}, {
data: 'watchlist',
label: 'Watchlist'
}, {
data: 'search',
label: 'Wiki search'
}, {
data: 'usercontribs',
label: 'User contributions'
}, {
data: 'pageswithprop',
label: 'Pages with property'
}]
});
var srcInput = new OO.ui.TextInputWidget({
placeholder: 'Category...'
});
var now = new Date();
var today = now.toISOString().split('T')[0];
var srcInputUser = new OO.ui.TextInputWidget({
placeholder: 'Username'
});
var srcInputStartDate = new OO.ui.TextInputWidget({
value: today + 'T00:00:00',
placeholder: 'ISO start date'
});
var srcInputEndDate = new OO.ui.TextInputWidget({
value: today + 'T23:59:59',
placeholder: 'ISO end date'
});
var srcDropProp = new OO.ui.DropdownInputWidget({
options: []
});
var $optContainer = $('<div>').addClass('wa-source-options').hide();
var $optCat = $('<div>').hide();
var $optUser = $('<div>').hide();
var $optProp = $('<div>').hide();
var chkCatPages = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkCatSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkCatFile = new OO.ui.CheckboxInputWidget({
selected: false
});
$optCat.append($('<div>').addClass('wa-opt-label').text('Include:'), new OO.ui.FieldLayout(chkCatPages, {
label: 'Pages',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatSub, {
label: 'Subcats',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatFile, {
label: 'Files',
align: 'inline'
}).$element);
$optUser.append(new OO.ui.FieldLayout(srcInputUser, {
label: 'User',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputStartDate, {
label: 'Start (Older)',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputEndDate, {
label: 'End (Newer)',
align: 'top'
}).$element);
$optProp.append(new OO.ui.FieldLayout(srcDropProp, {
label: 'Property',
align: 'top'
}).$element);
var $optLinks = $('<div>').hide();
var chkLinkWiki = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkLinkTrans = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkLinkImg = new OO.ui.CheckboxInputWidget({
selected: false
});
var dropLinkRedir = new OO.ui.DropdownInputWidget({
options: [{
data: 'nonredirects',
label: 'No redirects'
}, {
data: 'all',
label: 'Both'
}, {
data: 'redirects',
label: 'Redirects only'
}]
});
var chkLinkToRedir = new OO.ui.CheckboxInputWidget({
selected: false
});
$optLinks.append($('<div>').addClass('wa-opt-label').text('What to include:'), $('<div>').addClass('wa-opt-row').append(new OO.ui.FieldLayout(chkLinkWiki, {
label: 'Wikilinks',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkTrans, {
label: 'Transclusions',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkImg, {
label: 'File usage',
align: 'inline'
}).$element), $('<div>').addClass('wa-opt-label').text('Redirects:'), dropLinkRedir.$element, new OO.ui.FieldLayout(chkLinkToRedir, {
label: 'Include links to redirects',
align: 'inline'
}).$element);
$optContainer.append($optCat, $optLinks, $optUser, $optProp);
var queryCache = {};
var lastMode = 'cat';
srcSelect.on('change', function(newMode) {
if (!isLoadingProject) {
if (lastMode !== 'watchlist' && lastMode !== 'usercontribs' && lastMode !== 'pageswithprop') {
queryCache[lastMode] = srcInput.getValue();
}
}
$optContainer.hide();
$optCat.hide();
$optLinks.hide();
$optUser.hide();
$optProp.hide();
srcInput.setDisabled(false).$element.show();
if (newMode === 'cat') {
$optContainer.show();
$optCat.show();
} else if (newMode === 'linksto') {
$optContainer.show();
$optLinks.show();
} else if (newMode === 'usercontribs') {
$optContainer.show();
$optUser.show();
srcInput.setDisabled(true).$element.hide();
} else if (newMode === 'pageswithprop') {
$optContainer.show();
$optProp.show();
srcInput.setDisabled(true).$element.hide();
if (!propNamesLoaded) {
new mw.Api().get({
action: 'query',
list: 'pagepropnames',
ppnlimit: 'max'
}).then(function(d) {
if (d.query && d.query.pagepropnames) {
srcDropProp.setOptions(d.query.pagepropnames.map(p => ({
data: p.propname,
label: p.propname
})));
propNamesLoaded = true;
}
});
}
}
if (newMode === 'watchlist') {
srcInput.setValue('');
srcInput.setDisabled(true);
srcInput.$input.attr('placeholder', '(No query needed)');
} else if (newMode !== 'usercontribs' && newMode !== 'pageswithprop') {
srcInput.setValue(queryCache[newMode] || '');
var ph = 'Query...';
if (newMode === 'cat') ph = 'Category name';
if (newMode === 'search') ph = 'Search query...';
if (newMode === 'prefix') ph = 'Page prefix...';
if (newMode === 'linksto') ph = 'Pages linking to this title...';
if (newMode === 'linkson') ph = 'Get links from this page...';
srcInput.$input.attr('placeholder', ph);
}
lastMode = newMode;
});
srcSelect.emit('change', srcSelect.getValue());
var $nsSelect = $('<select>').attr('id', 'wa-ns-selector').attr('multiple', 'multiple').attr('size', '8');
var nsMap = mw.config.get('wgFormattedNamespaces');
for (var id in nsMap) {
if (parseInt(id) >= 0) $nsSelect.append($('<option>').val(id).text(id + ': ' + (nsMap[id] || '(Main)')));
}
$nsSelect.val(['0']);
var btnAdd = new OO.ui.ButtonWidget({
label: 'Add to list',
icon: 'add',
flags: ['primary', 'progressive']
});
var $btnRow = $('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-top': '10px'
});
var $fetchStatus = $('<span>').css({
'margin-right': '10px',
'color': '#888',
'font-size': '0.9em',
'align-self': 'center'
}).hide();
$btnRow.append($fetchStatus, btnAdd.$element);
addSection('Source', $('<div>').append(new OO.ui.FieldLayout(srcSelect, {
label: 'Mode',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInput, {
label: 'Query',
align: 'top'
}).$element, $optContainer, $('<div>').text('Namespaces:').css({
'font-weight': 'bold',
'margin-top': '5px'
}), $nsSelect, $btnRow));
var redirMode = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'edit',
label: 'Edit the redirect page (Default)'
}), new OO.ui.RadioOptionWidget({
data: 'follow',
label: 'Follow redirect (Edit target)'
}), new OO.ui.RadioOptionWidget({
data: 'skip',
label: 'Skip redirects'
})]
});
redirMode.selectItemByData('edit');
var radSkipExist = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'none',
label: 'Process all'
}), new OO.ui.RadioOptionWidget({
data: 'missing',
label: 'Skip if page does not exist'
}), new OO.ui.RadioOptionWidget({
data: 'exists',
label: 'Skip if page exists'
})]
});
radSkipExist.selectItemByData('none');
var chkSkipNoChange = new OO.ui.CheckboxInputWidget({
selected: false
});
var inpSkipContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if FOUND'
});
var togSkipContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipNotContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if MISSING'
});
var togSkipNotContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if in: Category1|Category2'
});
var inpSkipNotCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if NOT in: Category1|Category2'
});
var $settingsPanel = $('<div>')
.append($('<span>').addClass('wa-settings-header').text('Redirects'))
.append(redirMode.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Skip logic'))
.append(new OO.ui.FieldLayout(chkSkipNoChange, {
label: 'Skip if no changes made',
align: 'inline'
}).$element.css('margin-bottom', '8px'))
.append(radSkipExist.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Content filters'))
.append($('<div>').addClass('wa-setting-row').append(inpSkipContains.$element.css('flex', 1), togSkipContainsRegex.$element.css('margin-left', '5px')))
.append($('<div>').addClass('wa-setting-row').append(inpSkipNotContains.$element.css('flex', 1), togSkipNotContainsRegex.$element.css('margin-left', '5px')))
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Category filters'))
.append(new OO.ui.FieldLayout(inpSkipCategories, {
label: 'Blacklist',
align: 'top'
}).$element)
.append(new OO.ui.FieldLayout(inpSkipNotCategories, {
label: 'Whitelist',
align: 'top'
}).$element);
addSection('Skip', $settingsPanel);
var dropProtMode = new OO.ui.DropdownInputWidget({
options: [{
data: 'protect',
label: 'Protect (Exclude)'
}, {
data: 'target',
label: 'Target (Edit Matches Only)'
}]
});
var inpTemplateFilter = new OO.ui.TextInputWidget({
placeholder: 'Regex: infobox rail line|railway'
});
var $templateFilterLayout = new OO.ui.FieldLayout(inpTemplateFilter, {
label: 'Template filter',
align: 'top'
});
var $protList = $('<div>');
var protCheckboxes = {};
PROTECTION_DEFS.forEach(function(def) {
var chk = new OO.ui.CheckboxInputWidget({
selected: def.isOn
});
protCheckboxes[def.id] = chk;
$protList.append(new OO.ui.FieldLayout(chk, {
label: def.label,
align: 'inline'
}).$element);
});
var targetRadioItems = PROTECTION_DEFS.map(function(def) {
return new OO.ui.RadioOptionWidget({
data: def.id,
label: def.label
});
});
var radTargetSet = new OO.ui.RadioSelectWidget({
items: targetRadioItems
});
var $targetList = $('<div>').hide().append(radTargetSet.$element);
dropProtMode.on('change', function(mode) {
if (mode === 'protect') {
$protList.show();
$targetList.hide();
} else {
$protList.hide();
$targetList.show();
}
});
addSection('Protection', $('<div>').addClass('wa-source-options')
.append(new OO.ui.FieldLayout(dropProtMode, {
label: 'Mode',
align: 'top'
}).$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($protList).append($targetList)
.append($('<div style="margin-top:10px;">').append($templateFilterLayout.$element))
);
var $rulesList = $('<div>');
var btnAddRule = new OO.ui.ButtonWidget({
label: 'Add rule',
icon: 'add'
});
var rulesRegistry = [];
addSection('Rules', $('<div>').append($rulesList, btnAddRule.$element));
var togWikiTypos = new OO.ui.ToggleSwitchWidget({
value: false
});
var lblWikiStatus = $('<div>').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var btnLoadLocal = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load file',
framed: false
});
var btnClearLocal = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear local',
framed: false,
flags: 'destructive',
disabled: true
});
var lblLocalStatus = $('<div>').text('No local rules').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var $typoInput = $('<input type="file">').hide().appendTo('body');
var $extRulesPanel = $('<div>').addClass('wa-source-options');
$extRulesPanel.append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'space-between'
}).append($('<span>').text('Project:AutoWikiBrowser/Typos').css('font-weight', 'bold'), togWikiTypos.$element),
$('<div>').css('margin-bottom', '10px').append(lblWikiStatus),
$('<hr>').css('border-top', '1px solid #eee'),
$('<div>').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Local rules (session only)').css({
'font-weight': 'bold'
}), $('<div>').css('flex', '1'), btnLoadLocal.$element, btnClearLocal.$element), lblLocalStatus)
);
addSection('External rules', $extRulesPanel);
var txtPreScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var txtPostScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var btnLoadLib = new OO.ui.ButtonWidget({
icon: 'upload',
title: 'Load library (.js)',
framed: false
});
var btnRemoveLib = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Remove library',
framed: false,
flags: 'destructive'
});
var txtLibStatus = new OO.ui.TextInputWidget({
value: '(No library loaded)',
readOnly: true
});
var $libInput = $('<input type="file" accept=".js">').hide().appendTo('body');
var btnEditLib = new OO.ui.ButtonWidget({
icon: 'edit',
label: 'Edit project library',
framed: false
});
var $scriptPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'gap': '5px',
'margin-bottom': '10px'
}).append($('<span>').text('JS library:').css({
'font-weight': 'bold',
'white-space': 'nowrap'
}), txtLibStatus.$element.css('flex', '1'), btnLoadLib.$element, btnRemoveLib.$element),
$('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-bottom': '10px'
}).append(btnEditLib.$element),
new OO.ui.FieldLayout(txtPreScript, {
label: 'Pre-Process',
align: 'top'
}).$element,
new OO.ui.FieldLayout(txtPostScript, {
label: 'Post-Process',
align: 'top'
}).$element
);
addSection('Scripts', $scriptPanel);
function updateLibUI() {
if (currentLibrary.code) {
txtLibStatus.setValue(currentLibrary.name);
btnRemoveLib.setDisabled(false);
} else {
txtLibStatus.setValue('(No library loaded)');
btnRemoveLib.setDisabled(true);
}
}
updateLibUI();
function LibraryEditorDialog(config) {
LibraryEditorDialog.super.call(this, config);
}
OO.inheritClass(LibraryEditorDialog, OO.ui.ProcessDialog);
LibraryEditorDialog.static.name = 'libraryEditor';
LibraryEditorDialog.static.title = 'Edit project library';
LibraryEditorDialog.static.actions = [{
action: 'save',
label: 'Save',
flags: ['primary', 'progressive']
},
{
label: 'Cancel',
flags: 'safe'
}
];
LibraryEditorDialog.prototype.initialize = function() {
LibraryEditorDialog.super.prototype.initialize.call(this);
this.$element.addClass('wa-lib-dialog'); // Attach our custom CSS override class
this.panel = new OO.ui.PanelLayout({
padded: true,
expanded: true
});
this.$editorWrapper = $('<div>').addClass('wa-lib-editorwrapper');
this.panel.$element.append(this.$editorWrapper);
this.$body.append(this.panel.$element);
};
LibraryEditorDialog.prototype.getSetupProcess = function(data) {
data = data || {};
return LibraryEditorDialog.super.prototype.getSetupProcess.call(this, data)
.next(function() {
var self = this;
self.$editorWrapper.empty();
// Create a textarea for the MediaWiki CM wrapper to properly bind to
var $libTextArea = $('<textarea>').appendTo(self.$editorWrapper);
var initCode = currentLibrary.code || "// All custom library functions defined here will be passed to the worker.\n// Special functions:\n// function wAwB_Pre(text, vars, shared) { return text; }\n// function wAwB_Post(text, vars, shared) { return text; }\n";
return mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.modes']).then(function(require) {
var CM = require('ext.CodeMirror');
var modes = require('ext.CodeMirror.modes');
self.cmInstance = new CM($libTextArea[0], modes.javascript());
self.cmInstance.initialize();
self.cmInstance.view.dispatch({
changes: {
from: 0,
insert: initCode
}
});
// Force CodeMirror to fill the wrapper
self.$editorWrapper.find('.cm-editor').css({
height: '100%'
});
}).catch(function(err) {
console.error("wAwB CM Init Error:", err);
});
}, this);
};
LibraryEditorDialog.prototype.getActionProcess = function(action) {
var dialog = this;
if (action === 'save') {
return new OO.ui.Process(function() {
var newCode = "";
if (dialog.cmInstance) {
newCode = dialog.cmInstance.view.state.doc.toString();
}
if (newCode.trim() === "") {
currentLibrary = {
name: null,
code: null
};
} else {
currentLibrary.code = newCode;
currentLibrary.name = "custom code";
}
updateLibUI();
dialog.close({
action: action
});
});
}
if (action === 'cancel' || !action) {
return new OO.ui.Process(function() {
dialog.close({
action: action
});
});
}
return LibraryEditorDialog.super.prototype.getActionProcess.call(this, action);
};
LibraryEditorDialog.prototype.getTeardownProcess = function(data) {
return LibraryEditorDialog.super.prototype.getTeardownProcess.call(this, data)
.next(function() {
if (this.cmInstance) {
try {
this.cmInstance.view.destroy();
} catch (e) {}
this.cmInstance = null;
}
}, this);
};
var windowManager = new OO.ui.WindowManager();
$('body').append(windowManager.$element);
var libDialog = new LibraryEditorDialog();
windowManager.addWindows([libDialog]);
btnEditLib.on('click', function() {
windowManager.openWindow(libDialog);
});
var togAdminEnable = new OO.ui.ToggleSwitchWidget({
value: false
});
var chkMovRedirect = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkMovTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkMovSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkDelTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var dropProtEdit = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var dropProtMove = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var inpProtExpiry = new OO.ui.TextInputWidget({
placeholder: 'infinite / 2 days / 12 hours'
});
if (CAN_MOVE || IS_ADMIN) {
var $adminPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'flex-start',
'gap': '10px'
}).append($('<span>').text('Enable page actions').css('font-weight', 'bold'), togAdminEnable.$element),
$('<hr>')
);
if (CAN_MOVE) {
$adminPanel.append(
$('<strong>').text('Move options:'), new OO.ui.FieldLayout(chkMovRedirect, {
label: 'Do not create redirect',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovTalk, {
label: 'Move talk page',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovSub, {
label: 'Move subpages',
align: 'inline'
}).$element, $('<br>')
);
}
if (IS_ADMIN) {
$adminPanel.append(
$('<strong>').text('Delete options:'), new OO.ui.FieldLayout(chkDelTalk, {
label: 'Delete talk page',
align: 'inline'
}).$element, $('<br>'),
$('<strong>').text('Protect options:'), new OO.ui.FieldLayout(dropProtEdit, {
label: 'Edit level',
align: 'top'
}).$element, new OO.ui.FieldLayout(dropProtMove, {
label: 'Move level',
align: 'top'
}).$element, new OO.ui.FieldLayout(inpProtExpiry, {
label: 'Expiry',
align: 'top'
}).$element
);
}
addSection('Page actions', $adminPanel);
}
var btnPower = new OO.ui.ButtonWidget({
label: 'Start',
icon: 'power',
flags: ['primary', 'progressive'],
title: 'Start editing',
accessKey: 'a'
});
var btnDiff = new OO.ui.ButtonWidget({
label: 'Diff',
icon: 'update',
title: 'Show diff',
accessKey: 'd'
});
var btnSkip = new OO.ui.ButtonWidget({
label: 'Next',
icon: 'next',
title: 'Skip to next page',
accessKey: 'n',
disabled: true
});
var btnPreview = new OO.ui.ButtonWidget({
label: 'Preview',
icon: 'article',
title: 'Preview page',
accessKey: 'p'
});
var btnSave = new OO.ui.ButtonWidget({
label: 'Save',
icon: 'upload',
flags: 'progressive',
title: 'Save edit',
accessKey: 's',
disabled: true
});
var inputSummary = new OO.ui.TextInputWidget({
placeholder: '',
value: '',
title: 'Enter edit summary',
accessKey: 'b'
});
var $sumLayout = new OO.ui.FieldLayout(inputSummary, {
label: 'Edit summary',
align: 'top'
}).$element;
$sumLayout.css('margin-bottom', '6px');
var listTextarea = new OO.ui.MultilineTextInputWidget({
rows: 15,
classes: ['wa-page-list-raw']
});
var btnSort = new OO.ui.ButtonWidget({
icon: 'sortVertical',
title: 'Sort list',
framed: false
});
var btnDedup = new OO.ui.ButtonWidget({
icon: 'funnel',
title: 'Remove duplicates',
framed: false
});
var btnClear = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear list',
framed: false
});
var btnPreParse = new OO.ui.ButtonWidget({
label: 'Pre-parse',
title: 'Process list in background',
icon: 'robot',
framed: false
});
var $listCounter = $('<span>').addClass('wa-list-counter').text('0 pages');
var togAutoSave = new OO.ui.ToggleSwitchWidget({
value: false
});
var txtAutoDelay = new OO.ui.TextInputWidget({
value: '10'
});
var $botRow = $('<div>').addClass('wa-bot-row').hide();
if (PERMS.allowBot) {
$botRow.show().append($('<span>').css('font-weight', 'bold').text('Bot mode: '), togAutoSave.$element, $('<span>').text('Delay (s):'), txtAutoDelay.$element.css('max-width', '40px'));
togAutoSave.on('change', function(v) {
if (v) txtAutoDelay.setValue('10');
});
}
var sortAsc = true;
var $procHeader = $('<div>').addClass('wa-section-header').attr('id', 'wa-proc-header').css({
'display': 'flex',
'justify-content': 'space-between',
'align-items': 'center'
});
var $procTitle = $('<span>').attr('id', 'wa-proc-title').text('Processing');
var chkMinor = new OO.ui.CheckboxInputWidget({
selected: true,
title: 'Minor edit'
});
var $minorLayout = new OO.ui.FieldLayout(chkMinor, {
label: 'm',
align: 'inline',
title: 'Minor edit'
});
$minorLayout.$element.css({
'margin-right': '15px',
'font-weight': 'normal'
});
$procHeader.append($procTitle, $minorLayout.$element);
var $procContent = $('<div>').attr('id', 'wa-proc-content').append(
$sumLayout, $botRow,
$('<div>').addClass('wa-grid-container').append(
$('<div>').addClass('wa-grid-col').append(btnPower.$element),
$('<div>').addClass('wa-grid-col').append(btnDiff.$element, btnSkip.$element),
$('<div>').addClass('wa-grid-col').append(btnPreview.$element, btnSave.$element)
),
$('<div>').addClass('wa-toolbar').append($listCounter, btnSort.$element, btnDedup.$element, btnClear.$element),
listTextarea.$element,
$('<div>').css({
'margin-top': '5px'
}).append(btnPreParse.$element)
);
$content.append($procHeader, $procContent);
var configWidgets = [
srcSelect, srcInput, srcInputUser, srcInputStartDate, srcInputEndDate, srcDropProp,
chkCatPages, chkCatSub, chkCatFile, chkLinkWiki, chkLinkTrans, chkLinkImg, dropLinkRedir, chkLinkToRedir,
btnAdd, redirMode, chkSkipNoChange, radSkipExist,
inpSkipContains, togSkipContainsRegex, inpSkipNotContains, togSkipNotContainsRegex, inpSkipCategories, inpSkipNotCategories,
dropProtMode, radTargetSet, inpTemplateFilter, btnAddRule,
txtPreScript, txtPostScript, chkMovRedirect, chkMovTalk, chkMovSub, chkDelTalk, dropProtEdit, dropProtMove, inpProtExpiry,
togWikiTypos, btnLoadLocal, btnClearLocal, btnPreParse
];
// =====================================================================
// 5. FUNCTION DEFINITIONS (Core Logic)
// =====================================================================
function checkSummaryWarning() {
var val = inputSummary.getValue();
var isBlank = !val || val.trim() === "";
if (isBlank || hasNewSources) inputSummary.$element.addClass('wa-summary-warning');
else inputSummary.$element.removeClass('wa-summary-warning');
}
function renderCurrentView() {
if (currentViewMode === 'preview') renderPreview();
else renderDiff();
}
function toggleConfig(isLocked) {
configWidgets.forEach(function(w) {
if (w instanceof OO.ui.TextInputWidget || w instanceof OO.ui.MultilineTextInputWidget) {
w.setReadOnly(isLocked);
w.$element.css('opacity', isLocked ? 0.8 : 1);
} else {
w.setDisabled(isLocked);
}
});
$nsSelect.prop('disabled', isLocked);
for (var key in protCheckboxes) protCheckboxes[key].setDisabled(isLocked);
rulesRegistry.forEach(function(r) {
r.find.setReadOnly(isLocked);
r.rep.setReadOnly(isLocked);
r.regex.setDisabled(isLocked);
r.flags.setReadOnly(isLocked);
r.enable.setDisabled(isLocked);
r.del.setDisabled(isLocked);
r.btnFunc.setDisabled(isLocked || !r.regex.getValue());
r.btnUp.setDisabled(isLocked || rulesRegistry.indexOf(r) === 0);
r.btnDown.setDisabled(isLocked || rulesRegistry.indexOf(r) === rulesRegistry.length - 1);
});
if (CAN_MOVE || IS_ADMIN) togAdminEnable.setDisabled(isLocked);
btnLoadLib.setDisabled(isLocked);
btnRemoveLib.setDisabled(isLocked || !currentLibrary.code);
btnEditLib.setDisabled(isLocked);
btnLoadLocal.setDisabled(isLocked);
btnClearLocal.setDisabled(isLocked || localTypos.length === 0);
}
function updateListCount() {
var val = listTextarea.getValue();
var count = val.trim() ? val.split('\n').filter(function(l) {
var line = l.trim();
return line !== "" && !line.startsWith("####");
}).length : 0;
$listCounter.text(count + ' pages');
}
listTextarea.on('change', updateListCount);
function updateDirtyState() {
if (isRunning && currentTitle && Editor.getValue() !== originalWikitext) $editorHeader.addClass('wa-dirty');
else $editorHeader.removeClass('wa-dirty');
}
var notificationWatermark = 0;
var lastNotifCheck = 0;
function checkNotifications(notifList) {
if ((ON_NOTIFY !== "warn" && ON_NOTIFY !== "stop")|| !notifList || notifList.length === 0) return false;
var triggerFound = false;
var newWatermark = notificationWatermark;
for (var i = 0; i < notifList.length; i++) {
var n = notifList[i];
var currentId = parseInt(n.id, 10) || 0;
if (currentId > newWatermark) {
newWatermark = currentId;
}
if (currentId > notificationWatermark && (n.type === 'edit-user-talk' || n.type === 'reverted')) {
triggerFound = true;
}
}
notificationWatermark = newWatermark;
if (triggerFound) {
$('.wa-editor-header').addClass('wa-header-alert');
if (ON_NOTIFY === "stop") {
var halt = confirm("A new talk page message or revert was detected!\n\nClick OK to stop the processing queue.\nClick Cancel to acknowledge and continue.");
if (halt) {
btnPower.emit('click');
return true; // Signals the save loop to halt
} else {
$('.wa-editor-header').removeClass('wa-header-alert');
}
}
}
return false;
}
function removeTopLine() {
var l = listTextarea.getValue().split('\n');
l.shift();
listTextarea.setValue(l.join('\n'));
updateListCount();
}
function updateInterfaceMode() {
var isAdminMode = togAdminEnable.getValue();
var pageLoaded = !!currentTitle;
btnSave.setDisabled(isAdminMode || !pageLoaded || !PERMS.canSave);
btnSkip.setDisabled(!pageLoaded);
btnPreview.setDisabled(!pageLoaded);
btnDiff.setDisabled(isAdminMode || !pageLoaded);
Editor.setDisabled(isAdminMode || !pageLoaded);
if (CAN_MOVE) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminMove.setDisabled(!(allowAdmin && currentVars['$xA']));
if (currentVars['$xA']) btnAdminMove.setTitle('Move page to ' + currentVars['$xA']);
else btnAdminMove.setTitle('Move page to $xA (Variable not set)');
}
if (IS_ADMIN) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminDel.setDisabled(!allowAdmin);
btnAdminProt.setDisabled(!allowAdmin);
}
}
function renderDiff() {
$visualOut.html('<div style="color:#888; text-align:center;">Generating Diff...</div>');
var currentText = Editor.getValue();
new mw.Api().post({
'action': 'compare',
fromtitle: currentTitle,
toslots: 'main',
'totext-main': currentText,
slots: 'main',
topst: window.wa_diffPST ? true : undefined,
prop: 'diff',
formatversion: 2
}).then(function(data) {
var diffBody = data.compare && data.compare.bodies && data.compare.bodies.main;
if (diffBody) {
$visualOut.html('<h4>Diff: ' + currentTitle + '</h4><table class="diff"><colgroup><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content"></colgroup><tbody>' + diffBody + '</tbody></table>');
processDiffTable();
} else {
$visualOut.html('<div style="color:green; text-align:center; padding-top:20px;">No Changes detected</div>');
}
});
}
function processDiffTable() {
var rightLineNum = 0;
$visualOut.find('table.diff tr').each(function() {
var $tr = $(this);
var $linenos = $tr.find('td.diff-lineno');
if ($linenos.length > 0) {
var txt = $linenos.last().text();
var m = txt.match(/(\d+)/);
if (m) rightLineNum = parseInt(m[1]);
return;
}
if ($tr.find('.diff-addedline').length > 0 || $tr.find('.diff-context').length > 0) {
$tr.attr('data-line', rightLineNum);
$tr.css('cursor', 'pointer').attr('title', 'Jump to line ' + rightLineNum);
rightLineNum++;
}
});
// Attach a single delegated click listener to the table instead of every row
$visualOut.find('table.diff').on('click', 'tr[data-line]', function() {
Editor.scrollToLine(parseInt($(this).attr('data-line')));
});
}
function renderPreview() {
$visualOut.html('<div style="color:#888; text-align:center;">Generating Preview...</div>');
new mw.Api().post({
action: 'parse',
title: currentTitle,
text: Editor.getValue(),
prop: 'text|categorieshtml|modules|jsconfigvars',
useskin: mw.config.get('skin'),
disablelimitreport: true,
pst: true,
contentmodel: 'wikitext'
}).then(function(data) {
if (data.parse && data.parse.text) {
var $prev = $('<div>').html(data.parse.text['*']);
if (data.parse.categorieshtml) $prev.append(data.parse.categorieshtml['*']);
$prev.find('a').attr('target', '_blank');
$visualOut.empty().append($prev);
mw.loader.using(data.parse.modules.concat(data.parse.modulestyles, data.parse.modulescripts), function() {
mw.hook('wikipage.content').fire($('.wa-visual-output .mw-parser-output'));
});
}
}).catch(function(err) {
$visualOut.html('Error generating preview.');
alert("Preview failed: " + err);
});
}
async function transformPageText(rawText, title, config) {
var filters = config.filters;
if (filters) {
var check = function(text, rule) {
if (!rule || !rule.val) return false;
if (rule.regex) {
try {
return new RegExp(rule.val, 'mu').test(text);
} catch (e) {
return false;
}
}
return text.indexOf(rule.val) !== -1;
};
if (filters.skipContains && filters.skipContains.val && check(rawText, filters.skipContains)) {
return {
skipped: true,
reason: 'Contains: ' + filters.skipContains.val
};
}
if (filters.skipNotContains && filters.skipNotContains.val && !check(rawText, filters.skipNotContains)) {
return {
skipped: true,
reason: 'Missing: ' + filters.skipNotContains.val
};
}
}
var mode = config.mode;
var inputs = [];
var compiledSpecies = null;
if (config.templateFilter) {
var tFilter = config.templateFilter;
if (tFilter[0] === "^") tFilter = "^\\{\\{\\s*" + tFilter.slice(1);
else tFilter = "\\{\\{\\s*" + tFilter;
compiledSpecies = tFilter + "(?=\\s*[|}\\n])";
}
var skeleton = PageProtector.protect(rawText, mode, config.excludes, compiledSpecies);
if (mode === 'target') inputs = PageProtector.store;
else inputs = [skeleton];
var combinedRules = rulesRegistry.filter(r => r.isActive()).map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
}));
if (togWikiTypos.getValue()) combinedRules = combinedRules.concat(wikiTypos);
if (localTypos.length > 0) combinedRules = combinedRules.concat(localTypos);
var payload = {
texts: inputs,
vars: config.vars,
preCode: getUserCode(txtPreScript, 'wAwB_Pre'),
libraryCode: currentLibrary.code,
rules: combinedRules,
postCode: getUserCode(txtPostScript, 'wAwB_Post')
};
var result = await WorkerEngine.run(payload);
if (result.skipped) return {
skipped: true,
reason: result.reason
};
var finalText = "";
if (mode === 'target') {
PageProtector.store = result.texts;
finalText = PageProtector.restore(skeleton);
} else {
finalText = PageProtector.restore(result.texts[0]);
}
return {
skipped: false,
text: finalText,
summaryAppend: result.summaryAppend,
summaryOverride: result.summaryOverride
};
}
async function processPageContent() {
try {
setStatus('Processing...', 'working');
var mode = dropProtMode.getValue();
var activeConfig = {
mode: mode,
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: currentVars,
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
var res = await transformPageText(originalWikitext, currentTitle, activeConfig);
if (res.skipped) {
removeTopLine();
loadNextPage();
return;
}
currentPageSummaryAppend = res.summaryAppend || "";
currentPageSummaryOverride = res.summaryOverride || null;
updateSummaryPreview(inputSummary.getValue());
if (chkSkipNoChange.isSelected() && res.text === originalWikitext) {
removeTopLine();
loadNextPage();
return;
}
setStatus('Ready');
Editor.setValue(res.text);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
else {
Editor.setDisabled(false);
btnSave.setDisabled(!PERMS.canSave);
btnSkip.setDisabled(false);
btnPreview.setDisabled(false);
btnDiff.setDisabled(false);
}
updateDirtyState();
renderCurrentView();
if (PERMS.allowBot && togAutoSave.getValue()) {
var delay = Math.max(0, parseInt(txtAutoDelay.getValue(), 10) || 0) * 1000;
setStatus('Auto-save in ' + (delay / 1000) + 's...', 'working');
if (autoSaveTimer) clearTimeout(autoSaveTimer);
autoSaveTimer = setTimeout(function() {
if (isRunning && PERMS.canSave) {
btnSave.emit('click');
}
}, delay);
}
} catch (e) {
setStatus('Error', 'error');
alert(e);
btnPower.emit('click');
}
}
async function runPreParseBatch() {
// 1. Toggle / Stop Logic
if (isRunning) {
isRunning = false;
setStatus('Stopping...', 'working');
btnPreParse.setLabel('Pre-parse');
return;
}
// 2. Start & Deduplicate
var currentVal = listTextarea.getValue();
var cleanVal = getDeduplicatedList(currentVal).join('\n');
listTextarea.setValue(cleanVal);
updateListCount();
isRunning = true;
toggleUI(true);
// 3. Lock UI
toggleUI(true);
btnSkip.setDisabled(true);
btnDiff.setDisabled(true);
btnPreview.setDisabled(true);
btnSave.setDisabled(true);
Editor.setDisabled(true);
btnPreParse.setLabel('Stop pre-parse');
// Inject STOP marker if not present
var currentList = listTextarea.getValue().split('\n');
if (!currentList.includes('####STOP')) {
currentList.push('####STOP');
listTextarea.setValue(currentList.join('\n'));
}
// Gather Config
var activeConfig = {
mode: dropProtMode.getValue(),
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: {},
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (activeConfig.mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
setStatus('Pre-parsing...', 'working');
while (isRunning) {
var lines = listTextarea.getValue().split('\n');
var batchTitles = [];
var stopFound = false;
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
if (line === '####STOP') {
stopFound = true;
break;
}
if (line && !line.startsWith('####')) {
var parts = line.split('|');
batchTitles.push({
fullLine: line,
title: parts[0],
vars: parts.slice(1)
});
}
if (batchTitles.length >= 50) break;
}
if (batchTitles.length === 0) {
if (stopFound) setStatus('Pre-parse complete');
else setStatus('List empty');
break;
}
$listCounter.text('Fetching ' + batchTitles.length + '...');
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
try {
var data = await api.get({
action: 'query',
prop: 'revisions' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: batchTitles.map(t => t.title).join('|'),
rvprop: 'content',
rvslots: 'main',
redirects: 1,
cllimit: 'max'
});
var pageMap = {};
if (data.query && data.query.pages) Object.values(data.query.pages).forEach(p => pageMap[p.title] = p);
var redirMap = {};
if (data.query && data.query.redirects) data.query.redirects.forEach(r => redirMap[r.from] = r.to);
var keptLines = [];
for (var k = 0; k < batchTitles.length; k++) {
var item = batchTitles[k];
var lookupTitle = redirMap[item.title] || item.title;
var page = pageMap[lookupTitle];
if (!page || page.missing || page.invalid || !page.revisions || !page.revisions[0]) {
console.warn("Skipping invalid/missing page:", item.title);
continue;
}
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) continue; // Skip
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) continue; // Skip
var rawText = page.revisions[0].slots.main['*'];
activeConfig.vars = {
'$xx': item.title
};
item.vars.forEach((v, idx) => activeConfig.vars['$x' + String.fromCharCode(65 + idx)] = v);
var res = await transformPageText(rawText, item.title, activeConfig);
// UPDATED LOGIC: Respect "Skip if no change" checkbox
if (!res.skipped && (!chkSkipNoChange.isSelected() || res.text !== rawText)) {
keptLines.push(item.fullLine);
}
}
var freshLines = listTextarea.getValue().split('\n');
var stopIndex = -1;
for (var x = 0; x < freshLines.length; x++) {
if (freshLines[x] === '####STOP') {
stopIndex = x;
break;
}
}
if (stopIndex > -1) {
var topChunk = freshLines.slice(0, stopIndex);
var botChunk = freshLines.slice(stopIndex + 1);
var processedSet = new Set(batchTitles.map(t => t.fullLine));
var newTop = topChunk.filter(l => !processedSet.has(l));
var newList = newTop.concat(['####STOP']).concat(botChunk).concat(keptLines);
listTextarea.setValue(newList.join('\n'));
updateListCount();
}
} catch (e) {
console.error(e);
setStatus('Batch error: ' + e, 'error');
break;
}
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
btnPreParse.setLabel('Pre-parse');
if (listTextarea.getValue().startsWith('####STOP')) setStatus('Pre-parse done!');
else setStatus('Stopped');
}
btnPreParse.on('click', runPreParseBatch);
function loadNextPage() {
if (!isRunning) return;
var allLines = listTextarea.getValue().split('\n');
var listChanged = false;
var stopCommand = false;
while (allLines.length > 0) {
var line = allLines[0];
if (line === '####STOP') {
stopCommand = true;
break;
}
if (line.startsWith('####') || line === "") {
allLines.shift();
listChanged = true;
} else {
break;
}
}
if (listChanged) {
listTextarea.setValue(allLines.join('\n'));
updateListCount();
}
if (stopCommand) {
btnPower.emit('click');
setStatus("Stopped by ####STOP");
return;
}
if (allLines.length === 0) {
btnPower.emit('click');
setStatus("Done!");
return;
}
var raw = allLines[0];
var parts = raw.split('|');
currentTitle = parts[0].trim();
baseRevId = 0;
originalWikitext = "";
if (!currentTitle) {
removeTopLine();
loadNextPage();
return;
}
currentVars = {};
currentVars['$xx'] = currentTitle;
for (var i = 1; i < parts.length; i++) currentVars['$x' + String.fromCharCode(64 + i)] = parts[i];
currentPageSummaryAppend = "";
currentPageSummaryOverride = null;
updateSummaryPreview(inputSummary.getValue());
setStatus('Loading...', 'working');
btnSave.setDisabled(true);
btnPreview.setDisabled(true);
btnDiff.setDisabled(true);
btnSkip.setDisabled(true);
Editor.setDisabled(true);
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
$editorHeader.removeClass('wa-dirty');
$visualOut.empty();
Editor.setValue('Loading...');
$infoContainer.empty();
currentPageExists = false;
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
var params = {
action: 'query',
prop: 'revisions|info' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: currentTitle,
rvprop: 'content|timestamp|ids',
rvslots: 'main',
inprop: 'watched',
cllimit: 'max'
};
var now = Date.now();
var shouldCheckNotifs = (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") && (now - lastNotifCheck > ON_NOTIFY_FREQ);
if (shouldCheckNotifs) {
params.meta = 'notifications';
params.notprop = 'list';
params.notsections = 'alert';
params.notlimit = 4;
lastNotifCheck = now;
}
var rMode = redirMode.findSelectedItem().getData();
if (rMode === 'follow') params.redirects = 1;
return api.get(params).then(async function(data) {
// piggyback notification check
if (data.query && data.query.notifications && data.query.notifications.list) {
var stopped = checkNotifications(data.query.notifications.list);
if (stopped) return; // exit before loading the page content
}
var pid = Object.keys(data.query.pages)[0];
var page = data.query.pages[pid];
currentPageExists = !page.missing && !page.invalid;
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat blacklist');
removeTopLine();
loadNextPage();
return;
}
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat whitelist');
removeTopLine();
loadNextPage();
return;
}
if (rMode === 'follow' && data.query.redirects) {
currentTitle = page.title;
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
mw.notify('Redirect followed to: ' + currentTitle);
}
if (rMode === 'skip' && page.redirect !== undefined) {
removeTopLine();
loadNextPage();
return;
}
var skipMode = radSkipExist.findSelectedItem().getData();
if (pid === "-1") {
if (skipMode === 'missing') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = "";
baseRevId = 0;
} else {
if (skipMode === 'exists') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = page.revisions[0].slots.main['*'];
baseRevId = page.revisions[0].revid;
}
if (page.revisions && page.revisions.length > 0) {
var rev = page.revisions[0];
var ts = new Date(rev.timestamp).toISOString().replace('T', ' ').substring(0, 16);
$infoContainer.empty().append('Last edit: ' + ts + ' | ', $('<a>').attr('href', mw.util.getUrl(currentTitle, {
action: 'history'
})).attr('target', '_blank').text('history'));
}
btnWatch.setDisabled(!currentPageExists);
btnManualEdit.setDisabled(!currentPageExists);
if (page.watched !== undefined) btnWatch.setIcon('unStar');
else btnWatch.setIcon('star');
if (CAN_MOVE || IS_ADMIN) {
updateInterfaceMode();
if (togAdminEnable.getValue()) {
Editor.setValue(originalWikitext);
renderCurrentView();
setStatus('Ready (Page actions)');
return;
}
}
processPageContent();
}).catch(function(e) {
setStatus('API error', 'error');
alert('Load error: ' + e);
btnPower.emit('click');
});
}
async function fetchWithContinue(api, params) {
var allTitles = new Set();
var continueToken = {};
var safetyLimit = FETCH_SAFETY_LIMIT;
var count = 0;
isFetching = true;
btnAdd.setLabel('Cancel fetch');
$fetchStatus.text('Fetching...').show();
try {
while (isFetching && count < safetyLimit) {
var merged = Object.assign({}, params, continueToken);
var data = await api.get(merged);
var batch = [];
if (data.watchlistraw) batch = data.watchlistraw;
else if (data.query) {
if (data.query.pages) batch = Object.values(data.query.pages);
else if (data.query.categorymembers) batch = data.query.categorymembers;
else if (data.query.backlinks) batch = data.query.backlinks;
else if (data.query.embeddedin) batch = data.query.embeddedin;
else if (data.query.imageusage) batch = data.query.imageusage;
else if (data.query.search) batch = data.query.search;
else if (data.query.allpages) batch = data.query.allpages;
else if (data.query.usercontribs) batch = data.query.usercontribs;
else if (data.query.pageswithprop) batch = data.query.pageswithprop;
}
if (batch.length > 0) {
batch.forEach(item => {
if (item.title) allTitles.add(item.title);
});
count = allTitles.size;
$fetchStatus.text('Fetched ' + count + '...');
}
if (data.continue) continueToken = data.continue;
else break;
}
} catch (e) {
alert("Fetch interrupted: " + e);
}
isFetching = false;
btnAdd.setLabel('Add to list').setDisabled(false);
$fetchStatus.text('Added ' + allTitles.size + ' pages').delay(3000).fadeOut();
if (allTitles.size > 0) {
hasNewSources = true;
checkSummaryWarning();
}
return Array.from(allTitles);
}
function toggleUI(d) {
if (d) {
btnPower.setLabel('Stop').setIcon('power').setFlags(['destructive']);
} else {
btnPower.setLabel('Start').setIcon('power').clearFlags().setFlags(['primary', 'progressive']);
if (PERMS.allowBot) togAutoSave.setValue(false);
}
toggleConfig(d);
btnSort.setDisabled(d);
btnDedup.setDisabled(d);
btnClear.setDisabled(d);
btnSaveProj.setDisabled(d);
btnLoadProj.setDisabled(d);
btnSkip.setDisabled(!d);
btnSave.setDisabled(true);
listTextarea.setReadOnly(d);
if (d) listTextarea.$element.addClass('wa-list-running');
else listTextarea.$element.removeClass('wa-list-running');
}
function resetPanels() {
Editor.setValue('');
$titleLink.text('Page content').removeAttr('href');
$editorHeader.removeClass('wa-dirty');
setStatus('Ready');
$('#wa-summary-preview').val('');
currentTitle = null;
$visualOut.html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready...</div>');
$infoContainer.empty();
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
Editor.setDisabled(true);
currentPageExists = false;
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
toggleUI(false);
updateListCount();
if (autoSaveTimer) clearTimeout(autoSaveTimer);
}
function arrayMove(arr, old_index, new_index) {
if (new_index >= arr.length) {
var k = new_index - arr.length + 1;
while (k--) arr.push(undefined);
}
arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);
}
function updateRuleButtons() {
rulesRegistry.forEach(function(item, idx) {
item.btnUp.setDisabled(idx === 0);
item.btnDown.setDisabled(idx === rulesRegistry.length - 1);
});
}
function addRule() {
var row = $('<div>').addClass('wa-rule-row');
var controls = $('<div>').addClass('wa-rule-controls');
var btnUp = new OO.ui.ButtonWidget({
icon: 'collapse',
framed: false,
title: 'Move up',
classes: ['wa-rule-btn']
});
var btnDown = new OO.ui.ButtonWidget({
icon: 'expand',
framed: false,
title: 'Move down',
classes: ['wa-rule-btn']
});
controls.append(btnUp.$element, btnDown.$element);
var contentDiv = $('<div>').addClass('wa-rule-content');
var f = new OO.ui.TextInputWidget({
placeholder: 'Find'
});
var r = new OO.ui.TextInputWidget({
placeholder: 'Replace'
});
var reg = new OO.ui.ToggleSwitchWidget();
var fl = new OO.ui.TextInputWidget({
value: 'gmu',
disabled: true
}).toggle(false);
var btnEnable = new OO.ui.ButtonWidget({
icon: 'power',
framed: false,
title: 'Toggle rule',
flags: ['progressive']
});
var isRuleActive = true;
var btnFunc = new OO.ui.ButtonWidget({
icon: 'code',
framed: false,
title: 'Toggle JS mode',
disabled: true
});
var isRuleFunc = false;
var toggleRule = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleActive;
isRuleActive = val;
row.css('opacity', isRuleActive ? 1 : 0.5);
if (isRuleActive) btnEnable.setFlags(['progressive']);
else btnEnable.clearFlags();
};
btnEnable.on('click', function() {
toggleRule();
});
var toggleFunc = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleFunc;
isRuleFunc = val;
if (isRuleFunc) {
btnFunc.setFlags(['progressive']);
r.$input.attr('placeholder', 'return match.toUpperCase();');
} else {
btnFunc.clearFlags();
r.$input.attr('placeholder', 'Replace');
}
};
btnFunc.on('click', function() {
toggleFunc();
});
btnFunc.toggle(false);
reg.on('change', function(v) {
fl.setDisabled(!v);
fl.toggle(v);
btnFunc.setDisabled(!v);
if (!v) {
btnFunc.toggle(false);
if (isRuleFunc) toggleFunc(false);
} else btnFunc.toggle(true);
});
var del = new OO.ui.ButtonWidget({
icon: 'trash',
flags: 'destructive',
framed: false,
title: 'Delete rule',
});
del.on('click', function() {
row.fadeOut(200, function() {
row.remove();
rulesRegistry = rulesRegistry.filter(x => x.row !== row);
updateRuleButtons();
});
});
contentDiv.append(f.$element, $('<div>').css('margin-top', '3px').append(r.$element), $('<div>').addClass('wa-rule-opt-row').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Regex: ').css({
'font-size': '0.8em',
'margin-right': '4px'
}), reg.$element, fl.$element.css({
'width': '50px',
'margin-left': '5px'
})), btnFunc.$element.css('margin-left', '10px')), $('<div>').css('display', 'flex').append(btnEnable.$element, del.$element)));
row.append(controls, contentDiv);
$rulesList.append(row);
var ruleItem = {
row: row,
find: f,
rep: r,
regex: reg,
flags: fl,
btnUp: btnUp,
btnDown: btnDown,
enable: btnEnable,
del: del,
btnFunc: btnFunc,
isActive: function() {
return isRuleActive;
},
setActive: toggleRule,
isFunc: function() {
return isRuleFunc;
},
setFunc: toggleFunc
};
rulesRegistry.push(ruleItem);
btnUp.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx > 0) {
var prevRow = rulesRegistry[idx - 1].row;
row.fadeOut(150, function() {
row.insertBefore(prevRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx - 1);
updateRuleButtons();
}
});
btnDown.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx < rulesRegistry.length - 1) {
var nextRow = rulesRegistry[idx + 1].row;
row.fadeOut(150, function() {
row.insertAfter(nextRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx + 1);
updateRuleButtons();
}
});
updateRuleButtons();
}
btnAddRule.on('click', addRule);
addRule();
togWikiTypos.on('change', function(v) {
if (v) {
if (wikiTypos.length > 0) lblWikiStatus.text(wikiTypos.length + ' rules loaded (Cached)');
else {
lblWikiStatus.text('Fetching...');
togWikiTypos.setDisabled(true);
new mw.Api().get({
action: 'query',
prop: 'revisions',
titles: mw.config.get('wgFormattedNamespaces')[4] + ':AutoWikiBrowser/Typos',
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(d) {
var page = d.query.pages[0];
if (!page.missing) {
wikiTypos = parseTypoContent(page.revisions[0].slots.main.content);
lblWikiStatus.text(wikiTypos.length + ' rules loaded');
} else {
lblWikiStatus.text('Page not found');
togWikiTypos.setValue(false);
}
}).catch(function() {
lblWikiStatus.text('Error');
togWikiTypos.setValue(false);
}).always(function() {
togWikiTypos.setDisabled(false);
});
}
} else lblWikiStatus.text('Rules inactive');
});
btnLoadLocal.on('click', function() {
$typoInput.click();
});
$typoInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
localTypos = parseTypoContent(evt.target.result);
lblLocalStatus.text(localTypos.length + ' local rules loaded');
btnClearLocal.setDisabled(false);
};
reader.readAsText(file);
$typoInput.val('');
});
btnClearLocal.on('click', function() {
localTypos = [];
lblLocalStatus.text('No local rules');
btnClearLocal.setDisabled(true);
});
btnLoadLib.on('click', function() {
$libInput.click();
});
btnRemoveLib.on('click', function() {
currentLibrary = {
name: null,
code: null
};
updateLibUI();
});
$libInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
currentLibrary = {
name: file.name,
code: evt.target.result
};
updateLibUI();
};
reader.readAsText(file);
$libInput.val('');
});
btnPower.on('click', async function() {
hasNewSources = false;
checkSummaryWarning();
$('.wa-editor-header').removeClass('wa-header-alert');
if (!isRunning) {
if (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") {
setStatus('Setting watermark...', 'working');
try {
var notifData = await new mw.Api().get({
action: 'query',
meta: 'notifications',
notprop: 'list',
notsections: 'alert',
notlimit: 1,
formatversion: 2
});
if (notifData.query && notifData.query.notifications && notifData.query.notifications.list.length > 0) {
notificationWatermark = parseInt(notifData.query.notifications.list[0].id, 10) || 0;
} else {
notificationWatermark = 0;
}
} catch (e) {
console.warn("wAwB: Failed to fetch notification watermark", e);
}
}
if (SAVED_SESSION === 0) mw.track('stats.mediawiki_gadget_wAwB_total');
isRunning = true;
toggleUI(true);
loadNextPage();
} else {
if (SAVED_RUN > 0) {
mw.track('stats.mediawiki_gadget_wAwB_saved_total', SAVED_RUN, {
wiki: WIKI
});
SAVED_SESSION += SAVED_RUN;
SAVED_RUN = 0;
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
resetPanels();
}
});
inputSummary.on('change', function() {
checkSummaryWarning();
if (currentTitle) {
updateSummaryPreview(inputSummary.getValue());
}
});
btnSkip.on('click', function() {
if (Editor.getValue() === 'Loading...') return;
removeTopLine();
loadNextPage();
});
btnDiff.on('click', function() {
currentViewMode = 'diff';
updateDirtyState();
if (currentTitle) renderDiff();
});
btnPreview.on('click', function() {
currentViewMode = 'preview';
updateDirtyState();
if (currentTitle) renderPreview();
});
btnSave.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
if (autoSaveTimer) clearTimeout(autoSaveTimer);
btnSave.setDisabled(true);
setStatus('Saving...', 'working');
var effectiveDelay = PERMS.saveDelay || 0;
if (effectiveDelay > 0) setStatus('Throttling (' + (effectiveDelay / 1000) + 's)...', 'working');
setTimeout(function() {
if (effectiveDelay > 0) setStatus('Saving...', 'working');
var finalSum = $('#wa-summary-preview').val().trim();
var summary = finalSum + SUMMARY_SUFFIX;
new mw.Api().postWithToken('csrf', {
action: 'edit',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
text: Editor.getValue(),
summary: summary,
minor: chkMinor.isSelected(),
baserevid: baseRevId,
bot: PERMS.allowBot,
watchlist: 'nochange',
tags: DO_TAG ? APP_NAME : undefined
}).then(function() {
SAVED_RUN += 1;
removeTopLine();
loadNextPage();
}).catch(function(c) {
btnSave.setDisabled(false);
setStatus('Save error', 'error');
alert('Save failed: ' + c);
});
}, effectiveDelay);
});
btnManualEdit.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
// Calculate the final injected summary
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : inputSummary.getValue();
var finalSum = base + (currentPageSummaryAppend || "");
var translatedSummary = injectVars(finalSum);
var summary = translatedSummary; // no SUMMARY_SUFFIX
// Create an invisible form targeting a new tab
var $form = $('<form>').attr({
method: 'POST',
action: mw.util.getUrl(currentTitle, { action: 'edit' }),
target: '_blank'
}).hide();
// Populate it with MediaWiki's native input names
$('<textarea>').attr('name', 'wpTextbox1').val(Editor.getValue()).appendTo($form);
$('<input>').attr('name', 'wpSummary').val(summary).appendTo($form);
if (chkMinor.isSelected()) {
$('<input>').attr('name', 'wpMinoredit').val('1').appendTo($form);
}
// Append, fire, and destroy
$form.appendTo('body').submit().remove();
});
btnWatch.on('click', function() {
var isWatched = btnWatch.getIcon() === 'unStar';
new mw.Api()[isWatched ? 'unwatch' : 'watch'](currentTitle).then(function() {
btnWatch.setIcon(isWatched ? 'star' : 'unStar');
mw.notify(isWatched ? 'Unwatched' : 'Watched');
});
});
btnAdd.on('click', function() {
if (isFetching) {
isFetching = false;
btnAdd.setDisabled(true).setLabel('Cancelling...');
return;
}
try {
var mode = srcSelect.getValue(),
q = srcInput.getValue().trim();
if (mode !== 'watchlist' && mode !== 'usercontribs' && mode !== 'pageswithprop' && !q) {
alert('Query empty');
return;
}
var nsIds = ($nsSelect.val() || []).map(v => parseInt(v));
var nsStr = nsIds.join('|');
var api = new mw.Api(),
promises = [];
if (mode === 'cat') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'categorymembers',
cmtitle: mw.Title.newFromText(q, 14) ? mw.Title.newFromText(q, 14).getPrefixedText() : 'Category:' + q,
cmnamespace: nsStr,
cmtype: (chkCatPages.isSelected() ? 'page|' : '') + (chkCatSub.isSelected() ? 'subcat|' : '') + (chkCatFile.isSelected() ? 'file' : ''),
cmlimit: 'max'
}));
else if (mode === 'linksto') {
if (chkLinkWiki.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'backlinks',
bltitle: q,
blnamespace: nsStr,
bllimit: 'max',
blfilterredir: dropLinkRedir.getValue(),
blredirect: chkLinkToRedir.isSelected()
}));
if (chkLinkTrans.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'embeddedin',
eititle: q,
einamespace: nsStr,
eilimit: 'max',
eifilterredir: dropLinkRedir.getValue()
}));
if (chkLinkImg.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'imageusage',
iutitle: q,
iunamespace: nsStr,
iulimit: 'max',
iufilterredir: dropLinkRedir.getValue()
}));
} else if (mode === 'linkson') promises.push(fetchWithContinue(api, {
action: 'query',
generator: 'links',
titles: q,
gplnamespace: nsStr,
gpllimit: 'max',
prop: 'info'
}));
else if (mode === 'prefix') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'allpages',
apprefix: q,
apnamespace: nsIds[0] || 0,
aplimit: 'max'
}));
else if (mode === 'watchlist') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'watchlistraw',
wrnamespace: nsStr,
wrlimit: 'max'
}));
else if (mode === 'search') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'search',
srsearch: q,
srnamespace: nsStr,
srlimit: 'max'
}));
else if (mode === 'usercontribs') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'usercontribs',
ucuser: srcInputUser.getValue(),
ucstart: srcInputStartDate.getValue(),
ucend: srcInputEndDate.getValue(),
ucdir: 'newer',
uclimit: 'max',
ucnamespace: nsStr,
ucprop: 'title'
}));
else if (mode === 'pageswithprop') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'pageswithprop',
pwppropname: srcDropProp.getValue(),
pwplimit: 'max'
}));
Promise.all(promises).then(function(res) {
var list = new Set();
res.forEach(titles => titles.forEach(t => list.add(t)));
var currentVal = listTextarea.getValue();
var newVal = Array.from(list).join('\n');
listTextarea.setValue(currentVal ? currentVal + '\n' + newVal : newVal);
mw.notify('Added ' + list.size + ' pages');
}).catch(e => alert('Error: ' + e));
} catch (e) {
alert("Fetch error: " + e);
}
});
btnSort.on('click', function() {
var v = listTextarea.getValue();
if (v) {
var lines = getNormalizedList(v);
lines.sort((a, b) => sortAsc ? a.localeCompare(b) : b.localeCompare(a));
listTextarea.setValue(lines.join('\n'));
sortAsc = !sortAsc;
}
});
btnDedup.on('click', function() {
var v = listTextarea.getValue();
if (v) listTextarea.setValue(getDeduplicatedList(v).join('\n'));
});
btnClear.on('click', function() {
listTextarea.setValue('');
});
btnSaveProj.on('click', function() {
try {
var currentMode = srcSelect.getValue();
if (['watchlist', 'usercontribs', 'pageswithprop'].indexOf(currentMode) === -1) queryCache[currentMode] = srcInput.getValue();
var saveExcludes = {};
for (var k in protCheckboxes) saveExcludes[k] = protCheckboxes[k].isSelected();
var data = {
version: APP_VERSION,
library: currentLibrary,
source: {
activeMode: currentMode,
namespaces: ($nsSelect.val() || []).map(v => parseInt(v)),
modes: {
cat: {
query: queryCache['cat'] || '',
options: {
pages: chkCatPages.isSelected(),
sub: chkCatSub.isSelected(),
file: chkCatFile.isSelected()
}
},
linksto: {
query: queryCache['linksto'] || '',
options: {
wiki: chkLinkWiki.isSelected(),
trans: chkLinkTrans.isSelected(),
img: chkLinkImg.isSelected(),
redir: dropLinkRedir.getValue(),
toRedir: chkLinkToRedir.isSelected()
}
},
linkson: {
query: queryCache['linkson'] || ''
},
prefix: {
query: queryCache['prefix'] || ''
},
watchlist: {
query: ''
},
search: {
query: queryCache['search'] || ''
},
usercontribs: {
options: {
user: srcInputUser.getValue(),
start: srcInputStartDate.getValue(),
end: srcInputEndDate.getValue()
}
},
pageswithprop: {
options: {
prop: srcDropProp.getValue()
}
}
}
},
settings: {
redir: redirMode.findSelectedItem().getData(),
skipLogic: radSkipExist.findSelectedItem().getData(),
skipNoChange: chkSkipNoChange.isSelected(),
minor: chkMinor.isSelected()
},
filters: {
contains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
notContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
},
categories: {
skip: inpSkipCategories.getValue(),
require: inpSkipNotCategories.getValue()
}
},
rules: rulesRegistry.map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
})),
scripts: {
pre: txtPreScript.getValue(),
post: txtPostScript.getValue()
},
processing: {
summary: inputSummary.getValue(),
list: listTextarea.getValue()
},
protection: {
mode: dropProtMode.getValue(),
excludes: saveExcludes,
target: (radTargetSet.findSelectedItem() || {
getData: () => null
}).getData(),
templateFilter: inpTemplateFilter.getValue()
}
};
var a = document.createElement('a');
a.href = URL.createObjectURL(new Blob([JSON.stringify(data, null, 1)], {
type: "application/json"
}));
a.download = "wawb_project.json";
a.click();
} catch (e) {
alert("Save error: " + e);
}
});
btnLoadProj.on('click', function() {
$fileInput.click();
});
function applyIf(val, action) {
if (val !== undefined && val !== null) action(val);
}
$fileInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
try {
var data = JSON.parse(evt.target.result);
isLoadingProject = true;
// --- 1. SOURCE SETTINGS ---
applyIf(data?.source?.namespaces, v => $nsSelect.val(v.map(String)));
if (data?.source?.modes) {
var m = data.source.modes;
// Merge into queryCache instead of wiping it
for (var key in m) {
if (m[key]?.query !== undefined) queryCache[key] = m[key].query;
}
applyIf(m?.cat?.options?.pages, v => chkCatPages.setSelected(v));
applyIf(m?.cat?.options?.sub, v => chkCatSub.setSelected(v));
applyIf(m?.cat?.options?.file, v => chkCatFile.setSelected(v));
applyIf(m?.linksto?.options?.wiki, v => chkLinkWiki.setSelected(v));
applyIf(m?.linksto?.options?.trans, v => chkLinkTrans.setSelected(v));
applyIf(m?.linksto?.options?.img, v => chkLinkImg.setSelected(v));
applyIf(m?.linksto?.options?.redir, v => dropLinkRedir.setValue(v));
applyIf(m?.linksto?.options?.toRedir, v => chkLinkToRedir.setSelected(v));
applyIf(m?.usercontribs?.options?.user, v => srcInputUser.setValue(v));
applyIf(m?.usercontribs?.options?.start, v => srcInputStartDate.setValue(v));
applyIf(m?.usercontribs?.options?.end, v => srcInputEndDate.setValue(v));
applyIf(m?.pageswithprop?.options?.prop, v => srcDropProp.setValue(v));
}
// --- 2. SETTINGS & SKIP LOGIC ---
applyIf(data?.settings?.redir, v => redirMode.selectItemByData(v));
applyIf(data?.settings?.skipLogic, v => radSkipExist.selectItemByData(v));
applyIf(data?.settings?.skipNoChange, v => chkSkipNoChange.setSelected(v));
applyIf(data?.settings?.minor, v => chkMinor.setSelected(v));
// --- 3. PROTECTION ---
applyIf(data?.protection?.mode, v => dropProtMode.setValue(v));
applyIf(data?.protection?.target, v => radTargetSet.selectItemByData(v));
applyIf(data?.protection?.templateFilter, v => inpTemplateFilter.setValue(v));
if (data?.protection?.excludes) {
for (var k in data.protection.excludes) {
if (protCheckboxes[k]) applyIf(data.protection.excludes[k], v => protCheckboxes[k].setSelected(v));
}
}
// --- 4. LIBRARY ---
applyIf(data?.library?.name, v => currentLibrary.name = v);
applyIf(data?.library?.code, v => currentLibrary.code = v);
if (data?.library?.name || data?.library?.code) updateLibUI();
// --- 5. FILTERS ---
applyIf(data?.filters?.contains?.val, v => inpSkipContains.setValue(v));
applyIf(data?.filters?.contains?.regex, v => togSkipContainsRegex.setValue(v));
applyIf(data?.filters?.notContains?.val, v => inpSkipNotContains.setValue(v));
applyIf(data?.filters?.notContains?.regex, v => togSkipNotContainsRegex.setValue(v));
applyIf(data?.filters?.categories?.skip, v => inpSkipCategories.setValue(v));
applyIf(data?.filters?.categories?.require, v => inpSkipNotCategories.setValue(v));
// --- 6. SCRIPTS & PROCESSING ---
applyIf(data?.scripts?.pre, v => txtPreScript.setValue(v));
applyIf(data?.scripts?.post, v => txtPostScript.setValue(v));
applyIf(data?.processing?.summary, v => inputSummary.setValue(v));
applyIf(data?.processing?.list, v => listTextarea.setValue(v));
// --- 7. DYNAMIC RULES ARRAY ---
if (data?.rules && Array.isArray(data.rules)) {
rulesRegistry.forEach(r => r.row.remove());
rulesRegistry = [];
$rulesList.empty();
data.rules.forEach(r => {
addRule();
var last = rulesRegistry[rulesRegistry.length - 1];
applyIf(r.find, v => last.find.setValue(v));
applyIf(r.replace, v => last.rep.setValue(v));
applyIf(r.regex, v => {
last.regex.setValue(v);
last.flags.setDisabled(!v);
});
applyIf(r.flags, v => last.flags.setValue(v));
applyIf(r.enabled, v => last.setActive(v));
applyIf(r.isFunc, v => last.setFunc(v));
});
if (rulesRegistry.length === 0) addRule();
}
// --- 8. TRIGGER UI UPDATES ---
applyIf(data?.source?.activeMode, v => {
isLoadingProject = false;
srcSelect.setValue(v);
srcSelect.emit('change', v);
isLoadingProject = true;
});
isLoadingProject = false;
setStatus('Project loaded');
} catch (err) {
alert("Load Error: " + err);
}
$fileInput.val('');
};
reader.readAsText(file);
});
if (CAN_MOVE || IS_ADMIN) {
togAdminEnable.on('change', function(val) {
if (!currentTitle) {
updateInterfaceMode();
return;
}
if (val) {
Editor.setValue(originalWikitext);
updateInterfaceMode();
renderDiff();
setStatus('Ready (Page actions)');
} else processPageContent();
});
}
if (CAN_MOVE) {
btnAdminMove.on('click', function() {
if (!currentVars['$xA']) {
mw.notify('Variable $xA not set', {
type: 'error'
});
return;
}
new mw.Api().postWithToken('csrf', {
action: 'move',
assert: 'user', //throw 'assertuserfailed' when logged-out
from: currentTitle,
to: currentVars['$xA'],
reason: inputSummary.getValue() + SUMMARY_SUFFIX,
movetalk: chkMovTalk.isSelected(),
movesubpages: chkMovSub.isSelected(),
noredirect: chkMovRedirect.isSelected()
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Move failed: ' + e));
});
}
if (IS_ADMIN) {
btnAdminDel.on('click', function() {
new mw.Api().postWithToken('csrf', {
action: 'delete',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
if (chkDelTalk.isSelected()) new mw.Api().postWithToken('csrf', {
action: 'delete',
title: mw.Title.newFromText(currentTitle).getTalkPage().getPrefixedText(),
reason: 'Talk page of deleted page'
});
removeTopLine();
loadNextPage();
}).catch(e => alert('Delete failed: ' + e));
});
btnAdminProt.on('click', function() {
var protections = [];
if (dropProtEdit.getValue()) protections.push('edit=' + dropProtEdit.getValue());
if (dropProtMove.getValue()) protections.push('move=' + dropProtMove.getValue());
new mw.Api().postWithToken('csrf', {
action: 'protect',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
protections: protections.join('|'),
expiry: inpProtExpiry.getValue() || 'infinite',
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Protect failed: ' + e));
});
}
Editor.init();
resetPanels();
});
$(window).on('beforeunload', function() {
return "You have unsaved work.";
});
}).catch(e => console.error("wAwB Loader Error:", e));
//</nowiki>
8vlrecwcelgopt1itjuzi0s9gujjv8p
750464
750462
2026-07-08T05:03:53Z
Ponor
47975
save scroll position per page and per viewing mode; if at the very bottom, stick to bottom for all susequent pages
750464
javascript
text/javascript
/*
* wAwB – An in-browser application for automated editing of wiki pages.
* Features: customizable regex or JavaScript search-and-replace rules,
* custom JavaScript pre/post-processing functions and function libraries,
* granular protection or targeting of different parts of wikitext,
* a full-fledged CodeMirror editor, and options to move, delete, and protect pages.
* Author: [[User:Ponor]]
* Documentation: [[User:Ponor/wAwB]]
* License: GNU General Public License (GPL)
*/
//<nowiki>
mw.loader.using([
'oojs-ui-core',
'oojs-ui-widgets',
'oojs-ui-windows',
'mediawiki.api',
'mediawiki.diff.styles',
'mediawiki.util',
'mediawiki.page.gallery.styles',
'oojs-ui.styles.icons-content',
'oojs-ui.styles.icons-interactions',
'oojs-ui.styles.icons-movement',
'oojs-ui.styles.icons-moderation',
'oojs-ui.styles.icons-editing-core',
'oojs-ui.styles.icons-editing-advanced'
]).then(function() {
// =====================================================================
// 1. STATE & CONFIGURATION
// =====================================================================
var SCRIPT_TIMEOUT_MS = window.wa_timeout || 5000;
var FETCH_SAFETY_LIMIT = window.wa_fetchLimit || 10000;
var APP_NAME = "wAwB";
var DO_TAG = false;
var SUMMARY_SUFFIX = window.wa_suffix || " [[:w:en:User:Ponor/wAwB| #wAwB]]";
var APP_VERSION = "0.7";
var DOC_URL = window.wa_docUrl || "https://en.wikipedia.org/wiki/User:Ponor/wAwB";
document.title = window.wa_editIn || "Edit in wAwB";
var PERMS = {
canSave: false,
allowBot: false,
saveDelay: 0
};
var IS_ADMIN = mw.config.get('wgUserGroups').includes('sysop');
var CAN_MOVE = IS_ADMIN || mw.config.get('wgUserGroups').includes('extendedmover') || mw.config.get('wgUserGroups').includes('filemover') || mw.config.get('wgUserGroups').includes('pagemover');
var WIKI = mw.config.get('wgDBname');
var ON_NOTIFY = window.wa_onNotification || 'warn'; // warn, stop, nothing
var ON_NOTIFY_FREQ = 30 * 1000; // every 30s
var SAVED_RUN = 0;
var SAVED_SESSION = 0;
var currentPageExists = false;
var isRunning = false;
var isFetching = false;
var currentTitle = null;
var currentVars = {};
var currentLibrary = {
name: null,
code: null
};
var originalWikitext = "";
var currentPageSummaryAppend = "";
var currentPageSummaryOverride = null;
var baseRevId = 0;
var currentViewMode = 'diff';
var activeView = { page: '', mode: '' };
var scrollCache = {}; // Stores specific positions, e.g., { "PageName|diff": { top: 150, isBottom: false } }
var globalModeBottom = { diff: false, preview: false }; // Tracks the "sticky bottom" rule per mode
var autoSaveTimer = null;
var propNamesLoaded = false;
var hasNewSources = false;
var currentHeightMode = 1; // 0=25%, 1=45% (default), 2=72%
var heightValues = ['25%', '45%', '72%'];
// EXTERNAL RULES STATE
var wikiTypos = [];
var localTypos = [];
// LOADING FLAG
var isLoadingProject = false;
// NAMESPACE ALIASES
var nsIds = mw.config.get('wgNamespaceIds');
var catAliases = [],
fileAliases = [];
for (var key in nsIds) {
if (nsIds[key] === 14) catAliases.push(key.replace(/_/g, ' '));
if (nsIds[key] === 6) fileAliases.push(key.replace(/_/g, ' '));
}
catAliases.sort((a, b) => b.length - a.length);
fileAliases.sort((a, b) => b.length - a.length);
var REGEX_CAT_PFX = catAliases.map(mw.util.escapeRegExp).join('|');
var REGEX_FILE_PFX = fileAliases.map(mw.util.escapeRegExp).join('|');
// MASTER PROTECTION DEFINITIONS
var PROTECTION_DEFS = [{
id: 'nowiki',
isOn: true,
label: 'Nowiki: <nowiki>',
regex: /<nowiki>[\s\S]*?<\/nowiki>|<nowiki\s*\/>/gi
},
{
id: 'comments',
isOn: true,
label: 'Comments: <!' + '-- -->',
regex: new RegExp('<!' + '--[\\s\\S]*?--' + '>', 'g')
},
{
id: 'headers',
isOn: false,
label: 'Headers: == Title ==',
regex: /^==+[\s\S]+?==+\s*$/gm
},
{
id: 'templates',
isOn: false,
label: 'Templates: {{...}}',
open: '{{',
close: '}}',
species: null,
regex: null
},
{
id: 'tables',
isOn: false,
label: 'Tables: {|...|}',
open: '\n{|',
close: '\n|}',
regex: null
},
{
id: 'images',
isOn: false,
label: 'Images: [[File:...|...|...]]',
open: '[[',
close: ']]',
species: '(?:' + REGEX_FILE_PFX + ')\\s*:',
regex: null
},
{
id: 'refs',
isOn: true,
label: 'Refs: <ref...',
regex: /<ref[^>]*?\/>|<ref[^>]*?(?<!\/)>[\s\S]*?<\/ref>/gi
},
{
id: 'blocks',
isOn: false,
label: 'Blocks: math, gallery...',
regex: null
},
{
id: 'categories',
isOn: true,
label: 'Categories: [[Category:...]]',
regex: new RegExp('\\[\\[\\s*(' + REGEX_CAT_PFX + ')\\s*:[^\\]]+\\]\\]', 'giu')
},
{
id: 'files',
isOn: true,
label: 'File names: File:...',
regex: new RegExp('(?<=\\[\\[\\s*:?(:?' + REGEX_FILE_PFX + ')\\s*:)[^|\\]]+' + '|^\\s*(?:' + REGEX_FILE_PFX + ')\\s*:([^\\][}{|\\n]{1,150}\\.(?:svg|png|jpe?g|gif|tiff|webp|xcf|mp3|midi|ogg|webm|flac|wav|mpe?g|pdf|djv))', 'gmiu')
},
{
id: 'targets',
isOn: false,
label: 'Targets of [[...|',
regex: /(?<=\[\[:?)[^|\]]+?(?=\||\]\])/g
},
{
id: 'extlinks',
isOn: true,
label: 'External links: [...]',
regex: /(?<=\[)(https?:\/\/|ftps?:\/\/|mailto:)[^\]]+(?=\])/gi
},
{
id: 'urls',
isOn: true,
label: 'URLs: http...',
regex: /https?:\/\/[^\s<>[\]"'`()]+/gi
}
];
// =====================================================================
// 2. CSS STYLES
// =====================================================================
var styles = `
* { box-sizing: border-box; }
#wa-root { font-family: sans-serif; height: 100vh; width: 100vw; overflow: hidden; display: flex; font-size: 14px; }
#wa-left-panel { width: 400px; min-width: 400px; max-width: 400px; background: var(--background-color-base, #fff); border-right: 1px solid #c8ccd1; display: flex; flex-direction: column; z-index: 10; overflow-x: hidden; }
#wa-left-panel h3 { color: #3f6fcf; text-align: center; margin: 12px 0 0 0; }
#wa-username { color: #3f6fcf; text-align: center; margin: 2px 0; font-size: 92%; }
#wa-content-area { flex: 1; padding: 10px 10px 100px 10px; overflow-y: auto; overflow-x: hidden; }
#wa-right-panel { flex: 1; display: flex; flex-direction: column; height: 100%; background: var(--background-color-interactive, #eaecf0); overflow: hidden; }
#wa-visual-output { flex: 0 0 45%; min-height: 0; overflow-y: auto; background: var(--background-color-base, #fff); padding: 20px; border-bottom: 1px solid #c8ccd1; }
.wa-editor-header { flex: 0 0 40px; min-height: 40px; padding: 0 10px; background: var(--background-color-interactive-subtle, #f8f9fa); border-bottom: 1px solid #c8ccd1; display: flex; gap: 25px; justify-content: space-between; align-items: center; z-index: 10; }
.wa-editor-header.wa-dirty { background: var(--background-color-warning-subtle, #fdf2d5); border-bottom: 1px solid #e6a700; }
@keyframes wa-header-pulse { 0% { background-color: var(--background-color-destructive-subtle, #fee7e6); } 50% { background-color: var(--background-color-interactive-subtle, transparent); } 100% { background-color: var(--background-color-destructive-subtle, #fee7e6); } }
.wa-editor-header.wa-header-alert { border-bottom: 2px solid var(--border-color-destructive, #b32424) !important; animation: wa-header-pulse 1s 60 ease-in-out forwards !important; }
.wa-header-left { flex: 1; display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.wa-header-right { flex: 0 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--color-placeholder, #72777d); font-size: 0.9em; }
.wa-title-link { font-weight: bold; font-size: 1.1em; color: var(--color-progressive--focus, #36c) !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 40%; }
.wa-title-link:hover { text-decoration: underline; }
#wa-status-indicator { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background-color: #00af89; cursor: help; transition: background-color 0.2s; margin-right: 2px; }
#wa-status-indicator.wa-status-working { background-color: #36c; animation: wa-pulse-blue 1.5s infinite; }
#wa-status-indicator.wa-status-error { background-color: #bf3c2c; }
@keyframes wa-pulse-blue { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.wa-header-sep { border-left: 1px solid #ccc; height: 16px; flex-shrink: 0; margin: 0 2px; }
#wa-summary-preview { flex-grow: 1; color: #d00; font-style: italic; white-space: nowrap; text-overflow: ellipsis; overflow-x: auto; background: transparent; border: none; outline: none; box-shadow: none; min-width: 50px; padding: 2px 5px; scrollbar-width: none; -ms-overflow-style: none; font-size: 1em; }
#wa-summary-preview::-webkit-scrollbar { display: none; }
#wa-summary-preview:hover { background: rgba(0, 0, 0, 0.05); cursor: text; }
#wa-summary-preview:focus { background: #fff; }
.wa-info-container { margin-right: 10px; }
.wa-tools-container { display: flex; align-items: center; gap: 2px; }
.wa-resize-container { display: flex; flex-direction: column; justify-content: center; height: 100%; margin-left: 10px; padding-left: 5px; border-left: 1px solid #ccc; }
.wa-resize-btn { cursor: pointer; color: #72777d; user-select: none; width: 20px; height: 14px; display: flex; align-items: center; justify-content: center; transition: color 0.1s ease-in-out; }
.wa-resize-btn:hover { color: #36c; }
.wa-resize-btn.wa-resize-disabled { color: #ccc; cursor: default; }
#wa-proc-header { margin-top: 15px !important; border-bottom: none !important; cursor: default; }
#wa-proc-title { font-weight: bold; padding: 10px; display: block; }
#wa-proc-content { padding: 0 10px 15px 10px; }
#wa-editor-area { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--background-color-base, #fff); position: relative; overflow: hidden; }
#wa-editor-textarea { flex: 1; height: 100%; font-family: monospace; font-size: 13px; border: none; outline: none; padding: 10px; resize: none; width: 100%; }
.cm-editor { height: 100% !important; flex: 1; }
.wa-section-header { margin-top: 12px; border-bottom: 1px solid #eee; width: 100%; display: block; margin-left: 0 !important; }
#wa-content-area .wa-section-header:first-child, #wa-content-area .wa-section-header.oo-ui-buttonElement-frameless:first-child { margin-top: 0; margin-left: 0 !important; }
.wa-section-header > .oo-ui-buttonElement-button { text-align: left; padding: 10px 10px !important; margin: 0 !important; display: block; width: 100%; position: relative; border-left: 3px solid #3f6fcf !important; border-radius: 3px !important; background-color: transparent !important; }
.wa-section-header > .oo-ui-buttonElement-button:focus { outline: none !important; }
.wa-section-header .oo-ui-labelElement-label { font-weight: bold; padding-left: 0 !important; margin-left: 0 !important; color: var(--color-base, #202122); }
.wa-section-header .oo-ui-indicatorElement-indicator { position: absolute; right: 10px !important; top: 50%; margin-top: -10px; left: auto !important; width: 20px; }
.wa-foldable-content { display: none; padding: 10px 0; }
.wa-source-options { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; border-top: none; padding: 8px; margin-bottom: 10px; font-size: 0.9em; }
.wa-opt-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 5px; }
.wa-opt-label { font-weight: bold; width: 100%; margin-bottom: 5px; color: var(--color-base, #202122); }
.wa-opt-row > div { margin-top: 8px !important; margin-bottom: 8px !important; }
.wa-rule-row { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; padding: 8px; margin-bottom: 8px; border-radius: 4px; display: flex; align-items: stretch; transition: background-color 0.3s; }
.wa-rule-row.wa-highlight { background-color: var(--background-color-interactive, #eaecf0); border-color: #36c; }
.wa-rule-controls { display: flex; flex-direction: column; justify-content: center; gap: 0px; padding-right: 4px; border-right: 1px solid #eee; margin-right: 8px; }
.wa-rule-btn { margin: 0 !important; margin-right: 0 !important; margin-left: 0 !important; }
.wa-rule-btn > .oo-ui-buttonElement-button { margin: 0 !important; }
.wa-rule-content { flex: 1; min-width: 0; }
.wa-rule-opt-row { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
#wa-ns-selector { width: 100%; margin-bottom: 10px; font-family: sans-serif; font-size: 0.9em; border: 1px solid #a2a9b1; }
.wa-lib-dialog > .oo-ui-window-frame { width: 80vw !important; max-width: none !important; height: 80vh !important; max-height: none !important; }
.wa-lib-editorwrapper { height: 100%; border: 1px solid #c8ccd1; position: relative; boxSizing: border-box; }
.wa-page-list-raw textarea { font-family: monospace; font-size: 0.9em; white-space: pre; overflow-x: auto; }
.wa-list-running textarea { background-color: var(--background-color-neutral-subtle, #f8f8f8) !important; color: var(--color-base, #202122) !important; }
.wa-grid-container { display: flex; gap: 6px; margin-bottom: 10px; }
.wa-grid-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wa-grid-col .oo-ui-buttonWidget { width: 100%; }
.wa-grid-col .oo-ui-buttonWidget .oo-ui-buttonElement-button { width: 100%; text-align: center; justify-content: center; }
.wa-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 4px; border-bottom: 1px solid #eee; padding-bottom: 4px; margin-bottom: 4px; }
.wa-list-counter { margin-right: auto; font-weight: bold; color: var(--color-subtle, #54595d); font-size: 0.9em; padding-left: 5px; }
.wa-project-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px; margin: 8px 0; justify-content: center; }
.wa-project-bar .oo-ui-buttonElement-button { padding-left: 36px !important; padding-right: 12px !important; font-size: 0.9em; }
.wa-project-bar .oo-ui-iconElement-icon { left: 10px !important; }
.wa-settings-header { font-weight: bold; color: var(--color-subtle, #54595d); margin-bottom: 8px; display: block; text-transform: uppercase; font-size: 0.9em; }
.wa-setting-row { display: flex; align-items: center; margin-bottom: 6px; }
.wa-bot-row { background: var(--background-color-success-subtle, #dff2eb); border: 1px solid #a5d6a7; padding: 8px; margin-bottom: 10px; border-radius: 4px; display: flex; align-items: center; justify-content: flex-start; gap: 15px; }
table.diff { width: 100%; font-family: "Adwaita Mono", "Courier New", monospace }
table.diff td { vertical-align: top; }
table.diff tr:hover td { background-color: var(--background-color-progressive-subtle--hover, #d9e2ff); cursor: pointer; }
@keyframes wa-pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); border-color: #ff0000; } 70% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); border-color: #ff0000; } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); border-color: #ff0000; } }
.wa-summary-warning input { animation: wa-pulse-red 1s infinite; border-color: #ff0000 !important; }
`;
$('<style>').text(styles).appendTo('head');
$('body').empty();
// =====================================================================
// 3. HELPER FUNCTIONS
// =====================================================================
function checkPermissions() {
return new Promise(function(resolve) {
var api = new mw.Api();
var projectNs = mw.config.get('wgFormattedNamespaces')[4];
var checkTitles = {
'permissions': projectNs + ':AutoWikiBrowser/CheckPageJSON',
'tag': 'MediaWiki:Tag-wAwB'
};
api.get({
action: 'query',
prop: 'revisions',
titles: Object.values(checkTitles).join('|'),
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(data) {
var pagePerms = data.query.pages.find(p => p.title === checkTitles['permissions']);
var pageTag = data.query.pages.find(p => p.title === checkTitles['tag']);
DO_TAG = pageTag.missing === undefined;
var userName = mw.config.get('wgUserName');
var userGroups = mw.config.get('wgUserGroups');
var isSysop = userGroups.includes('sysop');
if (!pagePerms.missing) {
try {
var content = pagePerms.revisions[0].slots.main.content;
var json = JSON.parse(content);
var inEnabledUsers = json.enabledusers && json.enabledusers.includes(userName);
var inEnabledBots = json.enabledbots && json.enabledbots.includes(userName);
var isBotGroup = userGroups.includes('bot');
var canSave = inEnabledUsers || inEnabledBots || isSysop;
var allowBot = inEnabledBots && isBotGroup;
resolve({
canSave: canSave,
allowBot: allowBot,
saveDelay: 0
});
} catch (e) {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
} else {
var editCount = mw.config.get('wgUserEditCount');
if (editCount > 500) resolve({
canSave: true,
allowBot: false,
saveDelay: 20000
});
else resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
}).catch(function() {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
});
});
}
function getUserCode(widget, globalName) {
var val = widget.getValue().trim();
if (!val || val.startsWith('// Enter')) {
if (window[globalName] && typeof window[globalName] === 'function') {
var s = window[globalName].toString();
return s.substring(s.indexOf('{') + 1, s.lastIndexOf('}'));
}
return "";
}
if (val.startsWith('function')) {
return val.substring(val.indexOf('{') + 1, val.lastIndexOf('}'));
}
return val;
}
function normalizeLine(line) {
if (!line) return null;
// Pass through comments/STOP commands (trimmed)
if (line.trim().startsWith('####')) return line.trim();
// Handle Title|Variables
var parts = line.split('|');
var title = parts[0].trim();
if (!title) return null; // Skip if title is empty
// Reassemble: Clean Title + Original Variables (preserving whitespace)
var rest = parts.length > 1 ? parts.slice(1).join('|') : null;
return title + (rest !== null ? '|' + rest : '');
}
function getNormalizedList(text) {
if (!text) return [];
return text.split('\n')
.map(normalizeLine)
.filter(function(l) {
return l !== null;
});
}
function getDeduplicatedList(text) {
if (!text) return [];
var seen = new Set();
var out = [];
var lines = text.split('\n');
for (var i = 0; i < lines.length; i++) {
var clean = normalizeLine(lines[i]);
if (clean && !seen.has(clean)) {
seen.add(clean);
out.push(clean);
}
}
return out;
}
function parseTypoContent(content) {
if (!content) return [];
try {
var $wrapper = $('<body>').html(content);
var rules = [];
$wrapper.find('Typo:not([disabled])').each(function() {
var $t = $(this);
var find = $t.attr('find');
var replace = $t.attr('replace');
if (find && replace !== undefined) {
rules.push({
find: find,
replace: replace,
regex: true,
flags: 'gmu',
enabled: true,
isFunc: false
});
}
});
return rules;
} catch (e) {
return [];
}
}
function updateSummaryPreview(baseText) {
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : (baseText || "");
var finalSum = base + (currentPageSummaryAppend || "");
var previewText = finalSum ? injectVars(finalSum) : '';
$('#wa-summary-preview').val(previewText);
}
function injectVars(text) {
if (!text) return "";
return text.replace(/\$x([A-Z]|x)/g, function(match) {
return currentVars[match] || match; // Swap it, or leave it alone if undefined
});
}
function captureViewScroll() {
var $container = $('#wa-visual-output');
if (!$container.length || !activeView.mode) return;
var scrollTop = $container.scrollTop();
var innerHeight = $container.innerHeight();
var scrollHeight = $container[0].scrollHeight;
var hasScrollbar = scrollHeight > innerHeight;
var isBottom = hasScrollbar && (scrollTop + innerHeight >= scrollHeight - 10);
// Save the exact position for this specific page AND mode combo
var cacheKey = activeView.page + '|' + activeView.mode;
scrollCache[cacheKey] = {
top: scrollTop,
isBottom: isBottom
};
// Update the global "sticky bottom" tracker for this specific mode
globalModeBottom[activeView.mode] = isBottom;
}
function restoreViewScroll(targetPage, targetMode) {
var $container = $('#wa-visual-output');
if (!$container.length) return;
var cacheKey = targetPage + '|' + targetMode;
var savedState = scrollCache[cacheKey];
if (savedState) {
// Rule A: We have been to this exact page in this exact mode before.
// Restore exactly where we left off.
if (savedState.isBottom) {
$container.scrollTop($container[0].scrollHeight);
} else {
$container.scrollTop(savedState.top);
}
} else if (targetMode === activeView.mode && globalModeBottom[targetMode]) {
// Rule B: It is a brand NEW page, but we stayed in the SAME mode,
// and we were reading from the bottom of the previous page. Stick to bottom.
$container.scrollTop($container[0].scrollHeight);
} else {
// Rule C: We switched to a new mode we haven't seen on this page yet,
// or it's a new page without the sticky bottom active. Reset to top.
$container.scrollTop(0);
}
// Update the active tracker so the NEXT capture knows what to record
activeView.page = targetPage;
activeView.mode = targetMode;
}
function resetViewScroll() {
activeView = { page: '', mode: '' };
scrollCache = {};
globalModeBottom = { diff: false, preview: false };
}
// =====================================================================
// 4. UI CONSTRUCTION
// =====================================================================
checkPermissions().then(function(pState) {
PERMS = pState;
var $main = $('<div>').attr('id', 'wa-root').appendTo('body');
var $left = $('<div>').attr('id', 'wa-left-panel').appendTo($main);
$left.append($('<h3>').append($('<a>').attr('href', DOC_URL).attr('target', '_blank').text(APP_NAME).css({
'text-decoration': 'none',
'color': 'inherit'
})));
$left.append($('<div>').attr('id', 'wa-username').append($('<a>').attr('href', mw.util.getUrl('Special:Contributions/' + mw.config.get('wgUserName'))).attr('target', '_blank').text('User: ' + mw.config.get('wgUserName')).css({
'text-decoration': 'none',
'color': 'inherit'
})));
var btnSaveProj = new OO.ui.ButtonWidget({
icon: 'download',
label: 'Save project',
framed: false,
flags: 'progressive'
});
var btnLoadProj = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load project',
framed: false
});
var $projBar = $('<div>').addClass('wa-project-bar').append(btnSaveProj.$element, btnLoadProj.$element);
$left.append($projBar);
var $fileInput = $('<input type="file" accept=".json">').hide().appendTo('body');
var $content = $('<div>').attr('id', 'wa-content-area').appendTo($left);
var $right = $('<div>').attr('id', 'wa-right-panel').appendTo($main);
var $editorHeader = $('<div>').addClass('wa-editor-header').appendTo($right);
var $headerLeft = $('<div>').addClass('wa-header-left').appendTo($editorHeader);
var $statusIndicator = $('<span>').attr('id', 'wa-status-indicator').attr('title', 'Ready').appendTo($headerLeft);
var $titleLink = $('<a>').addClass('wa-title-link').text('Page content').attr('target', '_blank').appendTo($headerLeft);
$('<span>').addClass('wa-header-sep').appendTo($headerLeft);
var $summaryPreview = $('<input type="text">').attr('id', 'wa-summary-preview').attr('autocomplete', 'off').appendTo($headerLeft);
var $headerRight = $('<div>').addClass('wa-header-right').appendTo($editorHeader);
var $infoContainer = $('<span>').addClass('wa-info-container').appendTo($headerRight);
var $toolsContainer = $('<div>').addClass('wa-tools-container').appendTo($headerRight);
var $resizeContainer = $('<div>').addClass('wa-resize-container').appendTo($headerRight);
var $adminTools = $('<div>').addClass('wa-admin-tools').hide().appendTo($toolsContainer);
// Wide chevron SVGs
var svgUp = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 10 L12 2 L22 10" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var svgDown = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 2 L12 10 L22 2" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var $btnSizeUp = $('<div>').addClass('wa-resize-btn').html(svgUp).attr('title', 'Decrease view size');
var $btnSizeDown = $('<div>').addClass('wa-resize-btn').html(svgDown).attr('title', 'Increase view size');
$resizeContainer.append($btnSizeUp, $btnSizeDown);
function setPanelHeight(modeIndex) {
currentHeightMode = modeIndex;
if (currentHeightMode < 0) currentHeightMode = 0;
if (currentHeightMode > 2) currentHeightMode = 2;
$('#wa-visual-output').css('flex-basis', heightValues[currentHeightMode]);
$btnSizeUp.toggleClass('wa-resize-disabled', currentHeightMode === 0);
$btnSizeDown.toggleClass('wa-resize-disabled', currentHeightMode === 2);
}
$btnSizeUp.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode - 1);
});
$btnSizeDown.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode + 1);
});
setPanelHeight(1);
if (CAN_MOVE) {
var btnAdminMove = new OO.ui.ButtonWidget({
icon: 'move',
title: 'Move page to $xA',
disabled: true,
framed: false
});
$adminTools.append(btnAdminMove.$element).show();
}
if (IS_ADMIN) {
var btnAdminDel = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Delete page',
disabled: true,
framed: false
});
var btnAdminProt = new OO.ui.ButtonWidget({
icon: 'lock',
title: 'Protect page',
disabled: true,
framed: false
});
$adminTools.append(btnAdminDel.$element, btnAdminProt.$element).show();
}
var btnManualEdit = new OO.ui.ButtonWidget({
icon: 'edit',
title: 'Open in manual editor',
framed: false,
disabled: true
});
var btnWatch = new OO.ui.ButtonWidget({
icon: 'star',
title: 'Watch this page',
framed: false,
disabled: true,
accessKey: 'w'
});
$toolsContainer.append(btnManualEdit.$element, btnWatch.$element);
var $visualOut = $('<div>').attr('id', 'wa-visual-output').html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready to start...</div>').prependTo($right);
var $editorArea = $('<div>').attr('id', 'wa-editor-area').appendTo($right);
var $textArea = $('<textarea>').attr('id', 'wa-editor-textarea').attr('placeholder', 'Page text will appear here...').appendTo($editorArea);
function setStatus(msg, type) {
if (!msg) msg = "Ready";
$statusIndicator.attr('title', msg).removeClass('wa-status-error wa-status-working');
if (type === 'error') $statusIndicator.addClass('wa-status-error');
if (type === 'working') $statusIndicator.addClass('wa-status-working');
}
// EDITOR OBJECT
var Editor = {
mode: 'textarea',
cmInstance: null,
init: function() {
var self = this;
mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.mode.mediawiki']).then(function(require) {
try {
self.cmInstance = new(require('ext.CodeMirror'))($textArea[0], (require('ext.CodeMirror.mode.mediawiki')).mediawiki());
self.cmInstance.initialize();
self.mode = 'codemirror';
} catch (e) {
console.error("CM Error", e);
}
}).catch(function(err) {
console.error("CM Load Error:", err);
});
$textArea.on('input', updateDirtyState);
},
getValue: function() {
return (this.mode === 'codemirror' && this.cmInstance) ? this.cmInstance.view.state.doc.toString() : $textArea.val();
},
setValue: function(text) {
$textArea.val(text);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.dispatch({
changes: {
from: 0,
to: this.cmInstance.view.state.doc.length,
insert: text
}
});
} else {
$textArea[0].dispatchEvent(new Event('input'));
}
},
setDisabled: function(d) {
$textArea.prop('disabled', d);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.contentDOM.contentEditable = !d;
$($textArea).parent().find('.cm-editor').css('opacity', d ? 0.5 : 1);
}
},
scrollToLine: function(n) {
if (isNaN(n)) return;
if (this.mode === 'codemirror' && this.cmInstance) {
var v = this.cmInstance.view;
var l = v.state.doc.line(n);
v.dispatch({
effects: v.constructor.scrollIntoView(l.from, {
y: 'center'
}),
selection: {
anchor: l.from
}
});
v.focus();
}
}
};
var WorkerEngine = {
activeWorker: null,
workerURL: null,
currentLibCode: null,
timeoutTimer: null,
initWorker: function(libCode) {
this.destroy(); // Clean up existing if any
this.currentLibCode = libCode || "";
var scriptContent = this.currentLibCode + "\n\n" + `
self.onmessage = async function(e) {
try {
var data = e.data;
var inputs = data.texts || [data.text];
var vars = data.vars;
var outputs = [];
// Helper to construct async functions dynamically
var AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
function inject(str) {
if (!str) return "";
return str.replace(/\\$x([A-Z]|x)/g, function(m) { return vars[m] || ""; });
}
// Returns a Promise and handles 'await' inside user code
async function execUserFunc(code, currentText, currentVars, sharedObj) {
if (!code || code.trim() === "") return currentText;
try {
var func = new AsyncFunction('text', 'vars', 'shared', code);
var res = await func(currentText, currentVars, sharedObj);
if (res && typeof res === 'object' && res.skip) {
return { _skipSignal: true, reason: res.reason || 'Script-requested skip' };
}
return (res !== undefined) ? res : currentText;
} catch (err) {
throw err; // or: return currentText
}
}
var shared = {}; // Shared context for this page
for (var i = 0; i < inputs.length; i++) {
var text = inputs[i];
// 1. Pre-Process
var preRes;
if (data.preCode && data.preCode.trim() !== "") {
preRes = await execUserFunc(data.preCode, text, vars, shared);
} else if (typeof wAwB_Pre === 'function') {
try {
preRes = await wAwB_Pre(text, vars, shared);
if (preRes && typeof preRes === 'object' && preRes.skip) {
preRes = { _skipSignal: true, reason: preRes.reason || 'Script-requested skip' };
}
} catch (err) { preRes = text; }
} else {
preRes = text;
}
if (preRes && preRes._skipSignal) {
self.postMessage({ skipped: true, reason: preRes.reason });
return;
}
text = (preRes !== undefined) ? preRes : text;
// 2. Rules Processing
if (data.rules && data.rules.length > 0) {
data.rules.forEach(function(rule) {
var findStr = inject(rule.find);
if (!findStr) return;
if (rule.isFunc) {
try {
var userFunc = new Function('match', 'groups', 'vars', 'shared', rule.replace);
text = text.replace(new RegExp(findStr, (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '')), function(...args) {
var match = args[0];
var groups = args.slice(1, -2);
try {
var res = userFunc(match, groups, vars, shared);
return res !== undefined ? res : match;
} catch (err) { return match; }
});
} catch (e) {}
} else {
var repStr = inject(rule.replace).replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
if (rule.regex) {
try {
var flags = (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '');
text = text.replace(new RegExp(findStr, flags), repStr);
} catch (e) {}
} else {
var finalFind = findStr.replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
text = text.split(finalFind).join(repStr);
}
}
});
}
// 3. Post-Process
var postRes;
if (data.postCode && data.postCode.trim() !== "") {
postRes = await execUserFunc(data.postCode, text, vars, shared);
} else if (typeof wAwB_Post === 'function') {
try {
postRes = await wAwB_Post(text, vars, shared);
if (postRes && typeof postRes === 'object' && postRes.skip) {
postRes = { _skipSignal: true, reason: postRes.reason || 'Script-requested skip' };
}
} catch (err) { postRes = text; }
} else {
postRes = text;
}
if (postRes && postRes._skipSignal) {
self.postMessage({ skipped: true, reason: postRes.reason });
return;
}
text = (postRes !== undefined) ? postRes : text;
outputs.push(text);
}
self.postMessage({ success: true, texts: outputs, summaryAppend: shared.summaryAppend, summaryOverride: shared.summaryOverride });
} catch (err) { self.postMessage({ success: false, error: err.toString() }); }
};
`;
var blob = new Blob([scriptContent], {
type: 'application/javascript'
});
this.workerURL = URL.createObjectURL(blob);
this.activeWorker = new Worker(this.workerURL);
},
run: function(payload) {
var self = this;
return new Promise(function(resolve, reject) {
// Re-init if no worker exists, or if the user changed the library code
if (!self.activeWorker || self.currentLibCode !== (payload.libraryCode || "")) {
self.initWorker(payload.libraryCode);
}
if (self.timeoutTimer) clearTimeout(self.timeoutTimer);
self.timeoutTimer = setTimeout(function() {
self.destroy(); // Assassinate the stuck worker
reject("Script timed out (" + SCRIPT_TIMEOUT_MS + "ms).");
}, SCRIPT_TIMEOUT_MS);
self.activeWorker.onmessage = function(e) {
clearTimeout(self.timeoutTimer);
if (e.data.skipped) resolve({
skipped: true,
reason: e.data.reason
});
else if (e.data.success) resolve({
success: true,
texts: e.data.texts,
summaryAppend: e.data.summaryAppend,
summaryOverride: e.data.summaryOverride
});
else reject(e.data.error);
};
self.activeWorker.postMessage(payload);
});
},
destroy: function() {
if (this.activeWorker) {
this.activeWorker.terminate();
this.activeWorker = null;
}
if (this.workerURL) {
URL.revokeObjectURL(this.workerURL);
this.workerURL = null;
}
if (this.timeoutTimer) {
clearTimeout(this.timeoutTimer);
this.timeoutTimer = null;
}
}
};
var PageProtector = {
store: [],
getKey: function() {
var id = this.store.length.toString();
var p = "";
for (var i = 0; i < id.length; i++) {
p += String.fromCharCode(0xE010 + parseInt(id[i]));
}
return '\uE000' + p + '\uE001';
},
protect: function(text, mode, config, templateSpecies = null) {
this.store = [];
var self = this;
var safeRep = function(t, r) {
return t.replace(r, function(m) {
if (!m) return m;
var key = self.getKey();
self.store.push(m);
return key;
});
};
var shouldProcess = function(id) {
if (mode === 'target') return config === id;
return config[id] === true;
};
var matchedBrackets = function(text, op, cl, species = '') {
var newText = "",
depth = 0,
start = 0,
cursor = 0;
var speciesRegex = species ? new RegExp(species, 'iu') : null;
for (var i = 0; i < text.length; i++) {
if (text[i] === op[0] && text.slice(i, i + op.length) === op) {
if (depth === 0) start = i;
depth++;
i += op.length - 1;
} else if (text[i] === cl[0] && text.slice(i, i + cl.length) === cl) {
if (depth > 0) {
depth--;
if (depth === 0) {
var chunk = text.substring(start, i + cl.length);
if (!speciesRegex || speciesRegex.test(chunk)) {
var key = self.getKey();
self.store.push(chunk);
newText += text.substring(cursor, start) + key;
} else {
newText += text.substring(cursor, i + cl.length);
}
cursor = i + cl.length;
}
i += cl.length - 1;
}
}
}
newText += text.substring(cursor);
return newText;
};
PROTECTION_DEFS.forEach(function(def) {
if (shouldProcess(def.id)) {
if (def.id === 'blocks') {
['math', 'pre', 'source', 'syntaxhighlight', 'code', 'gallery'].forEach(t => text = safeRep(text, new RegExp('<' + t + '[^>]*?>[\\s\\S]*?<\\/' + t + '>|<' + t + '[^>]*?/>', 'gi')));
} else if (['templates', 'tables', 'images'].includes(def.id)) {
var activeSpecies = (def.id === 'templates') ? templateSpecies : def.species;
text = matchedBrackets(text, def.open, def.close, activeSpecies || '');
} else if (def.regex) {
text = safeRep(text, def.regex);
}
}
});
return text;
},
restore: function(text) {
var self = this;
var loop = 100;
while (/(\uE000[\uE010-\uE019]+\uE001)/.test(text) && loop > 0) {
text = text.replace(/\uE000([\uE010-\uE019]+)\uE001/g, function(m, d) {
var id = "";
for (var i = 0; i < d.length; i++) id += (d.charCodeAt(i) - 0xE010).toString();
return self.store[parseInt(id, 10)] || m;
});
loop--;
}
return text;
}
};
var accordionRegistry = [];
function addSection(title, $inner) {
var btn = new OO.ui.ButtonWidget({
label: title,
indicator: 'down',
framed: false,
classes: ['wa-section-header']
});
var box = $('<div>').addClass('wa-foldable-content').append($inner);
var sectionObj = {
btn: btn,
box: box,
label: title
};
accordionRegistry.push(sectionObj);
btn.on('click', function() {
var isOpening = !box.is(':visible');
if (isOpening) {
accordionRegistry.forEach(function(sec) {
if (sec !== sectionObj) {
sec.box.hide();
sec.btn.setIndicator('down');
}
});
}
box.toggle();
btn.setIndicator(box.is(':visible') ? 'up' : 'down');
});
$content.append(btn.$element, box);
return sectionObj;
}
// WIDGETS
var srcSelect = new OO.ui.DropdownInputWidget({
options: [{
data: 'cat',
label: 'Category'
}, {
data: 'linksto',
label: 'Pages linking to...'
}, {
data: 'linkson',
label: 'Links on page...'
}, {
data: 'prefix',
label: 'Pages with prefix...'
}, {
data: 'watchlist',
label: 'Watchlist'
}, {
data: 'search',
label: 'Wiki search'
}, {
data: 'usercontribs',
label: 'User contributions'
}, {
data: 'pageswithprop',
label: 'Pages with property'
}]
});
var srcInput = new OO.ui.TextInputWidget({
placeholder: 'Category...'
});
var now = new Date();
var today = now.toISOString().split('T')[0];
var srcInputUser = new OO.ui.TextInputWidget({
placeholder: 'Username'
});
var srcInputStartDate = new OO.ui.TextInputWidget({
value: today + 'T00:00:00',
placeholder: 'ISO start date'
});
var srcInputEndDate = new OO.ui.TextInputWidget({
value: today + 'T23:59:59',
placeholder: 'ISO end date'
});
var srcDropProp = new OO.ui.DropdownInputWidget({
options: []
});
var $optContainer = $('<div>').addClass('wa-source-options').hide();
var $optCat = $('<div>').hide();
var $optUser = $('<div>').hide();
var $optProp = $('<div>').hide();
var chkCatPages = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkCatSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkCatFile = new OO.ui.CheckboxInputWidget({
selected: false
});
$optCat.append($('<div>').addClass('wa-opt-label').text('Include:'), new OO.ui.FieldLayout(chkCatPages, {
label: 'Pages',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatSub, {
label: 'Subcats',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatFile, {
label: 'Files',
align: 'inline'
}).$element);
$optUser.append(new OO.ui.FieldLayout(srcInputUser, {
label: 'User',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputStartDate, {
label: 'Start (Older)',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputEndDate, {
label: 'End (Newer)',
align: 'top'
}).$element);
$optProp.append(new OO.ui.FieldLayout(srcDropProp, {
label: 'Property',
align: 'top'
}).$element);
var $optLinks = $('<div>').hide();
var chkLinkWiki = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkLinkTrans = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkLinkImg = new OO.ui.CheckboxInputWidget({
selected: false
});
var dropLinkRedir = new OO.ui.DropdownInputWidget({
options: [{
data: 'nonredirects',
label: 'No redirects'
}, {
data: 'all',
label: 'Both'
}, {
data: 'redirects',
label: 'Redirects only'
}]
});
var chkLinkToRedir = new OO.ui.CheckboxInputWidget({
selected: false
});
$optLinks.append($('<div>').addClass('wa-opt-label').text('What to include:'), $('<div>').addClass('wa-opt-row').append(new OO.ui.FieldLayout(chkLinkWiki, {
label: 'Wikilinks',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkTrans, {
label: 'Transclusions',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkImg, {
label: 'File usage',
align: 'inline'
}).$element), $('<div>').addClass('wa-opt-label').text('Redirects:'), dropLinkRedir.$element, new OO.ui.FieldLayout(chkLinkToRedir, {
label: 'Include links to redirects',
align: 'inline'
}).$element);
$optContainer.append($optCat, $optLinks, $optUser, $optProp);
var queryCache = {};
var lastMode = 'cat';
srcSelect.on('change', function(newMode) {
if (!isLoadingProject) {
if (lastMode !== 'watchlist' && lastMode !== 'usercontribs' && lastMode !== 'pageswithprop') {
queryCache[lastMode] = srcInput.getValue();
}
}
$optContainer.hide();
$optCat.hide();
$optLinks.hide();
$optUser.hide();
$optProp.hide();
srcInput.setDisabled(false).$element.show();
if (newMode === 'cat') {
$optContainer.show();
$optCat.show();
} else if (newMode === 'linksto') {
$optContainer.show();
$optLinks.show();
} else if (newMode === 'usercontribs') {
$optContainer.show();
$optUser.show();
srcInput.setDisabled(true).$element.hide();
} else if (newMode === 'pageswithprop') {
$optContainer.show();
$optProp.show();
srcInput.setDisabled(true).$element.hide();
if (!propNamesLoaded) {
new mw.Api().get({
action: 'query',
list: 'pagepropnames',
ppnlimit: 'max'
}).then(function(d) {
if (d.query && d.query.pagepropnames) {
srcDropProp.setOptions(d.query.pagepropnames.map(p => ({
data: p.propname,
label: p.propname
})));
propNamesLoaded = true;
}
});
}
}
if (newMode === 'watchlist') {
srcInput.setValue('');
srcInput.setDisabled(true);
srcInput.$input.attr('placeholder', '(No query needed)');
} else if (newMode !== 'usercontribs' && newMode !== 'pageswithprop') {
srcInput.setValue(queryCache[newMode] || '');
var ph = 'Query...';
if (newMode === 'cat') ph = 'Category name';
if (newMode === 'search') ph = 'Search query...';
if (newMode === 'prefix') ph = 'Page prefix...';
if (newMode === 'linksto') ph = 'Pages linking to this title...';
if (newMode === 'linkson') ph = 'Get links from this page...';
srcInput.$input.attr('placeholder', ph);
}
lastMode = newMode;
});
srcSelect.emit('change', srcSelect.getValue());
var $nsSelect = $('<select>').attr('id', 'wa-ns-selector').attr('multiple', 'multiple').attr('size', '8');
var nsMap = mw.config.get('wgFormattedNamespaces');
for (var id in nsMap) {
if (parseInt(id) >= 0) $nsSelect.append($('<option>').val(id).text(id + ': ' + (nsMap[id] || '(Main)')));
}
$nsSelect.val(['0']);
var btnAdd = new OO.ui.ButtonWidget({
label: 'Add to list',
icon: 'add',
flags: ['primary', 'progressive']
});
var $btnRow = $('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-top': '10px'
});
var $fetchStatus = $('<span>').css({
'margin-right': '10px',
'color': '#888',
'font-size': '0.9em',
'align-self': 'center'
}).hide();
$btnRow.append($fetchStatus, btnAdd.$element);
addSection('Source', $('<div>').append(new OO.ui.FieldLayout(srcSelect, {
label: 'Mode',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInput, {
label: 'Query',
align: 'top'
}).$element, $optContainer, $('<div>').text('Namespaces:').css({
'font-weight': 'bold',
'margin-top': '5px'
}), $nsSelect, $btnRow));
var redirMode = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'edit',
label: 'Edit the redirect page (Default)'
}), new OO.ui.RadioOptionWidget({
data: 'follow',
label: 'Follow redirect (Edit target)'
}), new OO.ui.RadioOptionWidget({
data: 'skip',
label: 'Skip redirects'
})]
});
redirMode.selectItemByData('edit');
var radSkipExist = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'none',
label: 'Process all'
}), new OO.ui.RadioOptionWidget({
data: 'missing',
label: 'Skip if page does not exist'
}), new OO.ui.RadioOptionWidget({
data: 'exists',
label: 'Skip if page exists'
})]
});
radSkipExist.selectItemByData('none');
var chkSkipNoChange = new OO.ui.CheckboxInputWidget({
selected: false
});
var inpSkipContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if FOUND'
});
var togSkipContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipNotContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if MISSING'
});
var togSkipNotContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if in: Category1|Category2'
});
var inpSkipNotCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if NOT in: Category1|Category2'
});
var $settingsPanel = $('<div>')
.append($('<span>').addClass('wa-settings-header').text('Redirects'))
.append(redirMode.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Skip logic'))
.append(new OO.ui.FieldLayout(chkSkipNoChange, {
label: 'Skip if no changes made',
align: 'inline'
}).$element.css('margin-bottom', '8px'))
.append(radSkipExist.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Content filters'))
.append($('<div>').addClass('wa-setting-row').append(inpSkipContains.$element.css('flex', 1), togSkipContainsRegex.$element.css('margin-left', '5px')))
.append($('<div>').addClass('wa-setting-row').append(inpSkipNotContains.$element.css('flex', 1), togSkipNotContainsRegex.$element.css('margin-left', '5px')))
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Category filters'))
.append(new OO.ui.FieldLayout(inpSkipCategories, {
label: 'Blacklist',
align: 'top'
}).$element)
.append(new OO.ui.FieldLayout(inpSkipNotCategories, {
label: 'Whitelist',
align: 'top'
}).$element);
addSection('Skip', $settingsPanel);
var dropProtMode = new OO.ui.DropdownInputWidget({
options: [{
data: 'protect',
label: 'Protect (Exclude)'
}, {
data: 'target',
label: 'Target (Edit Matches Only)'
}]
});
var inpTemplateFilter = new OO.ui.TextInputWidget({
placeholder: 'Regex: infobox rail line|railway'
});
var $templateFilterLayout = new OO.ui.FieldLayout(inpTemplateFilter, {
label: 'Template filter',
align: 'top'
});
var $protList = $('<div>');
var protCheckboxes = {};
PROTECTION_DEFS.forEach(function(def) {
var chk = new OO.ui.CheckboxInputWidget({
selected: def.isOn
});
protCheckboxes[def.id] = chk;
$protList.append(new OO.ui.FieldLayout(chk, {
label: def.label,
align: 'inline'
}).$element);
});
var targetRadioItems = PROTECTION_DEFS.map(function(def) {
return new OO.ui.RadioOptionWidget({
data: def.id,
label: def.label
});
});
var radTargetSet = new OO.ui.RadioSelectWidget({
items: targetRadioItems
});
var $targetList = $('<div>').hide().append(radTargetSet.$element);
dropProtMode.on('change', function(mode) {
if (mode === 'protect') {
$protList.show();
$targetList.hide();
} else {
$protList.hide();
$targetList.show();
}
});
addSection('Protection', $('<div>').addClass('wa-source-options')
.append(new OO.ui.FieldLayout(dropProtMode, {
label: 'Mode',
align: 'top'
}).$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($protList).append($targetList)
.append($('<div style="margin-top:10px;">').append($templateFilterLayout.$element))
);
var $rulesList = $('<div>');
var btnAddRule = new OO.ui.ButtonWidget({
label: 'Add rule',
icon: 'add'
});
var rulesRegistry = [];
addSection('Rules', $('<div>').append($rulesList, btnAddRule.$element));
var togWikiTypos = new OO.ui.ToggleSwitchWidget({
value: false
});
var lblWikiStatus = $('<div>').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var btnLoadLocal = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load file',
framed: false
});
var btnClearLocal = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear local',
framed: false,
flags: 'destructive',
disabled: true
});
var lblLocalStatus = $('<div>').text('No local rules').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var $typoInput = $('<input type="file">').hide().appendTo('body');
var $extRulesPanel = $('<div>').addClass('wa-source-options');
$extRulesPanel.append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'space-between'
}).append($('<span>').text('Project:AutoWikiBrowser/Typos').css('font-weight', 'bold'), togWikiTypos.$element),
$('<div>').css('margin-bottom', '10px').append(lblWikiStatus),
$('<hr>').css('border-top', '1px solid #eee'),
$('<div>').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Local rules (session only)').css({
'font-weight': 'bold'
}), $('<div>').css('flex', '1'), btnLoadLocal.$element, btnClearLocal.$element), lblLocalStatus)
);
addSection('External rules', $extRulesPanel);
var txtPreScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var txtPostScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var btnLoadLib = new OO.ui.ButtonWidget({
icon: 'upload',
title: 'Load library (.js)',
framed: false
});
var btnRemoveLib = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Remove library',
framed: false,
flags: 'destructive'
});
var txtLibStatus = new OO.ui.TextInputWidget({
value: '(No library loaded)',
readOnly: true
});
var $libInput = $('<input type="file" accept=".js">').hide().appendTo('body');
var btnEditLib = new OO.ui.ButtonWidget({
icon: 'edit',
label: 'Edit project library',
framed: false
});
var $scriptPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'gap': '5px',
'margin-bottom': '10px'
}).append($('<span>').text('JS library:').css({
'font-weight': 'bold',
'white-space': 'nowrap'
}), txtLibStatus.$element.css('flex', '1'), btnLoadLib.$element, btnRemoveLib.$element),
$('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-bottom': '10px'
}).append(btnEditLib.$element),
new OO.ui.FieldLayout(txtPreScript, {
label: 'Pre-Process',
align: 'top'
}).$element,
new OO.ui.FieldLayout(txtPostScript, {
label: 'Post-Process',
align: 'top'
}).$element
);
addSection('Scripts', $scriptPanel);
function updateLibUI() {
if (currentLibrary.code) {
txtLibStatus.setValue(currentLibrary.name);
btnRemoveLib.setDisabled(false);
} else {
txtLibStatus.setValue('(No library loaded)');
btnRemoveLib.setDisabled(true);
}
}
updateLibUI();
function LibraryEditorDialog(config) {
LibraryEditorDialog.super.call(this, config);
}
OO.inheritClass(LibraryEditorDialog, OO.ui.ProcessDialog);
LibraryEditorDialog.static.name = 'libraryEditor';
LibraryEditorDialog.static.title = 'Edit project library';
LibraryEditorDialog.static.actions = [{
action: 'save',
label: 'Save',
flags: ['primary', 'progressive']
},
{
label: 'Cancel',
flags: 'safe'
}
];
LibraryEditorDialog.prototype.initialize = function() {
LibraryEditorDialog.super.prototype.initialize.call(this);
this.$element.addClass('wa-lib-dialog'); // Attach our custom CSS override class
this.panel = new OO.ui.PanelLayout({
padded: true,
expanded: true
});
this.$editorWrapper = $('<div>').addClass('wa-lib-editorwrapper');
this.panel.$element.append(this.$editorWrapper);
this.$body.append(this.panel.$element);
};
LibraryEditorDialog.prototype.getSetupProcess = function(data) {
data = data || {};
return LibraryEditorDialog.super.prototype.getSetupProcess.call(this, data)
.next(function() {
var self = this;
self.$editorWrapper.empty();
// Create a textarea for the MediaWiki CM wrapper to properly bind to
var $libTextArea = $('<textarea>').appendTo(self.$editorWrapper);
var initCode = currentLibrary.code || "// All custom library functions defined here will be passed to the worker.\n// Special functions:\n// function wAwB_Pre(text, vars, shared) { return text; }\n// function wAwB_Post(text, vars, shared) { return text; }\n";
return mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.modes']).then(function(require) {
var CM = require('ext.CodeMirror');
var modes = require('ext.CodeMirror.modes');
self.cmInstance = new CM($libTextArea[0], modes.javascript());
self.cmInstance.initialize();
self.cmInstance.view.dispatch({
changes: {
from: 0,
insert: initCode
}
});
// Force CodeMirror to fill the wrapper
self.$editorWrapper.find('.cm-editor').css({
height: '100%'
});
}).catch(function(err) {
console.error("wAwB CM Init Error:", err);
});
}, this);
};
LibraryEditorDialog.prototype.getActionProcess = function(action) {
var dialog = this;
if (action === 'save') {
return new OO.ui.Process(function() {
var newCode = "";
if (dialog.cmInstance) {
newCode = dialog.cmInstance.view.state.doc.toString();
}
if (newCode.trim() === "") {
currentLibrary = {
name: null,
code: null
};
} else {
currentLibrary.code = newCode;
currentLibrary.name = "custom code";
}
updateLibUI();
dialog.close({
action: action
});
});
}
if (action === 'cancel' || !action) {
return new OO.ui.Process(function() {
dialog.close({
action: action
});
});
}
return LibraryEditorDialog.super.prototype.getActionProcess.call(this, action);
};
LibraryEditorDialog.prototype.getTeardownProcess = function(data) {
return LibraryEditorDialog.super.prototype.getTeardownProcess.call(this, data)
.next(function() {
if (this.cmInstance) {
try {
this.cmInstance.view.destroy();
} catch (e) {}
this.cmInstance = null;
}
}, this);
};
var windowManager = new OO.ui.WindowManager();
$('body').append(windowManager.$element);
var libDialog = new LibraryEditorDialog();
windowManager.addWindows([libDialog]);
btnEditLib.on('click', function() {
windowManager.openWindow(libDialog);
});
var togAdminEnable = new OO.ui.ToggleSwitchWidget({
value: false
});
var chkMovRedirect = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkMovTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkMovSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkDelTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var dropProtEdit = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var dropProtMove = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var inpProtExpiry = new OO.ui.TextInputWidget({
placeholder: 'infinite / 2 days / 12 hours'
});
if (CAN_MOVE || IS_ADMIN) {
var $adminPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'flex-start',
'gap': '10px'
}).append($('<span>').text('Enable page actions').css('font-weight', 'bold'), togAdminEnable.$element),
$('<hr>')
);
if (CAN_MOVE) {
$adminPanel.append(
$('<strong>').text('Move options:'), new OO.ui.FieldLayout(chkMovRedirect, {
label: 'Do not create redirect',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovTalk, {
label: 'Move talk page',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovSub, {
label: 'Move subpages',
align: 'inline'
}).$element, $('<br>')
);
}
if (IS_ADMIN) {
$adminPanel.append(
$('<strong>').text('Delete options:'), new OO.ui.FieldLayout(chkDelTalk, {
label: 'Delete talk page',
align: 'inline'
}).$element, $('<br>'),
$('<strong>').text('Protect options:'), new OO.ui.FieldLayout(dropProtEdit, {
label: 'Edit level',
align: 'top'
}).$element, new OO.ui.FieldLayout(dropProtMove, {
label: 'Move level',
align: 'top'
}).$element, new OO.ui.FieldLayout(inpProtExpiry, {
label: 'Expiry',
align: 'top'
}).$element
);
}
addSection('Page actions', $adminPanel);
}
var btnPower = new OO.ui.ButtonWidget({
label: 'Start',
icon: 'power',
flags: ['primary', 'progressive'],
title: 'Start editing',
accessKey: 'a'
});
var btnDiff = new OO.ui.ButtonWidget({
label: 'Diff',
icon: 'update',
title: 'Show diff',
accessKey: 'd'
});
var btnSkip = new OO.ui.ButtonWidget({
label: 'Next',
icon: 'next',
title: 'Skip to next page',
accessKey: 'n',
disabled: true
});
var btnPreview = new OO.ui.ButtonWidget({
label: 'Preview',
icon: 'article',
title: 'Preview page',
accessKey: 'p'
});
var btnSave = new OO.ui.ButtonWidget({
label: 'Save',
icon: 'upload',
flags: 'progressive',
title: 'Save edit',
accessKey: 's',
disabled: true
});
var inputSummary = new OO.ui.TextInputWidget({
placeholder: '',
value: '',
title: 'Enter edit summary',
accessKey: 'b'
});
var $sumLayout = new OO.ui.FieldLayout(inputSummary, {
label: 'Edit summary',
align: 'top'
}).$element;
$sumLayout.css('margin-bottom', '6px');
var listTextarea = new OO.ui.MultilineTextInputWidget({
rows: 15,
classes: ['wa-page-list-raw']
});
var btnSort = new OO.ui.ButtonWidget({
icon: 'sortVertical',
title: 'Sort list',
framed: false
});
var btnDedup = new OO.ui.ButtonWidget({
icon: 'funnel',
title: 'Remove duplicates',
framed: false
});
var btnClear = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear list',
framed: false
});
var btnPreParse = new OO.ui.ButtonWidget({
label: 'Pre-parse',
title: 'Process list in background',
icon: 'robot',
framed: false
});
var $listCounter = $('<span>').addClass('wa-list-counter').text('0 pages');
var togAutoSave = new OO.ui.ToggleSwitchWidget({
value: false
});
var txtAutoDelay = new OO.ui.TextInputWidget({
value: '10'
});
var $botRow = $('<div>').addClass('wa-bot-row').hide();
if (PERMS.allowBot) {
$botRow.show().append($('<span>').css('font-weight', 'bold').text('Bot mode: '), togAutoSave.$element, $('<span>').text('Delay (s):'), txtAutoDelay.$element.css('max-width', '40px'));
togAutoSave.on('change', function(v) {
if (v) txtAutoDelay.setValue('10');
});
}
var sortAsc = true;
var $procHeader = $('<div>').addClass('wa-section-header').attr('id', 'wa-proc-header').css({
'display': 'flex',
'justify-content': 'space-between',
'align-items': 'center'
});
var $procTitle = $('<span>').attr('id', 'wa-proc-title').text('Processing');
var chkMinor = new OO.ui.CheckboxInputWidget({
selected: true,
title: 'Minor edit'
});
var $minorLayout = new OO.ui.FieldLayout(chkMinor, {
label: 'm',
align: 'inline',
title: 'Minor edit'
});
$minorLayout.$element.css({
'margin-right': '15px',
'font-weight': 'normal'
});
$procHeader.append($procTitle, $minorLayout.$element);
var $procContent = $('<div>').attr('id', 'wa-proc-content').append(
$sumLayout, $botRow,
$('<div>').addClass('wa-grid-container').append(
$('<div>').addClass('wa-grid-col').append(btnPower.$element),
$('<div>').addClass('wa-grid-col').append(btnDiff.$element, btnSkip.$element),
$('<div>').addClass('wa-grid-col').append(btnPreview.$element, btnSave.$element)
),
$('<div>').addClass('wa-toolbar').append($listCounter, btnSort.$element, btnDedup.$element, btnClear.$element),
listTextarea.$element,
$('<div>').css({
'margin-top': '5px'
}).append(btnPreParse.$element)
);
$content.append($procHeader, $procContent);
var configWidgets = [
srcSelect, srcInput, srcInputUser, srcInputStartDate, srcInputEndDate, srcDropProp,
chkCatPages, chkCatSub, chkCatFile, chkLinkWiki, chkLinkTrans, chkLinkImg, dropLinkRedir, chkLinkToRedir,
btnAdd, redirMode, chkSkipNoChange, radSkipExist,
inpSkipContains, togSkipContainsRegex, inpSkipNotContains, togSkipNotContainsRegex, inpSkipCategories, inpSkipNotCategories,
dropProtMode, radTargetSet, inpTemplateFilter, btnAddRule,
txtPreScript, txtPostScript, chkMovRedirect, chkMovTalk, chkMovSub, chkDelTalk, dropProtEdit, dropProtMove, inpProtExpiry,
togWikiTypos, btnLoadLocal, btnClearLocal, btnPreParse
];
// =====================================================================
// 5. FUNCTION DEFINITIONS (Core Logic)
// =====================================================================
function checkSummaryWarning() {
var val = inputSummary.getValue();
var isBlank = !val || val.trim() === "";
if (isBlank || hasNewSources) inputSummary.$element.addClass('wa-summary-warning');
else inputSummary.$element.removeClass('wa-summary-warning');
}
function renderCurrentView() {
if (currentViewMode === 'preview') renderPreview();
else renderDiff();
}
function toggleConfig(isLocked) {
configWidgets.forEach(function(w) {
if (w instanceof OO.ui.TextInputWidget || w instanceof OO.ui.MultilineTextInputWidget) {
w.setReadOnly(isLocked);
w.$element.css('opacity', isLocked ? 0.8 : 1);
} else {
w.setDisabled(isLocked);
}
});
$nsSelect.prop('disabled', isLocked);
for (var key in protCheckboxes) protCheckboxes[key].setDisabled(isLocked);
rulesRegistry.forEach(function(r) {
r.find.setReadOnly(isLocked);
r.rep.setReadOnly(isLocked);
r.regex.setDisabled(isLocked);
r.flags.setReadOnly(isLocked);
r.enable.setDisabled(isLocked);
r.del.setDisabled(isLocked);
r.btnFunc.setDisabled(isLocked || !r.regex.getValue());
r.btnUp.setDisabled(isLocked || rulesRegistry.indexOf(r) === 0);
r.btnDown.setDisabled(isLocked || rulesRegistry.indexOf(r) === rulesRegistry.length - 1);
});
if (CAN_MOVE || IS_ADMIN) togAdminEnable.setDisabled(isLocked);
btnLoadLib.setDisabled(isLocked);
btnRemoveLib.setDisabled(isLocked || !currentLibrary.code);
btnEditLib.setDisabled(isLocked);
btnLoadLocal.setDisabled(isLocked);
btnClearLocal.setDisabled(isLocked || localTypos.length === 0);
}
function updateListCount() {
var val = listTextarea.getValue();
var count = val.trim() ? val.split('\n').filter(function(l) {
var line = l.trim();
return line !== "" && !line.startsWith("####");
}).length : 0;
$listCounter.text(count + ' pages');
}
listTextarea.on('change', updateListCount);
function updateDirtyState() {
if (isRunning && currentTitle && Editor.getValue() !== originalWikitext) $editorHeader.addClass('wa-dirty');
else $editorHeader.removeClass('wa-dirty');
}
var notificationWatermark = 0;
var lastNotifCheck = 0;
function checkNotifications(notifList) {
if ((ON_NOTIFY !== "warn" && ON_NOTIFY !== "stop")|| !notifList || notifList.length === 0) return false;
var triggerFound = false;
var newWatermark = notificationWatermark;
for (var i = 0; i < notifList.length; i++) {
var n = notifList[i];
var currentId = parseInt(n.id, 10) || 0;
if (currentId > newWatermark) {
newWatermark = currentId;
}
if (currentId > notificationWatermark && (n.type === 'edit-user-talk' || n.type === 'reverted')) {
triggerFound = true;
}
}
notificationWatermark = newWatermark;
if (triggerFound) {
$('.wa-editor-header').addClass('wa-header-alert');
if (ON_NOTIFY === "stop") {
var halt = confirm("A new talk page message or revert was detected!\n\nClick OK to stop the processing queue.\nClick Cancel to acknowledge and continue.");
if (halt) {
btnPower.emit('click');
return true; // Signals the save loop to halt
} else {
$('.wa-editor-header').removeClass('wa-header-alert');
}
}
}
return false;
}
function removeTopLine() {
var l = listTextarea.getValue().split('\n');
l.shift();
listTextarea.setValue(l.join('\n'));
updateListCount();
}
function updateInterfaceMode() {
var isAdminMode = togAdminEnable.getValue();
var pageLoaded = !!currentTitle;
btnSave.setDisabled(isAdminMode || !pageLoaded || !PERMS.canSave);
btnSkip.setDisabled(!pageLoaded);
btnPreview.setDisabled(!pageLoaded);
btnDiff.setDisabled(isAdminMode || !pageLoaded);
Editor.setDisabled(isAdminMode || !pageLoaded);
if (CAN_MOVE) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminMove.setDisabled(!(allowAdmin && currentVars['$xA']));
if (currentVars['$xA']) btnAdminMove.setTitle('Move page to ' + currentVars['$xA']);
else btnAdminMove.setTitle('Move page to $xA (Variable not set)');
}
if (IS_ADMIN) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminDel.setDisabled(!allowAdmin);
btnAdminProt.setDisabled(!allowAdmin);
}
}
function renderDiff() {
captureViewScroll();
$visualOut.html('<div style="color:#888; text-align:center;">Generating Diff...</div>');
var currentText = Editor.getValue();
new mw.Api().post({
'action': 'compare',
fromtitle: currentTitle,
toslots: 'main',
'totext-main': currentText,
slots: 'main',
topst: window.wa_diffPST ? true : undefined,
prop: 'diff',
formatversion: 2
}).then(function(data) {
var diffBody = data.compare && data.compare.bodies && data.compare.bodies.main;
if (diffBody) {
$visualOut.html('<h4>Diff: ' + currentTitle + '</h4><table class="diff"><colgroup><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content"></colgroup><tbody>' + diffBody + '</tbody></table>');
processDiffTable();
restoreViewScroll(currentTitle, 'diff');
} else {
$visualOut.html('<div style="color:green; text-align:center; padding-top:20px;">No Changes detected</div>');
}
});
}
function processDiffTable() {
var rightLineNum = 0;
$visualOut.find('table.diff tr').each(function() {
var $tr = $(this);
var $linenos = $tr.find('td.diff-lineno');
if ($linenos.length > 0) {
var txt = $linenos.last().text();
var m = txt.match(/(\d+)/);
if (m) rightLineNum = parseInt(m[1]);
return;
}
if ($tr.find('.diff-addedline').length > 0 || $tr.find('.diff-context').length > 0) {
$tr.attr('data-line', rightLineNum);
$tr.css('cursor', 'pointer').attr('title', 'Jump to line ' + rightLineNum);
rightLineNum++;
}
});
// Attach a single delegated click listener to the table instead of every row
$visualOut.find('table.diff').on('click', 'tr[data-line]', function() {
Editor.scrollToLine(parseInt($(this).attr('data-line')));
});
}
function renderPreview() {
captureViewScroll();
$visualOut.html('<div style="color:#888; text-align:center;">Generating Preview...</div>');
new mw.Api().post({
action: 'parse',
title: currentTitle,
text: Editor.getValue(),
prop: 'text|categorieshtml|modules|jsconfigvars',
useskin: mw.config.get('skin'),
disablelimitreport: true,
pst: true,
contentmodel: 'wikitext'
}).then(function(data) {
if (data.parse && data.parse.text) {
var $prev = $('<div>').html(data.parse.text['*']);
if (data.parse.categorieshtml) $prev.append(data.parse.categorieshtml['*']);
$prev.find('a').attr('target', '_blank');
$visualOut.empty().append($prev);
mw.loader.using(data.parse.modules.concat(data.parse.modulestyles, data.parse.modulescripts), function() {
mw.hook('wikipage.content').fire($('.wa-visual-output .mw-parser-output'));
});
restoreViewScroll(currentTitle, 'preview');
}
}).catch(function(err) {
$visualOut.html('Error generating preview.');
alert("Preview failed: " + err);
});
}
async function transformPageText(rawText, title, config) {
var filters = config.filters;
if (filters) {
var check = function(text, rule) {
if (!rule || !rule.val) return false;
if (rule.regex) {
try {
return new RegExp(rule.val, 'mu').test(text);
} catch (e) {
return false;
}
}
return text.indexOf(rule.val) !== -1;
};
if (filters.skipContains && filters.skipContains.val && check(rawText, filters.skipContains)) {
return {
skipped: true,
reason: 'Contains: ' + filters.skipContains.val
};
}
if (filters.skipNotContains && filters.skipNotContains.val && !check(rawText, filters.skipNotContains)) {
return {
skipped: true,
reason: 'Missing: ' + filters.skipNotContains.val
};
}
}
var mode = config.mode;
var inputs = [];
var compiledSpecies = null;
if (config.templateFilter) {
var tFilter = config.templateFilter;
if (tFilter[0] === "^") tFilter = "^\\{\\{\\s*" + tFilter.slice(1);
else tFilter = "\\{\\{\\s*" + tFilter;
compiledSpecies = tFilter + "(?=\\s*[|}\\n])";
}
var skeleton = PageProtector.protect(rawText, mode, config.excludes, compiledSpecies);
if (mode === 'target') inputs = PageProtector.store;
else inputs = [skeleton];
var combinedRules = rulesRegistry.filter(r => r.isActive()).map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
}));
if (togWikiTypos.getValue()) combinedRules = combinedRules.concat(wikiTypos);
if (localTypos.length > 0) combinedRules = combinedRules.concat(localTypos);
var payload = {
texts: inputs,
vars: config.vars,
preCode: getUserCode(txtPreScript, 'wAwB_Pre'),
libraryCode: currentLibrary.code,
rules: combinedRules,
postCode: getUserCode(txtPostScript, 'wAwB_Post')
};
var result = await WorkerEngine.run(payload);
if (result.skipped) return {
skipped: true,
reason: result.reason
};
var finalText = "";
if (mode === 'target') {
PageProtector.store = result.texts;
finalText = PageProtector.restore(skeleton);
} else {
finalText = PageProtector.restore(result.texts[0]);
}
return {
skipped: false,
text: finalText,
summaryAppend: result.summaryAppend,
summaryOverride: result.summaryOverride
};
}
async function processPageContent() {
try {
setStatus('Processing...', 'working');
var mode = dropProtMode.getValue();
var activeConfig = {
mode: mode,
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: currentVars,
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
var res = await transformPageText(originalWikitext, currentTitle, activeConfig);
if (res.skipped) {
removeTopLine();
loadNextPage();
return;
}
currentPageSummaryAppend = res.summaryAppend || "";
currentPageSummaryOverride = res.summaryOverride || null;
updateSummaryPreview(inputSummary.getValue());
if (chkSkipNoChange.isSelected() && res.text === originalWikitext) {
removeTopLine();
loadNextPage();
return;
}
setStatus('Ready');
Editor.setValue(res.text);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
else {
Editor.setDisabled(false);
btnSave.setDisabled(!PERMS.canSave);
btnSkip.setDisabled(false);
btnPreview.setDisabled(false);
btnDiff.setDisabled(false);
}
updateDirtyState();
renderCurrentView();
if (PERMS.allowBot && togAutoSave.getValue()) {
var delay = Math.max(0, parseInt(txtAutoDelay.getValue(), 10) || 0) * 1000;
setStatus('Auto-save in ' + (delay / 1000) + 's...', 'working');
if (autoSaveTimer) clearTimeout(autoSaveTimer);
autoSaveTimer = setTimeout(function() {
if (isRunning && PERMS.canSave) {
btnSave.emit('click');
}
}, delay);
}
} catch (e) {
setStatus('Error', 'error');
alert(e);
btnPower.emit('click');
}
}
async function runPreParseBatch() {
// 1. Toggle / Stop Logic
if (isRunning) {
isRunning = false;
setStatus('Stopping...', 'working');
btnPreParse.setLabel('Pre-parse');
return;
}
// 2. Start & Deduplicate
var currentVal = listTextarea.getValue();
var cleanVal = getDeduplicatedList(currentVal).join('\n');
listTextarea.setValue(cleanVal);
updateListCount();
isRunning = true;
toggleUI(true);
// 3. Lock UI
toggleUI(true);
btnSkip.setDisabled(true);
btnDiff.setDisabled(true);
btnPreview.setDisabled(true);
btnSave.setDisabled(true);
Editor.setDisabled(true);
btnPreParse.setLabel('Stop pre-parse');
// Inject STOP marker if not present
var currentList = listTextarea.getValue().split('\n');
if (!currentList.includes('####STOP')) {
currentList.push('####STOP');
listTextarea.setValue(currentList.join('\n'));
}
// Gather Config
var activeConfig = {
mode: dropProtMode.getValue(),
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: {},
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (activeConfig.mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
setStatus('Pre-parsing...', 'working');
while (isRunning) {
var lines = listTextarea.getValue().split('\n');
var batchTitles = [];
var stopFound = false;
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
if (line === '####STOP') {
stopFound = true;
break;
}
if (line && !line.startsWith('####')) {
var parts = line.split('|');
batchTitles.push({
fullLine: line,
title: parts[0],
vars: parts.slice(1)
});
}
if (batchTitles.length >= 50) break;
}
if (batchTitles.length === 0) {
if (stopFound) setStatus('Pre-parse complete');
else setStatus('List empty');
break;
}
$listCounter.text('Fetching ' + batchTitles.length + '...');
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
try {
var data = await api.get({
action: 'query',
prop: 'revisions' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: batchTitles.map(t => t.title).join('|'),
rvprop: 'content',
rvslots: 'main',
redirects: 1,
cllimit: 'max'
});
var pageMap = {};
if (data.query && data.query.pages) Object.values(data.query.pages).forEach(p => pageMap[p.title] = p);
var redirMap = {};
if (data.query && data.query.redirects) data.query.redirects.forEach(r => redirMap[r.from] = r.to);
var keptLines = [];
for (var k = 0; k < batchTitles.length; k++) {
var item = batchTitles[k];
var lookupTitle = redirMap[item.title] || item.title;
var page = pageMap[lookupTitle];
if (!page || page.missing || page.invalid || !page.revisions || !page.revisions[0]) {
console.warn("Skipping invalid/missing page:", item.title);
continue;
}
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) continue; // Skip
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) continue; // Skip
var rawText = page.revisions[0].slots.main['*'];
activeConfig.vars = {
'$xx': item.title
};
item.vars.forEach((v, idx) => activeConfig.vars['$x' + String.fromCharCode(65 + idx)] = v);
var res = await transformPageText(rawText, item.title, activeConfig);
// UPDATED LOGIC: Respect "Skip if no change" checkbox
if (!res.skipped && (!chkSkipNoChange.isSelected() || res.text !== rawText)) {
keptLines.push(item.fullLine);
}
}
var freshLines = listTextarea.getValue().split('\n');
var stopIndex = -1;
for (var x = 0; x < freshLines.length; x++) {
if (freshLines[x] === '####STOP') {
stopIndex = x;
break;
}
}
if (stopIndex > -1) {
var topChunk = freshLines.slice(0, stopIndex);
var botChunk = freshLines.slice(stopIndex + 1);
var processedSet = new Set(batchTitles.map(t => t.fullLine));
var newTop = topChunk.filter(l => !processedSet.has(l));
var newList = newTop.concat(['####STOP']).concat(botChunk).concat(keptLines);
listTextarea.setValue(newList.join('\n'));
updateListCount();
}
} catch (e) {
console.error(e);
setStatus('Batch error: ' + e, 'error');
break;
}
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
btnPreParse.setLabel('Pre-parse');
if (listTextarea.getValue().startsWith('####STOP')) setStatus('Pre-parse done!');
else setStatus('Stopped');
}
btnPreParse.on('click', runPreParseBatch);
function loadNextPage() {
if (!isRunning) return;
var allLines = listTextarea.getValue().split('\n');
var listChanged = false;
var stopCommand = false;
while (allLines.length > 0) {
var line = allLines[0];
if (line === '####STOP') {
stopCommand = true;
break;
}
if (line.startsWith('####') || line === "") {
allLines.shift();
listChanged = true;
} else {
break;
}
}
if (listChanged) {
listTextarea.setValue(allLines.join('\n'));
updateListCount();
}
if (stopCommand) {
btnPower.emit('click');
setStatus("Stopped by ####STOP");
return;
}
if (allLines.length === 0) {
btnPower.emit('click');
setStatus("Done!");
return;
}
var raw = allLines[0];
var parts = raw.split('|');
currentTitle = parts[0].trim();
baseRevId = 0;
originalWikitext = "";
if (!currentTitle) {
removeTopLine();
loadNextPage();
return;
}
currentVars = {};
currentVars['$xx'] = currentTitle;
for (var i = 1; i < parts.length; i++) currentVars['$x' + String.fromCharCode(64 + i)] = parts[i];
currentPageSummaryAppend = "";
currentPageSummaryOverride = null;
updateSummaryPreview(inputSummary.getValue());
setStatus('Loading...', 'working');
btnSave.setDisabled(true);
btnPreview.setDisabled(true);
btnDiff.setDisabled(true);
btnSkip.setDisabled(true);
Editor.setDisabled(true);
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
$editorHeader.removeClass('wa-dirty');
$visualOut.empty();
Editor.setValue('Loading...');
$infoContainer.empty();
currentPageExists = false;
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
var params = {
action: 'query',
prop: 'revisions|info' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: currentTitle,
rvprop: 'content|timestamp|ids',
rvslots: 'main',
inprop: 'watched',
cllimit: 'max'
};
var now = Date.now();
var shouldCheckNotifs = (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") && (now - lastNotifCheck > ON_NOTIFY_FREQ);
if (shouldCheckNotifs) {
params.meta = 'notifications';
params.notprop = 'list';
params.notsections = 'alert';
params.notlimit = 4;
lastNotifCheck = now;
}
var rMode = redirMode.findSelectedItem().getData();
if (rMode === 'follow') params.redirects = 1;
return api.get(params).then(async function(data) {
// piggyback notification check
if (data.query && data.query.notifications && data.query.notifications.list) {
var stopped = checkNotifications(data.query.notifications.list);
if (stopped) return; // exit before loading the page content
}
var pid = Object.keys(data.query.pages)[0];
var page = data.query.pages[pid];
currentPageExists = !page.missing && !page.invalid;
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat blacklist');
removeTopLine();
loadNextPage();
return;
}
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat whitelist');
removeTopLine();
loadNextPage();
return;
}
if (rMode === 'follow' && data.query.redirects) {
currentTitle = page.title;
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
mw.notify('Redirect followed to: ' + currentTitle);
}
if (rMode === 'skip' && page.redirect !== undefined) {
removeTopLine();
loadNextPage();
return;
}
var skipMode = radSkipExist.findSelectedItem().getData();
if (pid === "-1") {
if (skipMode === 'missing') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = "";
baseRevId = 0;
} else {
if (skipMode === 'exists') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = page.revisions[0].slots.main['*'];
baseRevId = page.revisions[0].revid;
}
if (page.revisions && page.revisions.length > 0) {
var rev = page.revisions[0];
var ts = new Date(rev.timestamp).toISOString().replace('T', ' ').substring(0, 16);
$infoContainer.empty().append('Last edit: ' + ts + ' | ', $('<a>').attr('href', mw.util.getUrl(currentTitle, {
action: 'history'
})).attr('target', '_blank').text('history'));
}
btnWatch.setDisabled(!currentPageExists);
btnManualEdit.setDisabled(!currentPageExists);
if (page.watched !== undefined) btnWatch.setIcon('unStar');
else btnWatch.setIcon('star');
if (CAN_MOVE || IS_ADMIN) {
updateInterfaceMode();
if (togAdminEnable.getValue()) {
Editor.setValue(originalWikitext);
renderCurrentView();
setStatus('Ready (Page actions)');
return;
}
}
processPageContent();
}).catch(function(e) {
setStatus('API error', 'error');
alert('Load error: ' + e);
btnPower.emit('click');
});
}
async function fetchWithContinue(api, params) {
var allTitles = new Set();
var continueToken = {};
var safetyLimit = FETCH_SAFETY_LIMIT;
var count = 0;
isFetching = true;
btnAdd.setLabel('Cancel fetch');
$fetchStatus.text('Fetching...').show();
try {
while (isFetching && count < safetyLimit) {
var merged = Object.assign({}, params, continueToken);
var data = await api.get(merged);
var batch = [];
if (data.watchlistraw) batch = data.watchlistraw;
else if (data.query) {
if (data.query.pages) batch = Object.values(data.query.pages);
else if (data.query.categorymembers) batch = data.query.categorymembers;
else if (data.query.backlinks) batch = data.query.backlinks;
else if (data.query.embeddedin) batch = data.query.embeddedin;
else if (data.query.imageusage) batch = data.query.imageusage;
else if (data.query.search) batch = data.query.search;
else if (data.query.allpages) batch = data.query.allpages;
else if (data.query.usercontribs) batch = data.query.usercontribs;
else if (data.query.pageswithprop) batch = data.query.pageswithprop;
}
if (batch.length > 0) {
batch.forEach(item => {
if (item.title) allTitles.add(item.title);
});
count = allTitles.size;
$fetchStatus.text('Fetched ' + count + '...');
}
if (data.continue) continueToken = data.continue;
else break;
}
} catch (e) {
alert("Fetch interrupted: " + e);
}
isFetching = false;
btnAdd.setLabel('Add to list').setDisabled(false);
$fetchStatus.text('Added ' + allTitles.size + ' pages').delay(3000).fadeOut();
if (allTitles.size > 0) {
hasNewSources = true;
checkSummaryWarning();
}
return Array.from(allTitles);
}
function toggleUI(d) {
if (d) {
btnPower.setLabel('Stop').setIcon('power').setFlags(['destructive']);
} else {
btnPower.setLabel('Start').setIcon('power').clearFlags().setFlags(['primary', 'progressive']);
if (PERMS.allowBot) togAutoSave.setValue(false);
}
toggleConfig(d);
btnSort.setDisabled(d);
btnDedup.setDisabled(d);
btnClear.setDisabled(d);
btnSaveProj.setDisabled(d);
btnLoadProj.setDisabled(d);
btnSkip.setDisabled(!d);
btnSave.setDisabled(true);
listTextarea.setReadOnly(d);
if (d) listTextarea.$element.addClass('wa-list-running');
else listTextarea.$element.removeClass('wa-list-running');
}
function resetPanels() {
Editor.setValue('');
$titleLink.text('Page content').removeAttr('href');
$editorHeader.removeClass('wa-dirty');
setStatus('Ready');
$('#wa-summary-preview').val('');
currentTitle = null;
$visualOut.html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready...</div>');
$infoContainer.empty();
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
Editor.setDisabled(true);
currentPageExists = false;
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
toggleUI(false);
updateListCount();
if (autoSaveTimer) clearTimeout(autoSaveTimer);
}
function arrayMove(arr, old_index, new_index) {
if (new_index >= arr.length) {
var k = new_index - arr.length + 1;
while (k--) arr.push(undefined);
}
arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);
}
function updateRuleButtons() {
rulesRegistry.forEach(function(item, idx) {
item.btnUp.setDisabled(idx === 0);
item.btnDown.setDisabled(idx === rulesRegistry.length - 1);
});
}
function addRule() {
var row = $('<div>').addClass('wa-rule-row');
var controls = $('<div>').addClass('wa-rule-controls');
var btnUp = new OO.ui.ButtonWidget({
icon: 'collapse',
framed: false,
title: 'Move up',
classes: ['wa-rule-btn']
});
var btnDown = new OO.ui.ButtonWidget({
icon: 'expand',
framed: false,
title: 'Move down',
classes: ['wa-rule-btn']
});
controls.append(btnUp.$element, btnDown.$element);
var contentDiv = $('<div>').addClass('wa-rule-content');
var f = new OO.ui.TextInputWidget({
placeholder: 'Find'
});
var r = new OO.ui.TextInputWidget({
placeholder: 'Replace'
});
var reg = new OO.ui.ToggleSwitchWidget();
var fl = new OO.ui.TextInputWidget({
value: 'gmu',
disabled: true
}).toggle(false);
var btnEnable = new OO.ui.ButtonWidget({
icon: 'power',
framed: false,
title: 'Toggle rule',
flags: ['progressive']
});
var isRuleActive = true;
var btnFunc = new OO.ui.ButtonWidget({
icon: 'code',
framed: false,
title: 'Toggle JS mode',
disabled: true
});
var isRuleFunc = false;
var toggleRule = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleActive;
isRuleActive = val;
row.css('opacity', isRuleActive ? 1 : 0.5);
if (isRuleActive) btnEnable.setFlags(['progressive']);
else btnEnable.clearFlags();
};
btnEnable.on('click', function() {
toggleRule();
});
var toggleFunc = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleFunc;
isRuleFunc = val;
if (isRuleFunc) {
btnFunc.setFlags(['progressive']);
r.$input.attr('placeholder', 'return match.toUpperCase();');
} else {
btnFunc.clearFlags();
r.$input.attr('placeholder', 'Replace');
}
};
btnFunc.on('click', function() {
toggleFunc();
});
btnFunc.toggle(false);
reg.on('change', function(v) {
fl.setDisabled(!v);
fl.toggle(v);
btnFunc.setDisabled(!v);
if (!v) {
btnFunc.toggle(false);
if (isRuleFunc) toggleFunc(false);
} else btnFunc.toggle(true);
});
var del = new OO.ui.ButtonWidget({
icon: 'trash',
flags: 'destructive',
framed: false,
title: 'Delete rule',
});
del.on('click', function() {
row.fadeOut(200, function() {
row.remove();
rulesRegistry = rulesRegistry.filter(x => x.row !== row);
updateRuleButtons();
});
});
contentDiv.append(f.$element, $('<div>').css('margin-top', '3px').append(r.$element), $('<div>').addClass('wa-rule-opt-row').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Regex: ').css({
'font-size': '0.8em',
'margin-right': '4px'
}), reg.$element, fl.$element.css({
'width': '50px',
'margin-left': '5px'
})), btnFunc.$element.css('margin-left', '10px')), $('<div>').css('display', 'flex').append(btnEnable.$element, del.$element)));
row.append(controls, contentDiv);
$rulesList.append(row);
var ruleItem = {
row: row,
find: f,
rep: r,
regex: reg,
flags: fl,
btnUp: btnUp,
btnDown: btnDown,
enable: btnEnable,
del: del,
btnFunc: btnFunc,
isActive: function() {
return isRuleActive;
},
setActive: toggleRule,
isFunc: function() {
return isRuleFunc;
},
setFunc: toggleFunc
};
rulesRegistry.push(ruleItem);
btnUp.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx > 0) {
var prevRow = rulesRegistry[idx - 1].row;
row.fadeOut(150, function() {
row.insertBefore(prevRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx - 1);
updateRuleButtons();
}
});
btnDown.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx < rulesRegistry.length - 1) {
var nextRow = rulesRegistry[idx + 1].row;
row.fadeOut(150, function() {
row.insertAfter(nextRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx + 1);
updateRuleButtons();
}
});
updateRuleButtons();
}
btnAddRule.on('click', addRule);
addRule();
togWikiTypos.on('change', function(v) {
if (v) {
if (wikiTypos.length > 0) lblWikiStatus.text(wikiTypos.length + ' rules loaded (Cached)');
else {
lblWikiStatus.text('Fetching...');
togWikiTypos.setDisabled(true);
new mw.Api().get({
action: 'query',
prop: 'revisions',
titles: mw.config.get('wgFormattedNamespaces')[4] + ':AutoWikiBrowser/Typos',
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(d) {
var page = d.query.pages[0];
if (!page.missing) {
wikiTypos = parseTypoContent(page.revisions[0].slots.main.content);
lblWikiStatus.text(wikiTypos.length + ' rules loaded');
} else {
lblWikiStatus.text('Page not found');
togWikiTypos.setValue(false);
}
}).catch(function() {
lblWikiStatus.text('Error');
togWikiTypos.setValue(false);
}).always(function() {
togWikiTypos.setDisabled(false);
});
}
} else lblWikiStatus.text('Rules inactive');
});
btnLoadLocal.on('click', function() {
$typoInput.click();
});
$typoInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
localTypos = parseTypoContent(evt.target.result);
lblLocalStatus.text(localTypos.length + ' local rules loaded');
btnClearLocal.setDisabled(false);
};
reader.readAsText(file);
$typoInput.val('');
});
btnClearLocal.on('click', function() {
localTypos = [];
lblLocalStatus.text('No local rules');
btnClearLocal.setDisabled(true);
});
btnLoadLib.on('click', function() {
$libInput.click();
});
btnRemoveLib.on('click', function() {
currentLibrary = {
name: null,
code: null
};
updateLibUI();
});
$libInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
currentLibrary = {
name: file.name,
code: evt.target.result
};
updateLibUI();
};
reader.readAsText(file);
$libInput.val('');
});
btnPower.on('click', async function() {
hasNewSources = false;
checkSummaryWarning();
$('.wa-editor-header').removeClass('wa-header-alert');
if (!isRunning) {
resetViewScroll();
if (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") {
setStatus('Setting watermark...', 'working');
try {
var notifData = await new mw.Api().get({
action: 'query',
meta: 'notifications',
notprop: 'list',
notsections: 'alert',
notlimit: 1,
formatversion: 2
});
if (notifData.query && notifData.query.notifications && notifData.query.notifications.list.length > 0) {
notificationWatermark = parseInt(notifData.query.notifications.list[0].id, 10) || 0;
} else {
notificationWatermark = 0;
}
} catch (e) {
console.warn("wAwB: Failed to fetch notification watermark", e);
}
}
if (SAVED_SESSION === 0) mw.track('stats.mediawiki_gadget_wAwB_total');
isRunning = true;
toggleUI(true);
loadNextPage();
} else {
if (SAVED_RUN > 0) {
mw.track('stats.mediawiki_gadget_wAwB_saved_total', SAVED_RUN, {
wiki: WIKI
});
SAVED_SESSION += SAVED_RUN;
SAVED_RUN = 0;
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
resetPanels();
}
});
inputSummary.on('change', function() {
checkSummaryWarning();
if (currentTitle) {
updateSummaryPreview(inputSummary.getValue());
}
});
btnSkip.on('click', function() {
if (Editor.getValue() === 'Loading...') return;
removeTopLine();
loadNextPage();
});
btnDiff.on('click', function() {
currentViewMode = 'diff';
updateDirtyState();
if (currentTitle) renderDiff();
});
btnPreview.on('click', function() {
currentViewMode = 'preview';
updateDirtyState();
if (currentTitle) renderPreview();
});
btnSave.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
if (autoSaveTimer) clearTimeout(autoSaveTimer);
btnSave.setDisabled(true);
setStatus('Saving...', 'working');
var effectiveDelay = PERMS.saveDelay || 0;
if (effectiveDelay > 0) setStatus('Throttling (' + (effectiveDelay / 1000) + 's)...', 'working');
setTimeout(function() {
if (effectiveDelay > 0) setStatus('Saving...', 'working');
var finalSum = $('#wa-summary-preview').val().trim();
var summary = finalSum + SUMMARY_SUFFIX;
new mw.Api().postWithToken('csrf', {
action: 'edit',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
text: Editor.getValue(),
summary: summary,
minor: chkMinor.isSelected(),
baserevid: baseRevId,
bot: PERMS.allowBot,
watchlist: 'nochange',
tags: DO_TAG ? APP_NAME : undefined
}).then(function() {
SAVED_RUN += 1;
removeTopLine();
loadNextPage();
}).catch(function(c) {
btnSave.setDisabled(false);
setStatus('Save error', 'error');
alert('Save failed: ' + c);
});
}, effectiveDelay);
});
btnManualEdit.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
// Calculate the final injected summary
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : inputSummary.getValue();
var finalSum = base + (currentPageSummaryAppend || "");
var translatedSummary = injectVars(finalSum);
var summary = translatedSummary; // no SUMMARY_SUFFIX
// Create an invisible form targeting a new tab
var $form = $('<form>').attr({
method: 'POST',
action: mw.util.getUrl(currentTitle, { action: 'edit' }),
target: '_blank'
}).hide();
// Populate it with MediaWiki's native input names
$('<textarea>').attr('name', 'wpTextbox1').val(Editor.getValue()).appendTo($form);
$('<input>').attr('name', 'wpSummary').val(summary).appendTo($form);
if (chkMinor.isSelected()) {
$('<input>').attr('name', 'wpMinoredit').val('1').appendTo($form);
}
// Append, fire, and destroy
$form.appendTo('body').submit().remove();
});
btnWatch.on('click', function() {
var isWatched = btnWatch.getIcon() === 'unStar';
new mw.Api()[isWatched ? 'unwatch' : 'watch'](currentTitle).then(function() {
btnWatch.setIcon(isWatched ? 'star' : 'unStar');
mw.notify(isWatched ? 'Unwatched' : 'Watched');
});
});
btnAdd.on('click', function() {
if (isFetching) {
isFetching = false;
btnAdd.setDisabled(true).setLabel('Cancelling...');
return;
}
try {
var mode = srcSelect.getValue(),
q = srcInput.getValue().trim();
if (mode !== 'watchlist' && mode !== 'usercontribs' && mode !== 'pageswithprop' && !q) {
alert('Query empty');
return;
}
var nsIds = ($nsSelect.val() || []).map(v => parseInt(v));
var nsStr = nsIds.join('|');
var api = new mw.Api(),
promises = [];
if (mode === 'cat') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'categorymembers',
cmtitle: mw.Title.newFromText(q, 14) ? mw.Title.newFromText(q, 14).getPrefixedText() : 'Category:' + q,
cmnamespace: nsStr,
cmtype: (chkCatPages.isSelected() ? 'page|' : '') + (chkCatSub.isSelected() ? 'subcat|' : '') + (chkCatFile.isSelected() ? 'file' : ''),
cmlimit: 'max'
}));
else if (mode === 'linksto') {
if (chkLinkWiki.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'backlinks',
bltitle: q,
blnamespace: nsStr,
bllimit: 'max',
blfilterredir: dropLinkRedir.getValue(),
blredirect: chkLinkToRedir.isSelected()
}));
if (chkLinkTrans.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'embeddedin',
eititle: q,
einamespace: nsStr,
eilimit: 'max',
eifilterredir: dropLinkRedir.getValue()
}));
if (chkLinkImg.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'imageusage',
iutitle: q,
iunamespace: nsStr,
iulimit: 'max',
iufilterredir: dropLinkRedir.getValue()
}));
} else if (mode === 'linkson') promises.push(fetchWithContinue(api, {
action: 'query',
generator: 'links',
titles: q,
gplnamespace: nsStr,
gpllimit: 'max',
prop: 'info'
}));
else if (mode === 'prefix') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'allpages',
apprefix: q,
apnamespace: nsIds[0] || 0,
aplimit: 'max'
}));
else if (mode === 'watchlist') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'watchlistraw',
wrnamespace: nsStr,
wrlimit: 'max'
}));
else if (mode === 'search') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'search',
srsearch: q,
srnamespace: nsStr,
srlimit: 'max'
}));
else if (mode === 'usercontribs') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'usercontribs',
ucuser: srcInputUser.getValue(),
ucstart: srcInputStartDate.getValue(),
ucend: srcInputEndDate.getValue(),
ucdir: 'newer',
uclimit: 'max',
ucnamespace: nsStr,
ucprop: 'title'
}));
else if (mode === 'pageswithprop') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'pageswithprop',
pwppropname: srcDropProp.getValue(),
pwplimit: 'max'
}));
Promise.all(promises).then(function(res) {
var list = new Set();
res.forEach(titles => titles.forEach(t => list.add(t)));
var currentVal = listTextarea.getValue();
var newVal = Array.from(list).join('\n');
listTextarea.setValue(currentVal ? currentVal + '\n' + newVal : newVal);
mw.notify('Added ' + list.size + ' pages');
}).catch(e => alert('Error: ' + e));
} catch (e) {
alert("Fetch error: " + e);
}
});
btnSort.on('click', function() {
var v = listTextarea.getValue();
if (v) {
var lines = getNormalizedList(v);
lines.sort((a, b) => sortAsc ? a.localeCompare(b) : b.localeCompare(a));
listTextarea.setValue(lines.join('\n'));
sortAsc = !sortAsc;
}
});
btnDedup.on('click', function() {
var v = listTextarea.getValue();
if (v) listTextarea.setValue(getDeduplicatedList(v).join('\n'));
});
btnClear.on('click', function() {
listTextarea.setValue('');
});
btnSaveProj.on('click', function() {
try {
var currentMode = srcSelect.getValue();
if (['watchlist', 'usercontribs', 'pageswithprop'].indexOf(currentMode) === -1) queryCache[currentMode] = srcInput.getValue();
var saveExcludes = {};
for (var k in protCheckboxes) saveExcludes[k] = protCheckboxes[k].isSelected();
var data = {
version: APP_VERSION,
library: currentLibrary,
source: {
activeMode: currentMode,
namespaces: ($nsSelect.val() || []).map(v => parseInt(v)),
modes: {
cat: {
query: queryCache['cat'] || '',
options: {
pages: chkCatPages.isSelected(),
sub: chkCatSub.isSelected(),
file: chkCatFile.isSelected()
}
},
linksto: {
query: queryCache['linksto'] || '',
options: {
wiki: chkLinkWiki.isSelected(),
trans: chkLinkTrans.isSelected(),
img: chkLinkImg.isSelected(),
redir: dropLinkRedir.getValue(),
toRedir: chkLinkToRedir.isSelected()
}
},
linkson: {
query: queryCache['linkson'] || ''
},
prefix: {
query: queryCache['prefix'] || ''
},
watchlist: {
query: ''
},
search: {
query: queryCache['search'] || ''
},
usercontribs: {
options: {
user: srcInputUser.getValue(),
start: srcInputStartDate.getValue(),
end: srcInputEndDate.getValue()
}
},
pageswithprop: {
options: {
prop: srcDropProp.getValue()
}
}
}
},
settings: {
redir: redirMode.findSelectedItem().getData(),
skipLogic: radSkipExist.findSelectedItem().getData(),
skipNoChange: chkSkipNoChange.isSelected(),
minor: chkMinor.isSelected()
},
filters: {
contains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
notContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
},
categories: {
skip: inpSkipCategories.getValue(),
require: inpSkipNotCategories.getValue()
}
},
rules: rulesRegistry.map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
})),
scripts: {
pre: txtPreScript.getValue(),
post: txtPostScript.getValue()
},
processing: {
summary: inputSummary.getValue(),
list: listTextarea.getValue()
},
protection: {
mode: dropProtMode.getValue(),
excludes: saveExcludes,
target: (radTargetSet.findSelectedItem() || {
getData: () => null
}).getData(),
templateFilter: inpTemplateFilter.getValue()
}
};
var a = document.createElement('a');
a.href = URL.createObjectURL(new Blob([JSON.stringify(data, null, 1)], {
type: "application/json"
}));
a.download = "wawb_project.json";
a.click();
} catch (e) {
alert("Save error: " + e);
}
});
btnLoadProj.on('click', function() {
$fileInput.click();
});
function applyIf(val, action) {
if (val !== undefined && val !== null) action(val);
}
$fileInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
try {
var data = JSON.parse(evt.target.result);
isLoadingProject = true;
// --- 1. SOURCE SETTINGS ---
applyIf(data?.source?.namespaces, v => $nsSelect.val(v.map(String)));
if (data?.source?.modes) {
var m = data.source.modes;
// Merge into queryCache instead of wiping it
for (var key in m) {
if (m[key]?.query !== undefined) queryCache[key] = m[key].query;
}
applyIf(m?.cat?.options?.pages, v => chkCatPages.setSelected(v));
applyIf(m?.cat?.options?.sub, v => chkCatSub.setSelected(v));
applyIf(m?.cat?.options?.file, v => chkCatFile.setSelected(v));
applyIf(m?.linksto?.options?.wiki, v => chkLinkWiki.setSelected(v));
applyIf(m?.linksto?.options?.trans, v => chkLinkTrans.setSelected(v));
applyIf(m?.linksto?.options?.img, v => chkLinkImg.setSelected(v));
applyIf(m?.linksto?.options?.redir, v => dropLinkRedir.setValue(v));
applyIf(m?.linksto?.options?.toRedir, v => chkLinkToRedir.setSelected(v));
applyIf(m?.usercontribs?.options?.user, v => srcInputUser.setValue(v));
applyIf(m?.usercontribs?.options?.start, v => srcInputStartDate.setValue(v));
applyIf(m?.usercontribs?.options?.end, v => srcInputEndDate.setValue(v));
applyIf(m?.pageswithprop?.options?.prop, v => srcDropProp.setValue(v));
}
// --- 2. SETTINGS & SKIP LOGIC ---
applyIf(data?.settings?.redir, v => redirMode.selectItemByData(v));
applyIf(data?.settings?.skipLogic, v => radSkipExist.selectItemByData(v));
applyIf(data?.settings?.skipNoChange, v => chkSkipNoChange.setSelected(v));
applyIf(data?.settings?.minor, v => chkMinor.setSelected(v));
// --- 3. PROTECTION ---
applyIf(data?.protection?.mode, v => dropProtMode.setValue(v));
applyIf(data?.protection?.target, v => radTargetSet.selectItemByData(v));
applyIf(data?.protection?.templateFilter, v => inpTemplateFilter.setValue(v));
if (data?.protection?.excludes) {
for (var k in data.protection.excludes) {
if (protCheckboxes[k]) applyIf(data.protection.excludes[k], v => protCheckboxes[k].setSelected(v));
}
}
// --- 4. LIBRARY ---
applyIf(data?.library?.name, v => currentLibrary.name = v);
applyIf(data?.library?.code, v => currentLibrary.code = v);
if (data?.library?.name || data?.library?.code) updateLibUI();
// --- 5. FILTERS ---
applyIf(data?.filters?.contains?.val, v => inpSkipContains.setValue(v));
applyIf(data?.filters?.contains?.regex, v => togSkipContainsRegex.setValue(v));
applyIf(data?.filters?.notContains?.val, v => inpSkipNotContains.setValue(v));
applyIf(data?.filters?.notContains?.regex, v => togSkipNotContainsRegex.setValue(v));
applyIf(data?.filters?.categories?.skip, v => inpSkipCategories.setValue(v));
applyIf(data?.filters?.categories?.require, v => inpSkipNotCategories.setValue(v));
// --- 6. SCRIPTS & PROCESSING ---
applyIf(data?.scripts?.pre, v => txtPreScript.setValue(v));
applyIf(data?.scripts?.post, v => txtPostScript.setValue(v));
applyIf(data?.processing?.summary, v => inputSummary.setValue(v));
applyIf(data?.processing?.list, v => listTextarea.setValue(v));
// --- 7. DYNAMIC RULES ARRAY ---
if (data?.rules && Array.isArray(data.rules)) {
rulesRegistry.forEach(r => r.row.remove());
rulesRegistry = [];
$rulesList.empty();
data.rules.forEach(r => {
addRule();
var last = rulesRegistry[rulesRegistry.length - 1];
applyIf(r.find, v => last.find.setValue(v));
applyIf(r.replace, v => last.rep.setValue(v));
applyIf(r.regex, v => {
last.regex.setValue(v);
last.flags.setDisabled(!v);
});
applyIf(r.flags, v => last.flags.setValue(v));
applyIf(r.enabled, v => last.setActive(v));
applyIf(r.isFunc, v => last.setFunc(v));
});
if (rulesRegistry.length === 0) addRule();
}
// --- 8. TRIGGER UI UPDATES ---
applyIf(data?.source?.activeMode, v => {
isLoadingProject = false;
srcSelect.setValue(v);
srcSelect.emit('change', v);
isLoadingProject = true;
});
isLoadingProject = false;
setStatus('Project loaded');
} catch (err) {
alert("Load Error: " + err);
}
$fileInput.val('');
};
reader.readAsText(file);
});
if (CAN_MOVE || IS_ADMIN) {
togAdminEnable.on('change', function(val) {
if (!currentTitle) {
updateInterfaceMode();
return;
}
if (val) {
Editor.setValue(originalWikitext);
updateInterfaceMode();
renderDiff();
setStatus('Ready (Page actions)');
} else processPageContent();
});
}
if (CAN_MOVE) {
btnAdminMove.on('click', function() {
if (!currentVars['$xA']) {
mw.notify('Variable $xA not set', {
type: 'error'
});
return;
}
new mw.Api().postWithToken('csrf', {
action: 'move',
assert: 'user', //throw 'assertuserfailed' when logged-out
from: currentTitle,
to: currentVars['$xA'],
reason: inputSummary.getValue() + SUMMARY_SUFFIX,
movetalk: chkMovTalk.isSelected(),
movesubpages: chkMovSub.isSelected(),
noredirect: chkMovRedirect.isSelected()
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Move failed: ' + e));
});
}
if (IS_ADMIN) {
btnAdminDel.on('click', function() {
new mw.Api().postWithToken('csrf', {
action: 'delete',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
if (chkDelTalk.isSelected()) new mw.Api().postWithToken('csrf', {
action: 'delete',
title: mw.Title.newFromText(currentTitle).getTalkPage().getPrefixedText(),
reason: 'Talk page of deleted page'
});
removeTopLine();
loadNextPage();
}).catch(e => alert('Delete failed: ' + e));
});
btnAdminProt.on('click', function() {
var protections = [];
if (dropProtEdit.getValue()) protections.push('edit=' + dropProtEdit.getValue());
if (dropProtMove.getValue()) protections.push('move=' + dropProtMove.getValue());
new mw.Api().postWithToken('csrf', {
action: 'protect',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
protections: protections.join('|'),
expiry: inpProtExpiry.getValue() || 'infinite',
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Protect failed: ' + e));
});
}
Editor.init();
resetPanels();
});
$(window).on('beforeunload', function() {
return "You have unsaved work.";
});
}).catch(e => console.error("wAwB Loader Error:", e));
//</nowiki>
d1yor2y68i9a08upzvlspy0fninzxue
750465
750464
2026-07-08T05:18:58Z
Ponor
47975
750465
javascript
text/javascript
/*
* wAwB – An in-browser application for automated editing of wiki pages.
* Features: customizable regex or JavaScript search-and-replace rules,
* custom JavaScript pre/post-processing functions and function libraries,
* granular protection or targeting of different parts of wikitext,
* a full-fledged CodeMirror editor, and options to move, delete, and protect pages.
* Author: [[User:Ponor]]
* Documentation: [[User:Ponor/wAwB]]
* License: GNU General Public License (GPL)
*/
//<nowiki>
mw.loader.using([
'oojs-ui-core',
'oojs-ui-widgets',
'oojs-ui-windows',
'mediawiki.api',
'mediawiki.diff.styles',
'mediawiki.util',
'mediawiki.page.gallery.styles',
'oojs-ui.styles.icons-content',
'oojs-ui.styles.icons-interactions',
'oojs-ui.styles.icons-movement',
'oojs-ui.styles.icons-moderation',
'oojs-ui.styles.icons-editing-core',
'oojs-ui.styles.icons-editing-advanced'
]).then(function() {
// =====================================================================
// 1. STATE & CONFIGURATION
// =====================================================================
var SCRIPT_TIMEOUT_MS = window.wa_timeout || 5000;
var FETCH_SAFETY_LIMIT = window.wa_fetchLimit || 10000;
var APP_NAME = "wAwB";
var DO_TAG = false;
var SUMMARY_SUFFIX = window.wa_suffix || " [[:w:en:User:Ponor/wAwB| #wAwB]]";
var APP_VERSION = "0.7";
var DOC_URL = window.wa_docUrl || "https://en.wikipedia.org/wiki/User:Ponor/wAwB";
document.title = window.wa_editIn || "Edit in wAwB";
var PERMS = {
canSave: false,
allowBot: false,
saveDelay: 0
};
var IS_ADMIN = mw.config.get('wgUserGroups').includes('sysop');
var CAN_MOVE = IS_ADMIN || mw.config.get('wgUserGroups').includes('extendedmover') || mw.config.get('wgUserGroups').includes('filemover') || mw.config.get('wgUserGroups').includes('pagemover');
var WIKI = mw.config.get('wgDBname');
var ON_NOTIFY = window.wa_onNotification || 'warn'; // warn, stop, nothing
var ON_NOTIFY_FREQ = 30 * 1000; // every 30s
var SAVED_RUN = 0;
var SAVED_SESSION = 0;
var currentPageExists = false;
var isRunning = false;
var isFetching = false;
var currentTitle = null;
var currentVars = {};
var currentLibrary = {
name: null,
code: null
};
var originalWikitext = "";
var currentPageSummaryAppend = "";
var currentPageSummaryOverride = null;
var baseRevId = 0;
var currentViewMode = 'diff';
var activeView = { page: '', mode: '' };
var scrollCache = {}; // Stores specific positions, e.g., { "PageName|diff": { top: 150, isBottom: false } }
var globalModeBottom = { diff: false, preview: false }; // Tracks the "sticky bottom" rule per mode
var autoSaveTimer = null;
var propNamesLoaded = false;
var hasNewSources = false;
var currentHeightMode = 1; // 0=25%, 1=45% (default), 2=72%
var heightValues = ['25%', '45%', '72%'];
// EXTERNAL RULES STATE
var wikiTypos = [];
var localTypos = [];
// LOADING FLAG
var isLoadingProject = false;
// NAMESPACE ALIASES
var nsIds = mw.config.get('wgNamespaceIds');
var catAliases = [],
fileAliases = [];
for (var key in nsIds) {
if (nsIds[key] === 14) catAliases.push(key.replace(/_/g, ' '));
if (nsIds[key] === 6) fileAliases.push(key.replace(/_/g, ' '));
}
catAliases.sort((a, b) => b.length - a.length);
fileAliases.sort((a, b) => b.length - a.length);
var REGEX_CAT_PFX = catAliases.map(mw.util.escapeRegExp).join('|');
var REGEX_FILE_PFX = fileAliases.map(mw.util.escapeRegExp).join('|');
// MASTER PROTECTION DEFINITIONS
var PROTECTION_DEFS = [{
id: 'nowiki',
isOn: true,
label: 'Nowiki: <nowiki>',
regex: /<nowiki>[\s\S]*?<\/nowiki>|<nowiki\s*\/>/gi
},
{
id: 'comments',
isOn: true,
label: 'Comments: <!' + '-- -->',
regex: new RegExp('<!' + '--[\\s\\S]*?--' + '>', 'g')
},
{
id: 'headers',
isOn: false,
label: 'Headers: == Title ==',
regex: /^==+[\s\S]+?==+\s*$/gm
},
{
id: 'templates',
isOn: false,
label: 'Templates: {{...}}',
open: '{{',
close: '}}',
species: null,
regex: null
},
{
id: 'tables',
isOn: false,
label: 'Tables: {|...|}',
open: '\n{|',
close: '\n|}',
regex: null
},
{
id: 'images',
isOn: false,
label: 'Images: [[File:...|...|...]]',
open: '[[',
close: ']]',
species: '(?:' + REGEX_FILE_PFX + ')\\s*:',
regex: null
},
{
id: 'refs',
isOn: true,
label: 'Refs: <ref...',
regex: /<ref[^>]*?\/>|<ref[^>]*?(?<!\/)>[\s\S]*?<\/ref>/gi
},
{
id: 'blocks',
isOn: false,
label: 'Blocks: math, gallery...',
regex: null
},
{
id: 'categories',
isOn: true,
label: 'Categories: [[Category:...]]',
regex: new RegExp('\\[\\[\\s*(' + REGEX_CAT_PFX + ')\\s*:[^\\]]+\\]\\]', 'giu')
},
{
id: 'files',
isOn: true,
label: 'File names: File:...',
regex: new RegExp('(?<=\\[\\[\\s*:?(:?' + REGEX_FILE_PFX + ')\\s*:)[^|\\]]+' + '|^\\s*(?:' + REGEX_FILE_PFX + ')\\s*:([^\\][}{|\\n]{1,150}\\.(?:svg|png|jpe?g|gif|tiff|webp|xcf|mp3|midi|ogg|webm|flac|wav|mpe?g|pdf|djv))', 'gmiu')
},
{
id: 'targets',
isOn: false,
label: 'Targets of [[...|',
regex: /(?<=\[\[:?)[^|\]]+?(?=\||\]\])/g
},
{
id: 'extlinks',
isOn: true,
label: 'External links: [...]',
regex: /(?<=\[)(https?:\/\/|ftps?:\/\/|mailto:)[^\]]+(?=\])/gi
},
{
id: 'urls',
isOn: true,
label: 'URLs: http...',
regex: /https?:\/\/[^\s<>[\]"'`()]+/gi
}
];
// =====================================================================
// 2. CSS STYLES
// =====================================================================
var styles = `
* { box-sizing: border-box; }
#wa-root { font-family: sans-serif; height: 100vh; width: 100vw; overflow: hidden; display: flex; font-size: 14px; }
#wa-left-panel { width: 400px; min-width: 400px; max-width: 400px; background: var(--background-color-base, #fff); border-right: 1px solid #c8ccd1; display: flex; flex-direction: column; z-index: 10; overflow-x: hidden; }
#wa-left-panel h3 { color: #3f6fcf; text-align: center; margin: 12px 0 0 0; }
#wa-username { color: #3f6fcf; text-align: center; margin: 2px 0; font-size: 92%; }
#wa-content-area { flex: 1; padding: 10px 10px 100px 10px; overflow-y: auto; overflow-x: hidden; }
#wa-right-panel { flex: 1; display: flex; flex-direction: column; height: 100%; background: var(--background-color-interactive, #eaecf0); overflow: hidden; }
#wa-visual-output { flex: 0 0 45%; min-height: 0; overflow-y: auto; background: var(--background-color-base, #fff); padding: 20px; border-bottom: 1px solid #c8ccd1; }
.wa-editor-header { flex: 0 0 40px; min-height: 40px; padding: 0 10px; background: var(--background-color-interactive-subtle, #f8f9fa); border-bottom: 1px solid #c8ccd1; display: flex; gap: 25px; justify-content: space-between; align-items: center; z-index: 10; }
.wa-editor-header.wa-dirty { background: var(--background-color-warning-subtle, #fdf2d5); border-bottom: 1px solid #e6a700; }
@keyframes wa-header-pulse { 0% { background-color: var(--background-color-destructive-subtle, #fee7e6); } 50% { background-color: var(--background-color-interactive-subtle, transparent); } 100% { background-color: var(--background-color-destructive-subtle, #fee7e6); } }
.wa-editor-header.wa-header-alert { border-bottom: 2px solid var(--border-color-destructive, #b32424) !important; animation: wa-header-pulse 1s 60 ease-in-out forwards !important; }
.wa-header-left { flex: 1; display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.wa-header-right { flex: 0 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--color-placeholder, #72777d); font-size: 0.9em; }
.wa-title-link { font-weight: bold; font-size: 1.1em; color: var(--color-progressive--focus, #36c) !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 40%; }
.wa-title-link:hover { text-decoration: underline; }
#wa-status-indicator { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background-color: #00af89; cursor: help; transition: background-color 0.2s; margin-right: 2px; }
#wa-status-indicator.wa-status-working { background-color: #36c; animation: wa-pulse-blue 1.5s infinite; }
#wa-status-indicator.wa-status-error { background-color: #bf3c2c; }
@keyframes wa-pulse-blue { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.wa-header-sep { border-left: 1px solid #ccc; height: 16px; flex-shrink: 0; margin: 0 2px; }
#wa-summary-preview { flex-grow: 1; color: #d00; font-style: italic; white-space: nowrap; text-overflow: ellipsis; overflow-x: auto; background: transparent; border: none; outline: none; box-shadow: none; min-width: 50px; padding: 2px 5px; scrollbar-width: none; -ms-overflow-style: none; font-size: 1em; }
#wa-summary-preview::-webkit-scrollbar { display: none; }
#wa-summary-preview:hover { background: rgba(0, 0, 0, 0.05); cursor: text; }
#wa-summary-preview:focus { background: #fff; }
.wa-info-container { margin-right: 10px; }
.wa-tools-container { display: flex; align-items: center; gap: 2px; }
.wa-resize-container { display: flex; flex-direction: column; justify-content: center; height: 100%; margin-left: 10px; padding-left: 5px; border-left: 1px solid #ccc; }
.wa-resize-btn { cursor: pointer; color: #72777d; user-select: none; width: 20px; height: 14px; display: flex; align-items: center; justify-content: center; transition: color 0.1s ease-in-out; }
.wa-resize-btn:hover { color: #36c; }
.wa-resize-btn.wa-resize-disabled { color: #ccc; cursor: default; }
#wa-proc-header { margin-top: 15px !important; border-bottom: none !important; cursor: default; }
#wa-proc-title { font-weight: bold; padding: 10px; display: block; }
#wa-proc-content { padding: 0 10px 15px 10px; }
#wa-editor-area { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--background-color-base, #fff); position: relative; overflow: hidden; }
#wa-editor-textarea { flex: 1; height: 100%; font-family: monospace; font-size: 13px; border: none; outline: none; padding: 10px; resize: none; width: 100%; }
.cm-editor { height: 100% !important; flex: 1; }
.wa-section-header { margin-top: 12px; border-bottom: 1px solid #eee; width: 100%; display: block; margin-left: 0 !important; }
#wa-content-area .wa-section-header:first-child, #wa-content-area .wa-section-header.oo-ui-buttonElement-frameless:first-child { margin-top: 0; margin-left: 0 !important; }
.wa-section-header > .oo-ui-buttonElement-button { text-align: left; padding: 10px 10px !important; margin: 0 !important; display: block; width: 100%; position: relative; border-left: 3px solid #3f6fcf !important; border-radius: 3px !important; background-color: transparent !important; }
.wa-section-header > .oo-ui-buttonElement-button:focus { outline: none !important; }
.wa-section-header .oo-ui-labelElement-label { font-weight: bold; padding-left: 0 !important; margin-left: 0 !important; color: var(--color-base, #202122); }
.wa-section-header .oo-ui-indicatorElement-indicator { position: absolute; right: 10px !important; top: 50%; margin-top: -10px; left: auto !important; width: 20px; }
.wa-foldable-content { display: none; padding: 10px 0; }
.wa-source-options { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; border-top: none; padding: 8px; margin-bottom: 10px; font-size: 0.9em; }
.wa-opt-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 5px; }
.wa-opt-label { font-weight: bold; width: 100%; margin-bottom: 5px; color: var(--color-base, #202122); }
.wa-opt-row > div { margin-top: 8px !important; margin-bottom: 8px !important; }
.wa-rule-row { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; padding: 8px; margin-bottom: 8px; border-radius: 4px; display: flex; align-items: stretch; transition: background-color 0.3s; }
.wa-rule-row.wa-highlight { background-color: var(--background-color-interactive, #eaecf0); border-color: #36c; }
.wa-rule-controls { display: flex; flex-direction: column; justify-content: center; gap: 0px; padding-right: 4px; border-right: 1px solid #eee; margin-right: 8px; }
.wa-rule-btn { margin: 0 !important; margin-right: 0 !important; margin-left: 0 !important; }
.wa-rule-btn > .oo-ui-buttonElement-button { margin: 0 !important; }
.wa-rule-content { flex: 1; min-width: 0; }
.wa-rule-opt-row { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
#wa-ns-selector { width: 100%; margin-bottom: 10px; font-family: sans-serif; font-size: 0.9em; border: 1px solid #a2a9b1; }
.wa-lib-dialog > .oo-ui-window-frame { width: 80vw !important; max-width: none !important; height: 80vh !important; max-height: none !important; }
.wa-lib-editorwrapper { height: 100%; border: 1px solid #c8ccd1; position: relative; boxSizing: border-box; }
.wa-page-list-raw textarea { font-family: monospace; font-size: 0.9em; white-space: pre; overflow-x: auto; }
.wa-list-running textarea { background-color: var(--background-color-neutral-subtle, #f8f8f8) !important; color: var(--color-base, #202122) !important; }
.wa-grid-container { display: flex; gap: 6px; margin-bottom: 10px; }
.wa-grid-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wa-grid-col .oo-ui-buttonWidget { width: 100%; }
.wa-grid-col .oo-ui-buttonWidget .oo-ui-buttonElement-button { width: 100%; text-align: center; justify-content: center; }
.wa-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 4px; border-bottom: 1px solid #eee; padding-bottom: 4px; margin-bottom: 4px; }
.wa-list-counter { margin-right: auto; font-weight: bold; color: var(--color-subtle, #54595d); font-size: 0.9em; padding-left: 5px; }
.wa-project-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px; margin: 8px 0; justify-content: center; }
.wa-project-bar .oo-ui-buttonElement-button { padding-left: 36px !important; padding-right: 12px !important; font-size: 0.9em; }
.wa-project-bar .oo-ui-iconElement-icon { left: 10px !important; }
.wa-settings-header { font-weight: bold; color: var(--color-subtle, #54595d); margin-bottom: 8px; display: block; text-transform: uppercase; font-size: 0.9em; }
.wa-setting-row { display: flex; align-items: center; margin-bottom: 6px; }
.wa-bot-row { background: var(--background-color-success-subtle, #dff2eb); border: 1px solid #a5d6a7; padding: 8px; margin-bottom: 10px; border-radius: 4px; display: flex; align-items: center; justify-content: flex-start; gap: 15px; }
table.diff { width: 100%; font-family: "Adwaita Mono", "Courier New", monospace }
table.diff td { vertical-align: top; }
table.diff tr:hover td { background-color: var(--background-color-progressive-subtle--hover, #d9e2ff); cursor: pointer; }
@keyframes wa-pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); border-color: #ff0000; } 70% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); border-color: #ff0000; } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); border-color: #ff0000; } }
.wa-summary-warning input { animation: wa-pulse-red 1s infinite; border-color: #ff0000 !important; }
`;
$('<style>').text(styles).appendTo('head');
$('body').empty();
// =====================================================================
// 3. HELPER FUNCTIONS
// =====================================================================
function checkPermissions() {
return new Promise(function(resolve) {
var api = new mw.Api();
var projectNs = mw.config.get('wgFormattedNamespaces')[4];
var checkTitles = {
'permissions': projectNs + ':AutoWikiBrowser/CheckPageJSON',
'tag': 'MediaWiki:Tag-wAwB'
};
api.get({
action: 'query',
prop: 'revisions',
titles: Object.values(checkTitles).join('|'),
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(data) {
var pagePerms = data.query.pages.find(p => p.title === checkTitles['permissions']);
var pageTag = data.query.pages.find(p => p.title === checkTitles['tag']);
DO_TAG = pageTag.missing === undefined;
var userName = mw.config.get('wgUserName');
var userGroups = mw.config.get('wgUserGroups');
var isSysop = userGroups.includes('sysop');
if (!pagePerms.missing) {
try {
var content = pagePerms.revisions[0].slots.main.content;
var json = JSON.parse(content);
var inEnabledUsers = json.enabledusers && json.enabledusers.includes(userName);
var inEnabledBots = json.enabledbots && json.enabledbots.includes(userName);
var isBotGroup = userGroups.includes('bot');
var canSave = inEnabledUsers || inEnabledBots || isSysop;
var allowBot = inEnabledBots && isBotGroup;
resolve({
canSave: canSave,
allowBot: allowBot,
saveDelay: 0
});
} catch (e) {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
} else {
var editCount = mw.config.get('wgUserEditCount');
if (editCount > 500) resolve({
canSave: true,
allowBot: false,
saveDelay: 20000
});
else resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
}).catch(function() {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
});
});
}
function getUserCode(widget, globalName) {
var val = widget.getValue().trim();
if (!val || val.startsWith('// Enter')) {
if (window[globalName] && typeof window[globalName] === 'function') {
var s = window[globalName].toString();
return s.substring(s.indexOf('{') + 1, s.lastIndexOf('}'));
}
return "";
}
if (val.startsWith('function')) {
return val.substring(val.indexOf('{') + 1, val.lastIndexOf('}'));
}
return val;
}
function normalizeLine(line) {
if (!line) return null;
// Pass through comments/STOP commands (trimmed)
if (line.trim().startsWith('####')) return line.trim();
// Handle Title|Variables
var parts = line.split('|');
var title = parts[0].trim();
if (!title) return null; // Skip if title is empty
// Reassemble: Clean Title + Original Variables (preserving whitespace)
var rest = parts.length > 1 ? parts.slice(1).join('|') : null;
return title + (rest !== null ? '|' + rest : '');
}
function getNormalizedList(text) {
if (!text) return [];
return text.split('\n')
.map(normalizeLine)
.filter(function(l) {
return l !== null;
});
}
function getDeduplicatedList(text) {
if (!text) return [];
var seen = new Set();
var out = [];
var lines = text.split('\n');
for (var i = 0; i < lines.length; i++) {
var clean = normalizeLine(lines[i]);
if (clean && !seen.has(clean)) {
seen.add(clean);
out.push(clean);
}
}
return out;
}
function parseTypoContent(content) {
if (!content) return [];
try {
var $wrapper = $('<body>').html(content);
var rules = [];
$wrapper.find('Typo:not([disabled])').each(function() {
var $t = $(this);
var find = $t.attr('find');
var replace = $t.attr('replace');
if (find && replace !== undefined) {
rules.push({
find: find,
replace: replace,
regex: true,
flags: 'gmu',
enabled: true,
isFunc: false
});
}
});
return rules;
} catch (e) {
return [];
}
}
function updateSummaryPreview(baseText) {
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : (baseText || "");
var finalSum = base + (currentPageSummaryAppend || "");
var previewText = finalSum ? injectVars(finalSum) : '';
$('#wa-summary-preview').val(previewText);
}
function injectVars(text) {
if (!text) return "";
return text.replace(/\$x([A-Z]|x)/g, function(match) {
return currentVars[match] || match; // Swap it, or leave it alone if undefined
});
}
function captureViewScroll() {
var $container = $('#wa-visual-output');
if (!$container.length || !activeView.mode) return;
var scrollTop = $container.scrollTop();
var innerHeight = $container.innerHeight();
var scrollHeight = $container[0].scrollHeight;
var hasScrollbar = scrollHeight > innerHeight;
var isBottom = false;
if (hasScrollbar) {
isBottom = (scrollTop + innerHeight >= scrollHeight - 10);
globalModeBottom[activeView.mode] = isBottom;
}
// Save the exact position for this specific page AND mode combo
var cacheKey = activeView.page + '|' + activeView.mode;
scrollCache[cacheKey] = {
top: scrollTop,
isBottom: isBottom
};
}
function restoreViewScroll(targetPage, targetMode) {
var $container = $('#wa-visual-output');
if (!$container.length) return;
var cacheKey = targetPage + '|' + targetMode;
var savedState = scrollCache[cacheKey];
if (savedState) {
// Rule A: We have been to this exact page/mode. Restore exactly.
if (savedState.isBottom) {
$container.scrollTop($container[0].scrollHeight);
} else {
$container.scrollTop(savedState.top);
}
} else if (globalModeBottom[targetMode]) {
// Rule B: It is a NEW page. If the sticky bottom is
// globally active for THIS mode, use it.
$container.scrollTop($container[0].scrollHeight);
} else {
// Rule C: New page, no sticky bottom active. Reset to top.
$container.scrollTop(0);
}
activeView.page = targetPage;
activeView.mode = targetMode;
}
function resetViewScroll() {
activeView = { page: '', mode: '' };
scrollCache = {};
globalModeBottom = { diff: false, preview: false };
}
// =====================================================================
// 4. UI CONSTRUCTION
// =====================================================================
checkPermissions().then(function(pState) {
PERMS = pState;
var $main = $('<div>').attr('id', 'wa-root').appendTo('body');
var $left = $('<div>').attr('id', 'wa-left-panel').appendTo($main);
$left.append($('<h3>').append($('<a>').attr('href', DOC_URL).attr('target', '_blank').text(APP_NAME).css({
'text-decoration': 'none',
'color': 'inherit'
})));
$left.append($('<div>').attr('id', 'wa-username').append($('<a>').attr('href', mw.util.getUrl('Special:Contributions/' + mw.config.get('wgUserName'))).attr('target', '_blank').text('User: ' + mw.config.get('wgUserName')).css({
'text-decoration': 'none',
'color': 'inherit'
})));
var btnSaveProj = new OO.ui.ButtonWidget({
icon: 'download',
label: 'Save project',
framed: false,
flags: 'progressive'
});
var btnLoadProj = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load project',
framed: false
});
var $projBar = $('<div>').addClass('wa-project-bar').append(btnSaveProj.$element, btnLoadProj.$element);
$left.append($projBar);
var $fileInput = $('<input type="file" accept=".json">').hide().appendTo('body');
var $content = $('<div>').attr('id', 'wa-content-area').appendTo($left);
var $right = $('<div>').attr('id', 'wa-right-panel').appendTo($main);
var $editorHeader = $('<div>').addClass('wa-editor-header').appendTo($right);
var $headerLeft = $('<div>').addClass('wa-header-left').appendTo($editorHeader);
var $statusIndicator = $('<span>').attr('id', 'wa-status-indicator').attr('title', 'Ready').appendTo($headerLeft);
var $titleLink = $('<a>').addClass('wa-title-link').text('Page content').attr('target', '_blank').appendTo($headerLeft);
$('<span>').addClass('wa-header-sep').appendTo($headerLeft);
var $summaryPreview = $('<input type="text">').attr('id', 'wa-summary-preview').attr('autocomplete', 'off').appendTo($headerLeft);
var $headerRight = $('<div>').addClass('wa-header-right').appendTo($editorHeader);
var $infoContainer = $('<span>').addClass('wa-info-container').appendTo($headerRight);
var $toolsContainer = $('<div>').addClass('wa-tools-container').appendTo($headerRight);
var $resizeContainer = $('<div>').addClass('wa-resize-container').appendTo($headerRight);
var $adminTools = $('<div>').addClass('wa-admin-tools').hide().appendTo($toolsContainer);
// Wide chevron SVGs
var svgUp = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 10 L12 2 L22 10" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var svgDown = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 2 L12 10 L22 2" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var $btnSizeUp = $('<div>').addClass('wa-resize-btn').html(svgUp).attr('title', 'Decrease view size');
var $btnSizeDown = $('<div>').addClass('wa-resize-btn').html(svgDown).attr('title', 'Increase view size');
$resizeContainer.append($btnSizeUp, $btnSizeDown);
function setPanelHeight(modeIndex) {
currentHeightMode = modeIndex;
if (currentHeightMode < 0) currentHeightMode = 0;
if (currentHeightMode > 2) currentHeightMode = 2;
$('#wa-visual-output').css('flex-basis', heightValues[currentHeightMode]);
$btnSizeUp.toggleClass('wa-resize-disabled', currentHeightMode === 0);
$btnSizeDown.toggleClass('wa-resize-disabled', currentHeightMode === 2);
}
$btnSizeUp.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode - 1);
});
$btnSizeDown.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode + 1);
});
setPanelHeight(1);
if (CAN_MOVE) {
var btnAdminMove = new OO.ui.ButtonWidget({
icon: 'move',
title: 'Move page to $xA',
disabled: true,
framed: false
});
$adminTools.append(btnAdminMove.$element).show();
}
if (IS_ADMIN) {
var btnAdminDel = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Delete page',
disabled: true,
framed: false
});
var btnAdminProt = new OO.ui.ButtonWidget({
icon: 'lock',
title: 'Protect page',
disabled: true,
framed: false
});
$adminTools.append(btnAdminDel.$element, btnAdminProt.$element).show();
}
var btnManualEdit = new OO.ui.ButtonWidget({
icon: 'edit',
title: 'Open in manual editor',
framed: false,
disabled: true
});
var btnWatch = new OO.ui.ButtonWidget({
icon: 'star',
title: 'Watch this page',
framed: false,
disabled: true,
accessKey: 'w'
});
$toolsContainer.append(btnManualEdit.$element, btnWatch.$element);
var $visualOut = $('<div>').attr('id', 'wa-visual-output').html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready to start...</div>').prependTo($right);
var $editorArea = $('<div>').attr('id', 'wa-editor-area').appendTo($right);
var $textArea = $('<textarea>').attr('id', 'wa-editor-textarea').attr('placeholder', 'Page text will appear here...').appendTo($editorArea);
function setStatus(msg, type) {
if (!msg) msg = "Ready";
$statusIndicator.attr('title', msg).removeClass('wa-status-error wa-status-working');
if (type === 'error') $statusIndicator.addClass('wa-status-error');
if (type === 'working') $statusIndicator.addClass('wa-status-working');
}
// EDITOR OBJECT
var Editor = {
mode: 'textarea',
cmInstance: null,
init: function() {
var self = this;
mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.mode.mediawiki']).then(function(require) {
try {
self.cmInstance = new(require('ext.CodeMirror'))($textArea[0], (require('ext.CodeMirror.mode.mediawiki')).mediawiki());
self.cmInstance.initialize();
self.mode = 'codemirror';
} catch (e) {
console.error("CM Error", e);
}
}).catch(function(err) {
console.error("CM Load Error:", err);
});
$textArea.on('input', updateDirtyState);
},
getValue: function() {
return (this.mode === 'codemirror' && this.cmInstance) ? this.cmInstance.view.state.doc.toString() : $textArea.val();
},
setValue: function(text) {
$textArea.val(text);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.dispatch({
changes: {
from: 0,
to: this.cmInstance.view.state.doc.length,
insert: text
}
});
} else {
$textArea[0].dispatchEvent(new Event('input'));
}
},
setDisabled: function(d) {
$textArea.prop('disabled', d);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.contentDOM.contentEditable = !d;
$($textArea).parent().find('.cm-editor').css('opacity', d ? 0.5 : 1);
}
},
scrollToLine: function(n) {
if (isNaN(n)) return;
if (this.mode === 'codemirror' && this.cmInstance) {
var v = this.cmInstance.view;
var l = v.state.doc.line(n);
v.dispatch({
effects: v.constructor.scrollIntoView(l.from, {
y: 'center'
}),
selection: {
anchor: l.from
}
});
v.focus();
}
}
};
var WorkerEngine = {
activeWorker: null,
workerURL: null,
currentLibCode: null,
timeoutTimer: null,
initWorker: function(libCode) {
this.destroy(); // Clean up existing if any
this.currentLibCode = libCode || "";
var scriptContent = this.currentLibCode + "\n\n" + `
self.onmessage = async function(e) {
try {
var data = e.data;
var inputs = data.texts || [data.text];
var vars = data.vars;
var outputs = [];
// Helper to construct async functions dynamically
var AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
function inject(str) {
if (!str) return "";
return str.replace(/\\$x([A-Z]|x)/g, function(m) { return vars[m] || ""; });
}
// Returns a Promise and handles 'await' inside user code
async function execUserFunc(code, currentText, currentVars, sharedObj) {
if (!code || code.trim() === "") return currentText;
try {
var func = new AsyncFunction('text', 'vars', 'shared', code);
var res = await func(currentText, currentVars, sharedObj);
if (res && typeof res === 'object' && res.skip) {
return { _skipSignal: true, reason: res.reason || 'Script-requested skip' };
}
return (res !== undefined) ? res : currentText;
} catch (err) {
throw err; // or: return currentText
}
}
var shared = {}; // Shared context for this page
for (var i = 0; i < inputs.length; i++) {
var text = inputs[i];
// 1. Pre-Process
var preRes;
if (data.preCode && data.preCode.trim() !== "") {
preRes = await execUserFunc(data.preCode, text, vars, shared);
} else if (typeof wAwB_Pre === 'function') {
try {
preRes = await wAwB_Pre(text, vars, shared);
if (preRes && typeof preRes === 'object' && preRes.skip) {
preRes = { _skipSignal: true, reason: preRes.reason || 'Script-requested skip' };
}
} catch (err) { preRes = text; }
} else {
preRes = text;
}
if (preRes && preRes._skipSignal) {
self.postMessage({ skipped: true, reason: preRes.reason });
return;
}
text = (preRes !== undefined) ? preRes : text;
// 2. Rules Processing
if (data.rules && data.rules.length > 0) {
data.rules.forEach(function(rule) {
var findStr = inject(rule.find);
if (!findStr) return;
if (rule.isFunc) {
try {
var userFunc = new Function('match', 'groups', 'vars', 'shared', rule.replace);
text = text.replace(new RegExp(findStr, (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '')), function(...args) {
var match = args[0];
var groups = args.slice(1, -2);
try {
var res = userFunc(match, groups, vars, shared);
return res !== undefined ? res : match;
} catch (err) { return match; }
});
} catch (e) {}
} else {
var repStr = inject(rule.replace).replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
if (rule.regex) {
try {
var flags = (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '');
text = text.replace(new RegExp(findStr, flags), repStr);
} catch (e) {}
} else {
var finalFind = findStr.replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
text = text.split(finalFind).join(repStr);
}
}
});
}
// 3. Post-Process
var postRes;
if (data.postCode && data.postCode.trim() !== "") {
postRes = await execUserFunc(data.postCode, text, vars, shared);
} else if (typeof wAwB_Post === 'function') {
try {
postRes = await wAwB_Post(text, vars, shared);
if (postRes && typeof postRes === 'object' && postRes.skip) {
postRes = { _skipSignal: true, reason: postRes.reason || 'Script-requested skip' };
}
} catch (err) { postRes = text; }
} else {
postRes = text;
}
if (postRes && postRes._skipSignal) {
self.postMessage({ skipped: true, reason: postRes.reason });
return;
}
text = (postRes !== undefined) ? postRes : text;
outputs.push(text);
}
self.postMessage({ success: true, texts: outputs, summaryAppend: shared.summaryAppend, summaryOverride: shared.summaryOverride });
} catch (err) { self.postMessage({ success: false, error: err.toString() }); }
};
`;
var blob = new Blob([scriptContent], {
type: 'application/javascript'
});
this.workerURL = URL.createObjectURL(blob);
this.activeWorker = new Worker(this.workerURL);
},
run: function(payload) {
var self = this;
return new Promise(function(resolve, reject) {
// Re-init if no worker exists, or if the user changed the library code
if (!self.activeWorker || self.currentLibCode !== (payload.libraryCode || "")) {
self.initWorker(payload.libraryCode);
}
if (self.timeoutTimer) clearTimeout(self.timeoutTimer);
self.timeoutTimer = setTimeout(function() {
self.destroy(); // Assassinate the stuck worker
reject("Script timed out (" + SCRIPT_TIMEOUT_MS + "ms).");
}, SCRIPT_TIMEOUT_MS);
self.activeWorker.onmessage = function(e) {
clearTimeout(self.timeoutTimer);
if (e.data.skipped) resolve({
skipped: true,
reason: e.data.reason
});
else if (e.data.success) resolve({
success: true,
texts: e.data.texts,
summaryAppend: e.data.summaryAppend,
summaryOverride: e.data.summaryOverride
});
else reject(e.data.error);
};
self.activeWorker.postMessage(payload);
});
},
destroy: function() {
if (this.activeWorker) {
this.activeWorker.terminate();
this.activeWorker = null;
}
if (this.workerURL) {
URL.revokeObjectURL(this.workerURL);
this.workerURL = null;
}
if (this.timeoutTimer) {
clearTimeout(this.timeoutTimer);
this.timeoutTimer = null;
}
}
};
var PageProtector = {
store: [],
getKey: function() {
var id = this.store.length.toString();
var p = "";
for (var i = 0; i < id.length; i++) {
p += String.fromCharCode(0xE010 + parseInt(id[i]));
}
return '\uE000' + p + '\uE001';
},
protect: function(text, mode, config, templateSpecies = null) {
this.store = [];
var self = this;
var safeRep = function(t, r) {
return t.replace(r, function(m) {
if (!m) return m;
var key = self.getKey();
self.store.push(m);
return key;
});
};
var shouldProcess = function(id) {
if (mode === 'target') return config === id;
return config[id] === true;
};
var matchedBrackets = function(text, op, cl, species = '') {
var newText = "",
depth = 0,
start = 0,
cursor = 0;
var speciesRegex = species ? new RegExp(species, 'iu') : null;
for (var i = 0; i < text.length; i++) {
if (text[i] === op[0] && text.slice(i, i + op.length) === op) {
if (depth === 0) start = i;
depth++;
i += op.length - 1;
} else if (text[i] === cl[0] && text.slice(i, i + cl.length) === cl) {
if (depth > 0) {
depth--;
if (depth === 0) {
var chunk = text.substring(start, i + cl.length);
if (!speciesRegex || speciesRegex.test(chunk)) {
var key = self.getKey();
self.store.push(chunk);
newText += text.substring(cursor, start) + key;
} else {
newText += text.substring(cursor, i + cl.length);
}
cursor = i + cl.length;
}
i += cl.length - 1;
}
}
}
newText += text.substring(cursor);
return newText;
};
PROTECTION_DEFS.forEach(function(def) {
if (shouldProcess(def.id)) {
if (def.id === 'blocks') {
['math', 'pre', 'source', 'syntaxhighlight', 'code', 'gallery'].forEach(t => text = safeRep(text, new RegExp('<' + t + '[^>]*?>[\\s\\S]*?<\\/' + t + '>|<' + t + '[^>]*?/>', 'gi')));
} else if (['templates', 'tables', 'images'].includes(def.id)) {
var activeSpecies = (def.id === 'templates') ? templateSpecies : def.species;
text = matchedBrackets(text, def.open, def.close, activeSpecies || '');
} else if (def.regex) {
text = safeRep(text, def.regex);
}
}
});
return text;
},
restore: function(text) {
var self = this;
var loop = 100;
while (/(\uE000[\uE010-\uE019]+\uE001)/.test(text) && loop > 0) {
text = text.replace(/\uE000([\uE010-\uE019]+)\uE001/g, function(m, d) {
var id = "";
for (var i = 0; i < d.length; i++) id += (d.charCodeAt(i) - 0xE010).toString();
return self.store[parseInt(id, 10)] || m;
});
loop--;
}
return text;
}
};
var accordionRegistry = [];
function addSection(title, $inner) {
var btn = new OO.ui.ButtonWidget({
label: title,
indicator: 'down',
framed: false,
classes: ['wa-section-header']
});
var box = $('<div>').addClass('wa-foldable-content').append($inner);
var sectionObj = {
btn: btn,
box: box,
label: title
};
accordionRegistry.push(sectionObj);
btn.on('click', function() {
var isOpening = !box.is(':visible');
if (isOpening) {
accordionRegistry.forEach(function(sec) {
if (sec !== sectionObj) {
sec.box.hide();
sec.btn.setIndicator('down');
}
});
}
box.toggle();
btn.setIndicator(box.is(':visible') ? 'up' : 'down');
});
$content.append(btn.$element, box);
return sectionObj;
}
// WIDGETS
var srcSelect = new OO.ui.DropdownInputWidget({
options: [{
data: 'cat',
label: 'Category'
}, {
data: 'linksto',
label: 'Pages linking to...'
}, {
data: 'linkson',
label: 'Links on page...'
}, {
data: 'prefix',
label: 'Pages with prefix...'
}, {
data: 'watchlist',
label: 'Watchlist'
}, {
data: 'search',
label: 'Wiki search'
}, {
data: 'usercontribs',
label: 'User contributions'
}, {
data: 'pageswithprop',
label: 'Pages with property'
}]
});
var srcInput = new OO.ui.TextInputWidget({
placeholder: 'Category...'
});
var now = new Date();
var today = now.toISOString().split('T')[0];
var srcInputUser = new OO.ui.TextInputWidget({
placeholder: 'Username'
});
var srcInputStartDate = new OO.ui.TextInputWidget({
value: today + 'T00:00:00',
placeholder: 'ISO start date'
});
var srcInputEndDate = new OO.ui.TextInputWidget({
value: today + 'T23:59:59',
placeholder: 'ISO end date'
});
var srcDropProp = new OO.ui.DropdownInputWidget({
options: []
});
var $optContainer = $('<div>').addClass('wa-source-options').hide();
var $optCat = $('<div>').hide();
var $optUser = $('<div>').hide();
var $optProp = $('<div>').hide();
var chkCatPages = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkCatSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkCatFile = new OO.ui.CheckboxInputWidget({
selected: false
});
$optCat.append($('<div>').addClass('wa-opt-label').text('Include:'), new OO.ui.FieldLayout(chkCatPages, {
label: 'Pages',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatSub, {
label: 'Subcats',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatFile, {
label: 'Files',
align: 'inline'
}).$element);
$optUser.append(new OO.ui.FieldLayout(srcInputUser, {
label: 'User',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputStartDate, {
label: 'Start (Older)',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputEndDate, {
label: 'End (Newer)',
align: 'top'
}).$element);
$optProp.append(new OO.ui.FieldLayout(srcDropProp, {
label: 'Property',
align: 'top'
}).$element);
var $optLinks = $('<div>').hide();
var chkLinkWiki = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkLinkTrans = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkLinkImg = new OO.ui.CheckboxInputWidget({
selected: false
});
var dropLinkRedir = new OO.ui.DropdownInputWidget({
options: [{
data: 'nonredirects',
label: 'No redirects'
}, {
data: 'all',
label: 'Both'
}, {
data: 'redirects',
label: 'Redirects only'
}]
});
var chkLinkToRedir = new OO.ui.CheckboxInputWidget({
selected: false
});
$optLinks.append($('<div>').addClass('wa-opt-label').text('What to include:'), $('<div>').addClass('wa-opt-row').append(new OO.ui.FieldLayout(chkLinkWiki, {
label: 'Wikilinks',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkTrans, {
label: 'Transclusions',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkImg, {
label: 'File usage',
align: 'inline'
}).$element), $('<div>').addClass('wa-opt-label').text('Redirects:'), dropLinkRedir.$element, new OO.ui.FieldLayout(chkLinkToRedir, {
label: 'Include links to redirects',
align: 'inline'
}).$element);
$optContainer.append($optCat, $optLinks, $optUser, $optProp);
var queryCache = {};
var lastMode = 'cat';
srcSelect.on('change', function(newMode) {
if (!isLoadingProject) {
if (lastMode !== 'watchlist' && lastMode !== 'usercontribs' && lastMode !== 'pageswithprop') {
queryCache[lastMode] = srcInput.getValue();
}
}
$optContainer.hide();
$optCat.hide();
$optLinks.hide();
$optUser.hide();
$optProp.hide();
srcInput.setDisabled(false).$element.show();
if (newMode === 'cat') {
$optContainer.show();
$optCat.show();
} else if (newMode === 'linksto') {
$optContainer.show();
$optLinks.show();
} else if (newMode === 'usercontribs') {
$optContainer.show();
$optUser.show();
srcInput.setDisabled(true).$element.hide();
} else if (newMode === 'pageswithprop') {
$optContainer.show();
$optProp.show();
srcInput.setDisabled(true).$element.hide();
if (!propNamesLoaded) {
new mw.Api().get({
action: 'query',
list: 'pagepropnames',
ppnlimit: 'max'
}).then(function(d) {
if (d.query && d.query.pagepropnames) {
srcDropProp.setOptions(d.query.pagepropnames.map(p => ({
data: p.propname,
label: p.propname
})));
propNamesLoaded = true;
}
});
}
}
if (newMode === 'watchlist') {
srcInput.setValue('');
srcInput.setDisabled(true);
srcInput.$input.attr('placeholder', '(No query needed)');
} else if (newMode !== 'usercontribs' && newMode !== 'pageswithprop') {
srcInput.setValue(queryCache[newMode] || '');
var ph = 'Query...';
if (newMode === 'cat') ph = 'Category name';
if (newMode === 'search') ph = 'Search query...';
if (newMode === 'prefix') ph = 'Page prefix...';
if (newMode === 'linksto') ph = 'Pages linking to this title...';
if (newMode === 'linkson') ph = 'Get links from this page...';
srcInput.$input.attr('placeholder', ph);
}
lastMode = newMode;
});
srcSelect.emit('change', srcSelect.getValue());
var $nsSelect = $('<select>').attr('id', 'wa-ns-selector').attr('multiple', 'multiple').attr('size', '8');
var nsMap = mw.config.get('wgFormattedNamespaces');
for (var id in nsMap) {
if (parseInt(id) >= 0) $nsSelect.append($('<option>').val(id).text(id + ': ' + (nsMap[id] || '(Main)')));
}
$nsSelect.val(['0']);
var btnAdd = new OO.ui.ButtonWidget({
label: 'Add to list',
icon: 'add',
flags: ['primary', 'progressive']
});
var $btnRow = $('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-top': '10px'
});
var $fetchStatus = $('<span>').css({
'margin-right': '10px',
'color': '#888',
'font-size': '0.9em',
'align-self': 'center'
}).hide();
$btnRow.append($fetchStatus, btnAdd.$element);
addSection('Source', $('<div>').append(new OO.ui.FieldLayout(srcSelect, {
label: 'Mode',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInput, {
label: 'Query',
align: 'top'
}).$element, $optContainer, $('<div>').text('Namespaces:').css({
'font-weight': 'bold',
'margin-top': '5px'
}), $nsSelect, $btnRow));
var redirMode = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'edit',
label: 'Edit the redirect page (Default)'
}), new OO.ui.RadioOptionWidget({
data: 'follow',
label: 'Follow redirect (Edit target)'
}), new OO.ui.RadioOptionWidget({
data: 'skip',
label: 'Skip redirects'
})]
});
redirMode.selectItemByData('edit');
var radSkipExist = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'none',
label: 'Process all'
}), new OO.ui.RadioOptionWidget({
data: 'missing',
label: 'Skip if page does not exist'
}), new OO.ui.RadioOptionWidget({
data: 'exists',
label: 'Skip if page exists'
})]
});
radSkipExist.selectItemByData('none');
var chkSkipNoChange = new OO.ui.CheckboxInputWidget({
selected: false
});
var inpSkipContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if FOUND'
});
var togSkipContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipNotContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if MISSING'
});
var togSkipNotContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if in: Category1|Category2'
});
var inpSkipNotCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if NOT in: Category1|Category2'
});
var $settingsPanel = $('<div>')
.append($('<span>').addClass('wa-settings-header').text('Redirects'))
.append(redirMode.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Skip logic'))
.append(new OO.ui.FieldLayout(chkSkipNoChange, {
label: 'Skip if no changes made',
align: 'inline'
}).$element.css('margin-bottom', '8px'))
.append(radSkipExist.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Content filters'))
.append($('<div>').addClass('wa-setting-row').append(inpSkipContains.$element.css('flex', 1), togSkipContainsRegex.$element.css('margin-left', '5px')))
.append($('<div>').addClass('wa-setting-row').append(inpSkipNotContains.$element.css('flex', 1), togSkipNotContainsRegex.$element.css('margin-left', '5px')))
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Category filters'))
.append(new OO.ui.FieldLayout(inpSkipCategories, {
label: 'Blacklist',
align: 'top'
}).$element)
.append(new OO.ui.FieldLayout(inpSkipNotCategories, {
label: 'Whitelist',
align: 'top'
}).$element);
addSection('Skip', $settingsPanel);
var dropProtMode = new OO.ui.DropdownInputWidget({
options: [{
data: 'protect',
label: 'Protect (Exclude)'
}, {
data: 'target',
label: 'Target (Edit Matches Only)'
}]
});
var inpTemplateFilter = new OO.ui.TextInputWidget({
placeholder: 'Regex: infobox rail line|railway'
});
var $templateFilterLayout = new OO.ui.FieldLayout(inpTemplateFilter, {
label: 'Template filter',
align: 'top'
});
var $protList = $('<div>');
var protCheckboxes = {};
PROTECTION_DEFS.forEach(function(def) {
var chk = new OO.ui.CheckboxInputWidget({
selected: def.isOn
});
protCheckboxes[def.id] = chk;
$protList.append(new OO.ui.FieldLayout(chk, {
label: def.label,
align: 'inline'
}).$element);
});
var targetRadioItems = PROTECTION_DEFS.map(function(def) {
return new OO.ui.RadioOptionWidget({
data: def.id,
label: def.label
});
});
var radTargetSet = new OO.ui.RadioSelectWidget({
items: targetRadioItems
});
var $targetList = $('<div>').hide().append(radTargetSet.$element);
dropProtMode.on('change', function(mode) {
if (mode === 'protect') {
$protList.show();
$targetList.hide();
} else {
$protList.hide();
$targetList.show();
}
});
addSection('Protection', $('<div>').addClass('wa-source-options')
.append(new OO.ui.FieldLayout(dropProtMode, {
label: 'Mode',
align: 'top'
}).$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($protList).append($targetList)
.append($('<div style="margin-top:10px;">').append($templateFilterLayout.$element))
);
var $rulesList = $('<div>');
var btnAddRule = new OO.ui.ButtonWidget({
label: 'Add rule',
icon: 'add'
});
var rulesRegistry = [];
addSection('Rules', $('<div>').append($rulesList, btnAddRule.$element));
var togWikiTypos = new OO.ui.ToggleSwitchWidget({
value: false
});
var lblWikiStatus = $('<div>').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var btnLoadLocal = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load file',
framed: false
});
var btnClearLocal = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear local',
framed: false,
flags: 'destructive',
disabled: true
});
var lblLocalStatus = $('<div>').text('No local rules').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var $typoInput = $('<input type="file">').hide().appendTo('body');
var $extRulesPanel = $('<div>').addClass('wa-source-options');
$extRulesPanel.append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'space-between'
}).append($('<span>').text('Project:AutoWikiBrowser/Typos').css('font-weight', 'bold'), togWikiTypos.$element),
$('<div>').css('margin-bottom', '10px').append(lblWikiStatus),
$('<hr>').css('border-top', '1px solid #eee'),
$('<div>').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Local rules (session only)').css({
'font-weight': 'bold'
}), $('<div>').css('flex', '1'), btnLoadLocal.$element, btnClearLocal.$element), lblLocalStatus)
);
addSection('External rules', $extRulesPanel);
var txtPreScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var txtPostScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var btnLoadLib = new OO.ui.ButtonWidget({
icon: 'upload',
title: 'Load library (.js)',
framed: false
});
var btnRemoveLib = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Remove library',
framed: false,
flags: 'destructive'
});
var txtLibStatus = new OO.ui.TextInputWidget({
value: '(No library loaded)',
readOnly: true
});
var $libInput = $('<input type="file" accept=".js">').hide().appendTo('body');
var btnEditLib = new OO.ui.ButtonWidget({
icon: 'edit',
label: 'Edit project library',
framed: false
});
var $scriptPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'gap': '5px',
'margin-bottom': '10px'
}).append($('<span>').text('JS library:').css({
'font-weight': 'bold',
'white-space': 'nowrap'
}), txtLibStatus.$element.css('flex', '1'), btnLoadLib.$element, btnRemoveLib.$element),
$('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-bottom': '10px'
}).append(btnEditLib.$element),
new OO.ui.FieldLayout(txtPreScript, {
label: 'Pre-Process',
align: 'top'
}).$element,
new OO.ui.FieldLayout(txtPostScript, {
label: 'Post-Process',
align: 'top'
}).$element
);
addSection('Scripts', $scriptPanel);
function updateLibUI() {
if (currentLibrary.code) {
txtLibStatus.setValue(currentLibrary.name);
btnRemoveLib.setDisabled(false);
} else {
txtLibStatus.setValue('(No library loaded)');
btnRemoveLib.setDisabled(true);
}
}
updateLibUI();
function LibraryEditorDialog(config) {
LibraryEditorDialog.super.call(this, config);
}
OO.inheritClass(LibraryEditorDialog, OO.ui.ProcessDialog);
LibraryEditorDialog.static.name = 'libraryEditor';
LibraryEditorDialog.static.title = 'Edit project library';
LibraryEditorDialog.static.actions = [{
action: 'save',
label: 'Save',
flags: ['primary', 'progressive']
},
{
label: 'Cancel',
flags: 'safe'
}
];
LibraryEditorDialog.prototype.initialize = function() {
LibraryEditorDialog.super.prototype.initialize.call(this);
this.$element.addClass('wa-lib-dialog'); // Attach our custom CSS override class
this.panel = new OO.ui.PanelLayout({
padded: true,
expanded: true
});
this.$editorWrapper = $('<div>').addClass('wa-lib-editorwrapper');
this.panel.$element.append(this.$editorWrapper);
this.$body.append(this.panel.$element);
};
LibraryEditorDialog.prototype.getSetupProcess = function(data) {
data = data || {};
return LibraryEditorDialog.super.prototype.getSetupProcess.call(this, data)
.next(function() {
var self = this;
self.$editorWrapper.empty();
// Create a textarea for the MediaWiki CM wrapper to properly bind to
var $libTextArea = $('<textarea>').appendTo(self.$editorWrapper);
var initCode = currentLibrary.code || "// All custom library functions defined here will be passed to the worker.\n// Special functions:\n// function wAwB_Pre(text, vars, shared) { return text; }\n// function wAwB_Post(text, vars, shared) { return text; }\n";
return mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.modes']).then(function(require) {
var CM = require('ext.CodeMirror');
var modes = require('ext.CodeMirror.modes');
self.cmInstance = new CM($libTextArea[0], modes.javascript());
self.cmInstance.initialize();
self.cmInstance.view.dispatch({
changes: {
from: 0,
insert: initCode
}
});
// Force CodeMirror to fill the wrapper
self.$editorWrapper.find('.cm-editor').css({
height: '100%'
});
}).catch(function(err) {
console.error("wAwB CM Init Error:", err);
});
}, this);
};
LibraryEditorDialog.prototype.getActionProcess = function(action) {
var dialog = this;
if (action === 'save') {
return new OO.ui.Process(function() {
var newCode = "";
if (dialog.cmInstance) {
newCode = dialog.cmInstance.view.state.doc.toString();
}
if (newCode.trim() === "") {
currentLibrary = {
name: null,
code: null
};
} else {
currentLibrary.code = newCode;
currentLibrary.name = "custom code";
}
updateLibUI();
dialog.close({
action: action
});
});
}
if (action === 'cancel' || !action) {
return new OO.ui.Process(function() {
dialog.close({
action: action
});
});
}
return LibraryEditorDialog.super.prototype.getActionProcess.call(this, action);
};
LibraryEditorDialog.prototype.getTeardownProcess = function(data) {
return LibraryEditorDialog.super.prototype.getTeardownProcess.call(this, data)
.next(function() {
if (this.cmInstance) {
try {
this.cmInstance.view.destroy();
} catch (e) {}
this.cmInstance = null;
}
}, this);
};
var windowManager = new OO.ui.WindowManager();
$('body').append(windowManager.$element);
var libDialog = new LibraryEditorDialog();
windowManager.addWindows([libDialog]);
btnEditLib.on('click', function() {
windowManager.openWindow(libDialog);
});
var togAdminEnable = new OO.ui.ToggleSwitchWidget({
value: false
});
var chkMovRedirect = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkMovTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkMovSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkDelTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var dropProtEdit = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var dropProtMove = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var inpProtExpiry = new OO.ui.TextInputWidget({
placeholder: 'infinite / 2 days / 12 hours'
});
if (CAN_MOVE || IS_ADMIN) {
var $adminPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'flex-start',
'gap': '10px'
}).append($('<span>').text('Enable page actions').css('font-weight', 'bold'), togAdminEnable.$element),
$('<hr>')
);
if (CAN_MOVE) {
$adminPanel.append(
$('<strong>').text('Move options:'), new OO.ui.FieldLayout(chkMovRedirect, {
label: 'Do not create redirect',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovTalk, {
label: 'Move talk page',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovSub, {
label: 'Move subpages',
align: 'inline'
}).$element, $('<br>')
);
}
if (IS_ADMIN) {
$adminPanel.append(
$('<strong>').text('Delete options:'), new OO.ui.FieldLayout(chkDelTalk, {
label: 'Delete talk page',
align: 'inline'
}).$element, $('<br>'),
$('<strong>').text('Protect options:'), new OO.ui.FieldLayout(dropProtEdit, {
label: 'Edit level',
align: 'top'
}).$element, new OO.ui.FieldLayout(dropProtMove, {
label: 'Move level',
align: 'top'
}).$element, new OO.ui.FieldLayout(inpProtExpiry, {
label: 'Expiry',
align: 'top'
}).$element
);
}
addSection('Page actions', $adminPanel);
}
var btnPower = new OO.ui.ButtonWidget({
label: 'Start',
icon: 'power',
flags: ['primary', 'progressive'],
title: 'Start editing',
accessKey: 'a'
});
var btnDiff = new OO.ui.ButtonWidget({
label: 'Diff',
icon: 'update',
title: 'Show diff',
accessKey: 'd'
});
var btnSkip = new OO.ui.ButtonWidget({
label: 'Next',
icon: 'next',
title: 'Skip to next page',
accessKey: 'n',
disabled: true
});
var btnPreview = new OO.ui.ButtonWidget({
label: 'Preview',
icon: 'article',
title: 'Preview page',
accessKey: 'p'
});
var btnSave = new OO.ui.ButtonWidget({
label: 'Save',
icon: 'upload',
flags: 'progressive',
title: 'Save edit',
accessKey: 's',
disabled: true
});
var inputSummary = new OO.ui.TextInputWidget({
placeholder: '',
value: '',
title: 'Enter edit summary',
accessKey: 'b'
});
var $sumLayout = new OO.ui.FieldLayout(inputSummary, {
label: 'Edit summary',
align: 'top'
}).$element;
$sumLayout.css('margin-bottom', '6px');
var listTextarea = new OO.ui.MultilineTextInputWidget({
rows: 15,
classes: ['wa-page-list-raw']
});
var btnSort = new OO.ui.ButtonWidget({
icon: 'sortVertical',
title: 'Sort list',
framed: false
});
var btnDedup = new OO.ui.ButtonWidget({
icon: 'funnel',
title: 'Remove duplicates',
framed: false
});
var btnClear = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear list',
framed: false
});
var btnPreParse = new OO.ui.ButtonWidget({
label: 'Pre-parse',
title: 'Process list in background',
icon: 'robot',
framed: false
});
var $listCounter = $('<span>').addClass('wa-list-counter').text('0 pages');
var togAutoSave = new OO.ui.ToggleSwitchWidget({
value: false
});
var txtAutoDelay = new OO.ui.TextInputWidget({
value: '10'
});
var $botRow = $('<div>').addClass('wa-bot-row').hide();
if (PERMS.allowBot) {
$botRow.show().append($('<span>').css('font-weight', 'bold').text('Bot mode: '), togAutoSave.$element, $('<span>').text('Delay (s):'), txtAutoDelay.$element.css('max-width', '40px'));
togAutoSave.on('change', function(v) {
if (v) txtAutoDelay.setValue('10');
});
}
var sortAsc = true;
var $procHeader = $('<div>').addClass('wa-section-header').attr('id', 'wa-proc-header').css({
'display': 'flex',
'justify-content': 'space-between',
'align-items': 'center'
});
var $procTitle = $('<span>').attr('id', 'wa-proc-title').text('Processing');
var chkMinor = new OO.ui.CheckboxInputWidget({
selected: true,
title: 'Minor edit'
});
var $minorLayout = new OO.ui.FieldLayout(chkMinor, {
label: 'm',
align: 'inline',
title: 'Minor edit'
});
$minorLayout.$element.css({
'margin-right': '15px',
'font-weight': 'normal'
});
$procHeader.append($procTitle, $minorLayout.$element);
var $procContent = $('<div>').attr('id', 'wa-proc-content').append(
$sumLayout, $botRow,
$('<div>').addClass('wa-grid-container').append(
$('<div>').addClass('wa-grid-col').append(btnPower.$element),
$('<div>').addClass('wa-grid-col').append(btnDiff.$element, btnSkip.$element),
$('<div>').addClass('wa-grid-col').append(btnPreview.$element, btnSave.$element)
),
$('<div>').addClass('wa-toolbar').append($listCounter, btnSort.$element, btnDedup.$element, btnClear.$element),
listTextarea.$element,
$('<div>').css({
'margin-top': '5px'
}).append(btnPreParse.$element)
);
$content.append($procHeader, $procContent);
var configWidgets = [
srcSelect, srcInput, srcInputUser, srcInputStartDate, srcInputEndDate, srcDropProp,
chkCatPages, chkCatSub, chkCatFile, chkLinkWiki, chkLinkTrans, chkLinkImg, dropLinkRedir, chkLinkToRedir,
btnAdd, redirMode, chkSkipNoChange, radSkipExist,
inpSkipContains, togSkipContainsRegex, inpSkipNotContains, togSkipNotContainsRegex, inpSkipCategories, inpSkipNotCategories,
dropProtMode, radTargetSet, inpTemplateFilter, btnAddRule,
txtPreScript, txtPostScript, chkMovRedirect, chkMovTalk, chkMovSub, chkDelTalk, dropProtEdit, dropProtMove, inpProtExpiry,
togWikiTypos, btnLoadLocal, btnClearLocal, btnPreParse
];
// =====================================================================
// 5. FUNCTION DEFINITIONS (Core Logic)
// =====================================================================
function checkSummaryWarning() {
var val = inputSummary.getValue();
var isBlank = !val || val.trim() === "";
if (isBlank || hasNewSources) inputSummary.$element.addClass('wa-summary-warning');
else inputSummary.$element.removeClass('wa-summary-warning');
}
function renderCurrentView() {
if (currentViewMode === 'preview') renderPreview();
else renderDiff();
}
function toggleConfig(isLocked) {
configWidgets.forEach(function(w) {
if (w instanceof OO.ui.TextInputWidget || w instanceof OO.ui.MultilineTextInputWidget) {
w.setReadOnly(isLocked);
w.$element.css('opacity', isLocked ? 0.8 : 1);
} else {
w.setDisabled(isLocked);
}
});
$nsSelect.prop('disabled', isLocked);
for (var key in protCheckboxes) protCheckboxes[key].setDisabled(isLocked);
rulesRegistry.forEach(function(r) {
r.find.setReadOnly(isLocked);
r.rep.setReadOnly(isLocked);
r.regex.setDisabled(isLocked);
r.flags.setReadOnly(isLocked);
r.enable.setDisabled(isLocked);
r.del.setDisabled(isLocked);
r.btnFunc.setDisabled(isLocked || !r.regex.getValue());
r.btnUp.setDisabled(isLocked || rulesRegistry.indexOf(r) === 0);
r.btnDown.setDisabled(isLocked || rulesRegistry.indexOf(r) === rulesRegistry.length - 1);
});
if (CAN_MOVE || IS_ADMIN) togAdminEnable.setDisabled(isLocked);
btnLoadLib.setDisabled(isLocked);
btnRemoveLib.setDisabled(isLocked || !currentLibrary.code);
btnEditLib.setDisabled(isLocked);
btnLoadLocal.setDisabled(isLocked);
btnClearLocal.setDisabled(isLocked || localTypos.length === 0);
}
function updateListCount() {
var val = listTextarea.getValue();
var count = val.trim() ? val.split('\n').filter(function(l) {
var line = l.trim();
return line !== "" && !line.startsWith("####");
}).length : 0;
$listCounter.text(count + ' pages');
}
listTextarea.on('change', updateListCount);
function updateDirtyState() {
if (isRunning && currentTitle && Editor.getValue() !== originalWikitext) $editorHeader.addClass('wa-dirty');
else $editorHeader.removeClass('wa-dirty');
}
var notificationWatermark = 0;
var lastNotifCheck = 0;
function checkNotifications(notifList) {
if ((ON_NOTIFY !== "warn" && ON_NOTIFY !== "stop")|| !notifList || notifList.length === 0) return false;
var triggerFound = false;
var newWatermark = notificationWatermark;
for (var i = 0; i < notifList.length; i++) {
var n = notifList[i];
var currentId = parseInt(n.id, 10) || 0;
if (currentId > newWatermark) {
newWatermark = currentId;
}
if (currentId > notificationWatermark && (n.type === 'edit-user-talk' || n.type === 'reverted')) {
triggerFound = true;
}
}
notificationWatermark = newWatermark;
if (triggerFound) {
$('.wa-editor-header').addClass('wa-header-alert');
if (ON_NOTIFY === "stop") {
var halt = confirm("A new talk page message or revert was detected!\n\nClick OK to stop the processing queue.\nClick Cancel to acknowledge and continue.");
if (halt) {
btnPower.emit('click');
return true; // Signals the save loop to halt
} else {
$('.wa-editor-header').removeClass('wa-header-alert');
}
}
}
return false;
}
function removeTopLine() {
var l = listTextarea.getValue().split('\n');
l.shift();
listTextarea.setValue(l.join('\n'));
updateListCount();
}
function updateInterfaceMode() {
var isAdminMode = togAdminEnable.getValue();
var pageLoaded = !!currentTitle;
btnSave.setDisabled(isAdminMode || !pageLoaded || !PERMS.canSave);
btnSkip.setDisabled(!pageLoaded);
btnPreview.setDisabled(!pageLoaded);
btnDiff.setDisabled(isAdminMode || !pageLoaded);
Editor.setDisabled(isAdminMode || !pageLoaded);
if (CAN_MOVE) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminMove.setDisabled(!(allowAdmin && currentVars['$xA']));
if (currentVars['$xA']) btnAdminMove.setTitle('Move page to ' + currentVars['$xA']);
else btnAdminMove.setTitle('Move page to $xA (Variable not set)');
}
if (IS_ADMIN) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminDel.setDisabled(!allowAdmin);
btnAdminProt.setDisabled(!allowAdmin);
}
}
function renderDiff() {
captureViewScroll();
$visualOut.html('<div style="color:#888; text-align:center;">Generating Diff...</div>');
var currentText = Editor.getValue();
new mw.Api().post({
'action': 'compare',
fromtitle: currentTitle,
toslots: 'main',
'totext-main': currentText,
slots: 'main',
topst: window.wa_diffPST ? true : undefined,
prop: 'diff',
formatversion: 2
}).then(function(data) {
var diffBody = data.compare && data.compare.bodies && data.compare.bodies.main;
if (diffBody) {
$visualOut.html('<h4>Diff: ' + currentTitle + '</h4><table class="diff"><colgroup><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content"></colgroup><tbody>' + diffBody + '</tbody></table>');
processDiffTable();
restoreViewScroll(currentTitle, 'diff');
} else {
$visualOut.html('<div style="color:green; text-align:center; padding-top:20px;">No Changes detected</div>');
}
});
}
function processDiffTable() {
var rightLineNum = 0;
$visualOut.find('table.diff tr').each(function() {
var $tr = $(this);
var $linenos = $tr.find('td.diff-lineno');
if ($linenos.length > 0) {
var txt = $linenos.last().text();
var m = txt.match(/(\d+)/);
if (m) rightLineNum = parseInt(m[1]);
return;
}
if ($tr.find('.diff-addedline').length > 0 || $tr.find('.diff-context').length > 0) {
$tr.attr('data-line', rightLineNum);
$tr.css('cursor', 'pointer').attr('title', 'Jump to line ' + rightLineNum);
rightLineNum++;
}
});
// Attach a single delegated click listener to the table instead of every row
$visualOut.find('table.diff').on('click', 'tr[data-line]', function() {
Editor.scrollToLine(parseInt($(this).attr('data-line')));
});
}
function renderPreview() {
captureViewScroll();
$visualOut.html('<div style="color:#888; text-align:center;">Generating Preview...</div>');
new mw.Api().post({
action: 'parse',
title: currentTitle,
text: Editor.getValue(),
prop: 'text|categorieshtml|modules|jsconfigvars',
useskin: mw.config.get('skin'),
disablelimitreport: true,
pst: true,
contentmodel: 'wikitext'
}).then(function(data) {
if (data.parse && data.parse.text) {
var $prev = $('<div>').html(data.parse.text['*']);
if (data.parse.categorieshtml) $prev.append(data.parse.categorieshtml['*']);
$prev.find('a').attr('target', '_blank');
$visualOut.empty().append($prev);
mw.loader.using(data.parse.modules.concat(data.parse.modulestyles, data.parse.modulescripts), function() {
mw.hook('wikipage.content').fire($('.wa-visual-output .mw-parser-output'));
});
restoreViewScroll(currentTitle, 'preview');
}
}).catch(function(err) {
$visualOut.html('Error generating preview.');
alert("Preview failed: " + err);
});
}
async function transformPageText(rawText, title, config) {
var filters = config.filters;
if (filters) {
var check = function(text, rule) {
if (!rule || !rule.val) return false;
if (rule.regex) {
try {
return new RegExp(rule.val, 'mu').test(text);
} catch (e) {
return false;
}
}
return text.indexOf(rule.val) !== -1;
};
if (filters.skipContains && filters.skipContains.val && check(rawText, filters.skipContains)) {
return {
skipped: true,
reason: 'Contains: ' + filters.skipContains.val
};
}
if (filters.skipNotContains && filters.skipNotContains.val && !check(rawText, filters.skipNotContains)) {
return {
skipped: true,
reason: 'Missing: ' + filters.skipNotContains.val
};
}
}
var mode = config.mode;
var inputs = [];
var compiledSpecies = null;
if (config.templateFilter) {
var tFilter = config.templateFilter;
if (tFilter[0] === "^") tFilter = "^\\{\\{\\s*" + tFilter.slice(1);
else tFilter = "\\{\\{\\s*" + tFilter;
compiledSpecies = tFilter + "(?=\\s*[|}\\n])";
}
var skeleton = PageProtector.protect(rawText, mode, config.excludes, compiledSpecies);
if (mode === 'target') inputs = PageProtector.store;
else inputs = [skeleton];
var combinedRules = rulesRegistry.filter(r => r.isActive()).map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
}));
if (togWikiTypos.getValue()) combinedRules = combinedRules.concat(wikiTypos);
if (localTypos.length > 0) combinedRules = combinedRules.concat(localTypos);
var payload = {
texts: inputs,
vars: config.vars,
preCode: getUserCode(txtPreScript, 'wAwB_Pre'),
libraryCode: currentLibrary.code,
rules: combinedRules,
postCode: getUserCode(txtPostScript, 'wAwB_Post')
};
var result = await WorkerEngine.run(payload);
if (result.skipped) return {
skipped: true,
reason: result.reason
};
var finalText = "";
if (mode === 'target') {
PageProtector.store = result.texts;
finalText = PageProtector.restore(skeleton);
} else {
finalText = PageProtector.restore(result.texts[0]);
}
return {
skipped: false,
text: finalText,
summaryAppend: result.summaryAppend,
summaryOverride: result.summaryOverride
};
}
async function processPageContent() {
try {
setStatus('Processing...', 'working');
var mode = dropProtMode.getValue();
var activeConfig = {
mode: mode,
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: currentVars,
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
var res = await transformPageText(originalWikitext, currentTitle, activeConfig);
if (res.skipped) {
removeTopLine();
loadNextPage();
return;
}
currentPageSummaryAppend = res.summaryAppend || "";
currentPageSummaryOverride = res.summaryOverride || null;
updateSummaryPreview(inputSummary.getValue());
if (chkSkipNoChange.isSelected() && res.text === originalWikitext) {
removeTopLine();
loadNextPage();
return;
}
setStatus('Ready');
Editor.setValue(res.text);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
else {
Editor.setDisabled(false);
btnSave.setDisabled(!PERMS.canSave);
btnSkip.setDisabled(false);
btnPreview.setDisabled(false);
btnDiff.setDisabled(false);
}
updateDirtyState();
renderCurrentView();
if (PERMS.allowBot && togAutoSave.getValue()) {
var delay = Math.max(0, parseInt(txtAutoDelay.getValue(), 10) || 0) * 1000;
setStatus('Auto-save in ' + (delay / 1000) + 's...', 'working');
if (autoSaveTimer) clearTimeout(autoSaveTimer);
autoSaveTimer = setTimeout(function() {
if (isRunning && PERMS.canSave) {
btnSave.emit('click');
}
}, delay);
}
} catch (e) {
setStatus('Error', 'error');
alert(e);
btnPower.emit('click');
}
}
async function runPreParseBatch() {
// 1. Toggle / Stop Logic
if (isRunning) {
isRunning = false;
setStatus('Stopping...', 'working');
btnPreParse.setLabel('Pre-parse');
return;
}
// 2. Start & Deduplicate
var currentVal = listTextarea.getValue();
var cleanVal = getDeduplicatedList(currentVal).join('\n');
listTextarea.setValue(cleanVal);
updateListCount();
isRunning = true;
toggleUI(true);
// 3. Lock UI
toggleUI(true);
btnSkip.setDisabled(true);
btnDiff.setDisabled(true);
btnPreview.setDisabled(true);
btnSave.setDisabled(true);
Editor.setDisabled(true);
btnPreParse.setLabel('Stop pre-parse');
// Inject STOP marker if not present
var currentList = listTextarea.getValue().split('\n');
if (!currentList.includes('####STOP')) {
currentList.push('####STOP');
listTextarea.setValue(currentList.join('\n'));
}
// Gather Config
var activeConfig = {
mode: dropProtMode.getValue(),
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: {},
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (activeConfig.mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
setStatus('Pre-parsing...', 'working');
while (isRunning) {
var lines = listTextarea.getValue().split('\n');
var batchTitles = [];
var stopFound = false;
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
if (line === '####STOP') {
stopFound = true;
break;
}
if (line && !line.startsWith('####')) {
var parts = line.split('|');
batchTitles.push({
fullLine: line,
title: parts[0],
vars: parts.slice(1)
});
}
if (batchTitles.length >= 50) break;
}
if (batchTitles.length === 0) {
if (stopFound) setStatus('Pre-parse complete');
else setStatus('List empty');
break;
}
$listCounter.text('Fetching ' + batchTitles.length + '...');
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
try {
var data = await api.get({
action: 'query',
prop: 'revisions' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: batchTitles.map(t => t.title).join('|'),
rvprop: 'content',
rvslots: 'main',
redirects: 1,
cllimit: 'max'
});
var pageMap = {};
if (data.query && data.query.pages) Object.values(data.query.pages).forEach(p => pageMap[p.title] = p);
var redirMap = {};
if (data.query && data.query.redirects) data.query.redirects.forEach(r => redirMap[r.from] = r.to);
var keptLines = [];
for (var k = 0; k < batchTitles.length; k++) {
var item = batchTitles[k];
var lookupTitle = redirMap[item.title] || item.title;
var page = pageMap[lookupTitle];
if (!page || page.missing || page.invalid || !page.revisions || !page.revisions[0]) {
console.warn("Skipping invalid/missing page:", item.title);
continue;
}
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) continue; // Skip
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) continue; // Skip
var rawText = page.revisions[0].slots.main['*'];
activeConfig.vars = {
'$xx': item.title
};
item.vars.forEach((v, idx) => activeConfig.vars['$x' + String.fromCharCode(65 + idx)] = v);
var res = await transformPageText(rawText, item.title, activeConfig);
// UPDATED LOGIC: Respect "Skip if no change" checkbox
if (!res.skipped && (!chkSkipNoChange.isSelected() || res.text !== rawText)) {
keptLines.push(item.fullLine);
}
}
var freshLines = listTextarea.getValue().split('\n');
var stopIndex = -1;
for (var x = 0; x < freshLines.length; x++) {
if (freshLines[x] === '####STOP') {
stopIndex = x;
break;
}
}
if (stopIndex > -1) {
var topChunk = freshLines.slice(0, stopIndex);
var botChunk = freshLines.slice(stopIndex + 1);
var processedSet = new Set(batchTitles.map(t => t.fullLine));
var newTop = topChunk.filter(l => !processedSet.has(l));
var newList = newTop.concat(['####STOP']).concat(botChunk).concat(keptLines);
listTextarea.setValue(newList.join('\n'));
updateListCount();
}
} catch (e) {
console.error(e);
setStatus('Batch error: ' + e, 'error');
break;
}
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
btnPreParse.setLabel('Pre-parse');
if (listTextarea.getValue().startsWith('####STOP')) setStatus('Pre-parse done!');
else setStatus('Stopped');
}
btnPreParse.on('click', runPreParseBatch);
function loadNextPage() {
if (!isRunning) return;
var allLines = listTextarea.getValue().split('\n');
var listChanged = false;
var stopCommand = false;
while (allLines.length > 0) {
var line = allLines[0];
if (line === '####STOP') {
stopCommand = true;
break;
}
if (line.startsWith('####') || line === "") {
allLines.shift();
listChanged = true;
} else {
break;
}
}
if (listChanged) {
listTextarea.setValue(allLines.join('\n'));
updateListCount();
}
if (stopCommand) {
btnPower.emit('click');
setStatus("Stopped by ####STOP");
return;
}
if (allLines.length === 0) {
btnPower.emit('click');
setStatus("Done!");
return;
}
var raw = allLines[0];
var parts = raw.split('|');
currentTitle = parts[0].trim();
baseRevId = 0;
originalWikitext = "";
if (!currentTitle) {
removeTopLine();
loadNextPage();
return;
}
currentVars = {};
currentVars['$xx'] = currentTitle;
for (var i = 1; i < parts.length; i++) currentVars['$x' + String.fromCharCode(64 + i)] = parts[i];
currentPageSummaryAppend = "";
currentPageSummaryOverride = null;
updateSummaryPreview(inputSummary.getValue());
setStatus('Loading...', 'working');
btnSave.setDisabled(true);
btnPreview.setDisabled(true);
btnDiff.setDisabled(true);
btnSkip.setDisabled(true);
Editor.setDisabled(true);
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
$editorHeader.removeClass('wa-dirty');
$visualOut.empty();
Editor.setValue('Loading...');
$infoContainer.empty();
currentPageExists = false;
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
var params = {
action: 'query',
prop: 'revisions|info' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: currentTitle,
rvprop: 'content|timestamp|ids',
rvslots: 'main',
inprop: 'watched',
cllimit: 'max'
};
var now = Date.now();
var shouldCheckNotifs = (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") && (now - lastNotifCheck > ON_NOTIFY_FREQ);
if (shouldCheckNotifs) {
params.meta = 'notifications';
params.notprop = 'list';
params.notsections = 'alert';
params.notlimit = 4;
lastNotifCheck = now;
}
var rMode = redirMode.findSelectedItem().getData();
if (rMode === 'follow') params.redirects = 1;
return api.get(params).then(async function(data) {
// piggyback notification check
if (data.query && data.query.notifications && data.query.notifications.list) {
var stopped = checkNotifications(data.query.notifications.list);
if (stopped) return; // exit before loading the page content
}
var pid = Object.keys(data.query.pages)[0];
var page = data.query.pages[pid];
currentPageExists = !page.missing && !page.invalid;
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat blacklist');
removeTopLine();
loadNextPage();
return;
}
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat whitelist');
removeTopLine();
loadNextPage();
return;
}
if (rMode === 'follow' && data.query.redirects) {
currentTitle = page.title;
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
mw.notify('Redirect followed to: ' + currentTitle);
}
if (rMode === 'skip' && page.redirect !== undefined) {
removeTopLine();
loadNextPage();
return;
}
var skipMode = radSkipExist.findSelectedItem().getData();
if (pid === "-1") {
if (skipMode === 'missing') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = "";
baseRevId = 0;
} else {
if (skipMode === 'exists') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = page.revisions[0].slots.main['*'];
baseRevId = page.revisions[0].revid;
}
if (page.revisions && page.revisions.length > 0) {
var rev = page.revisions[0];
var ts = new Date(rev.timestamp).toISOString().replace('T', ' ').substring(0, 16);
$infoContainer.empty().append('Last edit: ' + ts + ' | ', $('<a>').attr('href', mw.util.getUrl(currentTitle, {
action: 'history'
})).attr('target', '_blank').text('history'));
}
btnWatch.setDisabled(!currentPageExists);
btnManualEdit.setDisabled(!currentPageExists);
if (page.watched !== undefined) btnWatch.setIcon('unStar');
else btnWatch.setIcon('star');
if (CAN_MOVE || IS_ADMIN) {
updateInterfaceMode();
if (togAdminEnable.getValue()) {
Editor.setValue(originalWikitext);
renderCurrentView();
setStatus('Ready (Page actions)');
return;
}
}
processPageContent();
}).catch(function(e) {
setStatus('API error', 'error');
alert('Load error: ' + e);
btnPower.emit('click');
});
}
async function fetchWithContinue(api, params) {
var allTitles = new Set();
var continueToken = {};
var safetyLimit = FETCH_SAFETY_LIMIT;
var count = 0;
isFetching = true;
btnAdd.setLabel('Cancel fetch');
$fetchStatus.text('Fetching...').show();
try {
while (isFetching && count < safetyLimit) {
var merged = Object.assign({}, params, continueToken);
var data = await api.get(merged);
var batch = [];
if (data.watchlistraw) batch = data.watchlistraw;
else if (data.query) {
if (data.query.pages) batch = Object.values(data.query.pages);
else if (data.query.categorymembers) batch = data.query.categorymembers;
else if (data.query.backlinks) batch = data.query.backlinks;
else if (data.query.embeddedin) batch = data.query.embeddedin;
else if (data.query.imageusage) batch = data.query.imageusage;
else if (data.query.search) batch = data.query.search;
else if (data.query.allpages) batch = data.query.allpages;
else if (data.query.usercontribs) batch = data.query.usercontribs;
else if (data.query.pageswithprop) batch = data.query.pageswithprop;
}
if (batch.length > 0) {
batch.forEach(item => {
if (item.title) allTitles.add(item.title);
});
count = allTitles.size;
$fetchStatus.text('Fetched ' + count + '...');
}
if (data.continue) continueToken = data.continue;
else break;
}
} catch (e) {
alert("Fetch interrupted: " + e);
}
isFetching = false;
btnAdd.setLabel('Add to list').setDisabled(false);
$fetchStatus.text('Added ' + allTitles.size + ' pages').delay(3000).fadeOut();
if (allTitles.size > 0) {
hasNewSources = true;
checkSummaryWarning();
}
return Array.from(allTitles);
}
function toggleUI(d) {
if (d) {
btnPower.setLabel('Stop').setIcon('power').setFlags(['destructive']);
} else {
btnPower.setLabel('Start').setIcon('power').clearFlags().setFlags(['primary', 'progressive']);
if (PERMS.allowBot) togAutoSave.setValue(false);
}
toggleConfig(d);
btnSort.setDisabled(d);
btnDedup.setDisabled(d);
btnClear.setDisabled(d);
btnSaveProj.setDisabled(d);
btnLoadProj.setDisabled(d);
btnSkip.setDisabled(!d);
btnSave.setDisabled(true);
listTextarea.setReadOnly(d);
if (d) listTextarea.$element.addClass('wa-list-running');
else listTextarea.$element.removeClass('wa-list-running');
}
function resetPanels() {
Editor.setValue('');
$titleLink.text('Page content').removeAttr('href');
$editorHeader.removeClass('wa-dirty');
setStatus('Ready');
$('#wa-summary-preview').val('');
currentTitle = null;
$visualOut.html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready...</div>');
$infoContainer.empty();
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
Editor.setDisabled(true);
currentPageExists = false;
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
toggleUI(false);
updateListCount();
if (autoSaveTimer) clearTimeout(autoSaveTimer);
}
function arrayMove(arr, old_index, new_index) {
if (new_index >= arr.length) {
var k = new_index - arr.length + 1;
while (k--) arr.push(undefined);
}
arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);
}
function updateRuleButtons() {
rulesRegistry.forEach(function(item, idx) {
item.btnUp.setDisabled(idx === 0);
item.btnDown.setDisabled(idx === rulesRegistry.length - 1);
});
}
function addRule() {
var row = $('<div>').addClass('wa-rule-row');
var controls = $('<div>').addClass('wa-rule-controls');
var btnUp = new OO.ui.ButtonWidget({
icon: 'collapse',
framed: false,
title: 'Move up',
classes: ['wa-rule-btn']
});
var btnDown = new OO.ui.ButtonWidget({
icon: 'expand',
framed: false,
title: 'Move down',
classes: ['wa-rule-btn']
});
controls.append(btnUp.$element, btnDown.$element);
var contentDiv = $('<div>').addClass('wa-rule-content');
var f = new OO.ui.TextInputWidget({
placeholder: 'Find'
});
var r = new OO.ui.TextInputWidget({
placeholder: 'Replace'
});
var reg = new OO.ui.ToggleSwitchWidget();
var fl = new OO.ui.TextInputWidget({
value: 'gmu',
disabled: true
}).toggle(false);
var btnEnable = new OO.ui.ButtonWidget({
icon: 'power',
framed: false,
title: 'Toggle rule',
flags: ['progressive']
});
var isRuleActive = true;
var btnFunc = new OO.ui.ButtonWidget({
icon: 'code',
framed: false,
title: 'Toggle JS mode',
disabled: true
});
var isRuleFunc = false;
var toggleRule = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleActive;
isRuleActive = val;
row.css('opacity', isRuleActive ? 1 : 0.5);
if (isRuleActive) btnEnable.setFlags(['progressive']);
else btnEnable.clearFlags();
};
btnEnable.on('click', function() {
toggleRule();
});
var toggleFunc = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleFunc;
isRuleFunc = val;
if (isRuleFunc) {
btnFunc.setFlags(['progressive']);
r.$input.attr('placeholder', 'return match.toUpperCase();');
} else {
btnFunc.clearFlags();
r.$input.attr('placeholder', 'Replace');
}
};
btnFunc.on('click', function() {
toggleFunc();
});
btnFunc.toggle(false);
reg.on('change', function(v) {
fl.setDisabled(!v);
fl.toggle(v);
btnFunc.setDisabled(!v);
if (!v) {
btnFunc.toggle(false);
if (isRuleFunc) toggleFunc(false);
} else btnFunc.toggle(true);
});
var del = new OO.ui.ButtonWidget({
icon: 'trash',
flags: 'destructive',
framed: false,
title: 'Delete rule',
});
del.on('click', function() {
row.fadeOut(200, function() {
row.remove();
rulesRegistry = rulesRegistry.filter(x => x.row !== row);
updateRuleButtons();
});
});
contentDiv.append(f.$element, $('<div>').css('margin-top', '3px').append(r.$element), $('<div>').addClass('wa-rule-opt-row').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Regex: ').css({
'font-size': '0.8em',
'margin-right': '4px'
}), reg.$element, fl.$element.css({
'width': '50px',
'margin-left': '5px'
})), btnFunc.$element.css('margin-left', '10px')), $('<div>').css('display', 'flex').append(btnEnable.$element, del.$element)));
row.append(controls, contentDiv);
$rulesList.append(row);
var ruleItem = {
row: row,
find: f,
rep: r,
regex: reg,
flags: fl,
btnUp: btnUp,
btnDown: btnDown,
enable: btnEnable,
del: del,
btnFunc: btnFunc,
isActive: function() {
return isRuleActive;
},
setActive: toggleRule,
isFunc: function() {
return isRuleFunc;
},
setFunc: toggleFunc
};
rulesRegistry.push(ruleItem);
btnUp.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx > 0) {
var prevRow = rulesRegistry[idx - 1].row;
row.fadeOut(150, function() {
row.insertBefore(prevRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx - 1);
updateRuleButtons();
}
});
btnDown.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx < rulesRegistry.length - 1) {
var nextRow = rulesRegistry[idx + 1].row;
row.fadeOut(150, function() {
row.insertAfter(nextRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx + 1);
updateRuleButtons();
}
});
updateRuleButtons();
}
btnAddRule.on('click', addRule);
addRule();
togWikiTypos.on('change', function(v) {
if (v) {
if (wikiTypos.length > 0) lblWikiStatus.text(wikiTypos.length + ' rules loaded (Cached)');
else {
lblWikiStatus.text('Fetching...');
togWikiTypos.setDisabled(true);
new mw.Api().get({
action: 'query',
prop: 'revisions',
titles: mw.config.get('wgFormattedNamespaces')[4] + ':AutoWikiBrowser/Typos',
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(d) {
var page = d.query.pages[0];
if (!page.missing) {
wikiTypos = parseTypoContent(page.revisions[0].slots.main.content);
lblWikiStatus.text(wikiTypos.length + ' rules loaded');
} else {
lblWikiStatus.text('Page not found');
togWikiTypos.setValue(false);
}
}).catch(function() {
lblWikiStatus.text('Error');
togWikiTypos.setValue(false);
}).always(function() {
togWikiTypos.setDisabled(false);
});
}
} else lblWikiStatus.text('Rules inactive');
});
btnLoadLocal.on('click', function() {
$typoInput.click();
});
$typoInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
localTypos = parseTypoContent(evt.target.result);
lblLocalStatus.text(localTypos.length + ' local rules loaded');
btnClearLocal.setDisabled(false);
};
reader.readAsText(file);
$typoInput.val('');
});
btnClearLocal.on('click', function() {
localTypos = [];
lblLocalStatus.text('No local rules');
btnClearLocal.setDisabled(true);
});
btnLoadLib.on('click', function() {
$libInput.click();
});
btnRemoveLib.on('click', function() {
currentLibrary = {
name: null,
code: null
};
updateLibUI();
});
$libInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
currentLibrary = {
name: file.name,
code: evt.target.result
};
updateLibUI();
};
reader.readAsText(file);
$libInput.val('');
});
btnPower.on('click', async function() {
hasNewSources = false;
checkSummaryWarning();
$('.wa-editor-header').removeClass('wa-header-alert');
if (!isRunning) {
resetViewScroll();
if (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") {
setStatus('Setting watermark...', 'working');
try {
var notifData = await new mw.Api().get({
action: 'query',
meta: 'notifications',
notprop: 'list',
notsections: 'alert',
notlimit: 1,
formatversion: 2
});
if (notifData.query && notifData.query.notifications && notifData.query.notifications.list.length > 0) {
notificationWatermark = parseInt(notifData.query.notifications.list[0].id, 10) || 0;
} else {
notificationWatermark = 0;
}
} catch (e) {
console.warn("wAwB: Failed to fetch notification watermark", e);
}
}
if (SAVED_SESSION === 0) mw.track('stats.mediawiki_gadget_wAwB_total');
isRunning = true;
toggleUI(true);
loadNextPage();
} else {
if (SAVED_RUN > 0) {
mw.track('stats.mediawiki_gadget_wAwB_saved_total', SAVED_RUN, {
wiki: WIKI
});
SAVED_SESSION += SAVED_RUN;
SAVED_RUN = 0;
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
resetPanels();
}
});
inputSummary.on('change', function() {
checkSummaryWarning();
if (currentTitle) {
updateSummaryPreview(inputSummary.getValue());
}
});
btnSkip.on('click', function() {
if (Editor.getValue() === 'Loading...') return;
removeTopLine();
loadNextPage();
});
btnDiff.on('click', function() {
currentViewMode = 'diff';
updateDirtyState();
if (currentTitle) renderDiff();
});
btnPreview.on('click', function() {
currentViewMode = 'preview';
updateDirtyState();
if (currentTitle) renderPreview();
});
btnSave.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
if (autoSaveTimer) clearTimeout(autoSaveTimer);
btnSave.setDisabled(true);
setStatus('Saving...', 'working');
var effectiveDelay = PERMS.saveDelay || 0;
if (effectiveDelay > 0) setStatus('Throttling (' + (effectiveDelay / 1000) + 's)...', 'working');
setTimeout(function() {
if (effectiveDelay > 0) setStatus('Saving...', 'working');
var finalSum = $('#wa-summary-preview').val().trim();
var summary = finalSum + SUMMARY_SUFFIX;
new mw.Api().postWithToken('csrf', {
action: 'edit',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
text: Editor.getValue(),
summary: summary,
minor: chkMinor.isSelected(),
baserevid: baseRevId,
bot: PERMS.allowBot,
watchlist: 'nochange',
tags: DO_TAG ? APP_NAME : undefined
}).then(function() {
SAVED_RUN += 1;
removeTopLine();
loadNextPage();
}).catch(function(c) {
btnSave.setDisabled(false);
setStatus('Save error', 'error');
alert('Save failed: ' + c);
});
}, effectiveDelay);
});
btnManualEdit.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
// Calculate the final injected summary
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : inputSummary.getValue();
var finalSum = base + (currentPageSummaryAppend || "");
var translatedSummary = injectVars(finalSum);
var summary = translatedSummary; // no SUMMARY_SUFFIX
// Create an invisible form targeting a new tab
var $form = $('<form>').attr({
method: 'POST',
action: mw.util.getUrl(currentTitle, { action: 'edit' }),
target: '_blank'
}).hide();
// Populate it with MediaWiki's native input names
$('<textarea>').attr('name', 'wpTextbox1').val(Editor.getValue()).appendTo($form);
$('<input>').attr('name', 'wpSummary').val(summary).appendTo($form);
if (chkMinor.isSelected()) {
$('<input>').attr('name', 'wpMinoredit').val('1').appendTo($form);
}
// Append, fire, and destroy
$form.appendTo('body').submit().remove();
});
btnWatch.on('click', function() {
var isWatched = btnWatch.getIcon() === 'unStar';
new mw.Api()[isWatched ? 'unwatch' : 'watch'](currentTitle).then(function() {
btnWatch.setIcon(isWatched ? 'star' : 'unStar');
mw.notify(isWatched ? 'Unwatched' : 'Watched');
});
});
btnAdd.on('click', function() {
if (isFetching) {
isFetching = false;
btnAdd.setDisabled(true).setLabel('Cancelling...');
return;
}
try {
var mode = srcSelect.getValue(),
q = srcInput.getValue().trim();
if (mode !== 'watchlist' && mode !== 'usercontribs' && mode !== 'pageswithprop' && !q) {
alert('Query empty');
return;
}
var nsIds = ($nsSelect.val() || []).map(v => parseInt(v));
var nsStr = nsIds.join('|');
var api = new mw.Api(),
promises = [];
if (mode === 'cat') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'categorymembers',
cmtitle: mw.Title.newFromText(q, 14) ? mw.Title.newFromText(q, 14).getPrefixedText() : 'Category:' + q,
cmnamespace: nsStr,
cmtype: (chkCatPages.isSelected() ? 'page|' : '') + (chkCatSub.isSelected() ? 'subcat|' : '') + (chkCatFile.isSelected() ? 'file' : ''),
cmlimit: 'max'
}));
else if (mode === 'linksto') {
if (chkLinkWiki.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'backlinks',
bltitle: q,
blnamespace: nsStr,
bllimit: 'max',
blfilterredir: dropLinkRedir.getValue(),
blredirect: chkLinkToRedir.isSelected()
}));
if (chkLinkTrans.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'embeddedin',
eititle: q,
einamespace: nsStr,
eilimit: 'max',
eifilterredir: dropLinkRedir.getValue()
}));
if (chkLinkImg.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'imageusage',
iutitle: q,
iunamespace: nsStr,
iulimit: 'max',
iufilterredir: dropLinkRedir.getValue()
}));
} else if (mode === 'linkson') promises.push(fetchWithContinue(api, {
action: 'query',
generator: 'links',
titles: q,
gplnamespace: nsStr,
gpllimit: 'max',
prop: 'info'
}));
else if (mode === 'prefix') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'allpages',
apprefix: q,
apnamespace: nsIds[0] || 0,
aplimit: 'max'
}));
else if (mode === 'watchlist') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'watchlistraw',
wrnamespace: nsStr,
wrlimit: 'max'
}));
else if (mode === 'search') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'search',
srsearch: q,
srnamespace: nsStr,
srlimit: 'max'
}));
else if (mode === 'usercontribs') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'usercontribs',
ucuser: srcInputUser.getValue(),
ucstart: srcInputStartDate.getValue(),
ucend: srcInputEndDate.getValue(),
ucdir: 'newer',
uclimit: 'max',
ucnamespace: nsStr,
ucprop: 'title'
}));
else if (mode === 'pageswithprop') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'pageswithprop',
pwppropname: srcDropProp.getValue(),
pwplimit: 'max'
}));
Promise.all(promises).then(function(res) {
var list = new Set();
res.forEach(titles => titles.forEach(t => list.add(t)));
var currentVal = listTextarea.getValue();
var newVal = Array.from(list).join('\n');
listTextarea.setValue(currentVal ? currentVal + '\n' + newVal : newVal);
mw.notify('Added ' + list.size + ' pages');
}).catch(e => alert('Error: ' + e));
} catch (e) {
alert("Fetch error: " + e);
}
});
btnSort.on('click', function() {
var v = listTextarea.getValue();
if (v) {
var lines = getNormalizedList(v);
lines.sort((a, b) => sortAsc ? a.localeCompare(b) : b.localeCompare(a));
listTextarea.setValue(lines.join('\n'));
sortAsc = !sortAsc;
}
});
btnDedup.on('click', function() {
var v = listTextarea.getValue();
if (v) listTextarea.setValue(getDeduplicatedList(v).join('\n'));
});
btnClear.on('click', function() {
listTextarea.setValue('');
});
btnSaveProj.on('click', function() {
try {
var currentMode = srcSelect.getValue();
if (['watchlist', 'usercontribs', 'pageswithprop'].indexOf(currentMode) === -1) queryCache[currentMode] = srcInput.getValue();
var saveExcludes = {};
for (var k in protCheckboxes) saveExcludes[k] = protCheckboxes[k].isSelected();
var data = {
version: APP_VERSION,
library: currentLibrary,
source: {
activeMode: currentMode,
namespaces: ($nsSelect.val() || []).map(v => parseInt(v)),
modes: {
cat: {
query: queryCache['cat'] || '',
options: {
pages: chkCatPages.isSelected(),
sub: chkCatSub.isSelected(),
file: chkCatFile.isSelected()
}
},
linksto: {
query: queryCache['linksto'] || '',
options: {
wiki: chkLinkWiki.isSelected(),
trans: chkLinkTrans.isSelected(),
img: chkLinkImg.isSelected(),
redir: dropLinkRedir.getValue(),
toRedir: chkLinkToRedir.isSelected()
}
},
linkson: {
query: queryCache['linkson'] || ''
},
prefix: {
query: queryCache['prefix'] || ''
},
watchlist: {
query: ''
},
search: {
query: queryCache['search'] || ''
},
usercontribs: {
options: {
user: srcInputUser.getValue(),
start: srcInputStartDate.getValue(),
end: srcInputEndDate.getValue()
}
},
pageswithprop: {
options: {
prop: srcDropProp.getValue()
}
}
}
},
settings: {
redir: redirMode.findSelectedItem().getData(),
skipLogic: radSkipExist.findSelectedItem().getData(),
skipNoChange: chkSkipNoChange.isSelected(),
minor: chkMinor.isSelected()
},
filters: {
contains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
notContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
},
categories: {
skip: inpSkipCategories.getValue(),
require: inpSkipNotCategories.getValue()
}
},
rules: rulesRegistry.map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
})),
scripts: {
pre: txtPreScript.getValue(),
post: txtPostScript.getValue()
},
processing: {
summary: inputSummary.getValue(),
list: listTextarea.getValue()
},
protection: {
mode: dropProtMode.getValue(),
excludes: saveExcludes,
target: (radTargetSet.findSelectedItem() || {
getData: () => null
}).getData(),
templateFilter: inpTemplateFilter.getValue()
}
};
var a = document.createElement('a');
a.href = URL.createObjectURL(new Blob([JSON.stringify(data, null, 1)], {
type: "application/json"
}));
a.download = "wawb_project.json";
a.click();
} catch (e) {
alert("Save error: " + e);
}
});
btnLoadProj.on('click', function() {
$fileInput.click();
});
function applyIf(val, action) {
if (val !== undefined && val !== null) action(val);
}
$fileInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
try {
var data = JSON.parse(evt.target.result);
isLoadingProject = true;
// --- 1. SOURCE SETTINGS ---
applyIf(data?.source?.namespaces, v => $nsSelect.val(v.map(String)));
if (data?.source?.modes) {
var m = data.source.modes;
// Merge into queryCache instead of wiping it
for (var key in m) {
if (m[key]?.query !== undefined) queryCache[key] = m[key].query;
}
applyIf(m?.cat?.options?.pages, v => chkCatPages.setSelected(v));
applyIf(m?.cat?.options?.sub, v => chkCatSub.setSelected(v));
applyIf(m?.cat?.options?.file, v => chkCatFile.setSelected(v));
applyIf(m?.linksto?.options?.wiki, v => chkLinkWiki.setSelected(v));
applyIf(m?.linksto?.options?.trans, v => chkLinkTrans.setSelected(v));
applyIf(m?.linksto?.options?.img, v => chkLinkImg.setSelected(v));
applyIf(m?.linksto?.options?.redir, v => dropLinkRedir.setValue(v));
applyIf(m?.linksto?.options?.toRedir, v => chkLinkToRedir.setSelected(v));
applyIf(m?.usercontribs?.options?.user, v => srcInputUser.setValue(v));
applyIf(m?.usercontribs?.options?.start, v => srcInputStartDate.setValue(v));
applyIf(m?.usercontribs?.options?.end, v => srcInputEndDate.setValue(v));
applyIf(m?.pageswithprop?.options?.prop, v => srcDropProp.setValue(v));
}
// --- 2. SETTINGS & SKIP LOGIC ---
applyIf(data?.settings?.redir, v => redirMode.selectItemByData(v));
applyIf(data?.settings?.skipLogic, v => radSkipExist.selectItemByData(v));
applyIf(data?.settings?.skipNoChange, v => chkSkipNoChange.setSelected(v));
applyIf(data?.settings?.minor, v => chkMinor.setSelected(v));
// --- 3. PROTECTION ---
applyIf(data?.protection?.mode, v => dropProtMode.setValue(v));
applyIf(data?.protection?.target, v => radTargetSet.selectItemByData(v));
applyIf(data?.protection?.templateFilter, v => inpTemplateFilter.setValue(v));
if (data?.protection?.excludes) {
for (var k in data.protection.excludes) {
if (protCheckboxes[k]) applyIf(data.protection.excludes[k], v => protCheckboxes[k].setSelected(v));
}
}
// --- 4. LIBRARY ---
applyIf(data?.library?.name, v => currentLibrary.name = v);
applyIf(data?.library?.code, v => currentLibrary.code = v);
if (data?.library?.name || data?.library?.code) updateLibUI();
// --- 5. FILTERS ---
applyIf(data?.filters?.contains?.val, v => inpSkipContains.setValue(v));
applyIf(data?.filters?.contains?.regex, v => togSkipContainsRegex.setValue(v));
applyIf(data?.filters?.notContains?.val, v => inpSkipNotContains.setValue(v));
applyIf(data?.filters?.notContains?.regex, v => togSkipNotContainsRegex.setValue(v));
applyIf(data?.filters?.categories?.skip, v => inpSkipCategories.setValue(v));
applyIf(data?.filters?.categories?.require, v => inpSkipNotCategories.setValue(v));
// --- 6. SCRIPTS & PROCESSING ---
applyIf(data?.scripts?.pre, v => txtPreScript.setValue(v));
applyIf(data?.scripts?.post, v => txtPostScript.setValue(v));
applyIf(data?.processing?.summary, v => inputSummary.setValue(v));
applyIf(data?.processing?.list, v => listTextarea.setValue(v));
// --- 7. DYNAMIC RULES ARRAY ---
if (data?.rules && Array.isArray(data.rules)) {
rulesRegistry.forEach(r => r.row.remove());
rulesRegistry = [];
$rulesList.empty();
data.rules.forEach(r => {
addRule();
var last = rulesRegistry[rulesRegistry.length - 1];
applyIf(r.find, v => last.find.setValue(v));
applyIf(r.replace, v => last.rep.setValue(v));
applyIf(r.regex, v => {
last.regex.setValue(v);
last.flags.setDisabled(!v);
});
applyIf(r.flags, v => last.flags.setValue(v));
applyIf(r.enabled, v => last.setActive(v));
applyIf(r.isFunc, v => last.setFunc(v));
});
if (rulesRegistry.length === 0) addRule();
}
// --- 8. TRIGGER UI UPDATES ---
applyIf(data?.source?.activeMode, v => {
isLoadingProject = false;
srcSelect.setValue(v);
srcSelect.emit('change', v);
isLoadingProject = true;
});
isLoadingProject = false;
setStatus('Project loaded');
} catch (err) {
alert("Load Error: " + err);
}
$fileInput.val('');
};
reader.readAsText(file);
});
if (CAN_MOVE || IS_ADMIN) {
togAdminEnable.on('change', function(val) {
if (!currentTitle) {
updateInterfaceMode();
return;
}
if (val) {
Editor.setValue(originalWikitext);
updateInterfaceMode();
renderDiff();
setStatus('Ready (Page actions)');
} else processPageContent();
});
}
if (CAN_MOVE) {
btnAdminMove.on('click', function() {
if (!currentVars['$xA']) {
mw.notify('Variable $xA not set', {
type: 'error'
});
return;
}
new mw.Api().postWithToken('csrf', {
action: 'move',
assert: 'user', //throw 'assertuserfailed' when logged-out
from: currentTitle,
to: currentVars['$xA'],
reason: inputSummary.getValue() + SUMMARY_SUFFIX,
movetalk: chkMovTalk.isSelected(),
movesubpages: chkMovSub.isSelected(),
noredirect: chkMovRedirect.isSelected()
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Move failed: ' + e));
});
}
if (IS_ADMIN) {
btnAdminDel.on('click', function() {
new mw.Api().postWithToken('csrf', {
action: 'delete',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
if (chkDelTalk.isSelected()) new mw.Api().postWithToken('csrf', {
action: 'delete',
title: mw.Title.newFromText(currentTitle).getTalkPage().getPrefixedText(),
reason: 'Talk page of deleted page'
});
removeTopLine();
loadNextPage();
}).catch(e => alert('Delete failed: ' + e));
});
btnAdminProt.on('click', function() {
var protections = [];
if (dropProtEdit.getValue()) protections.push('edit=' + dropProtEdit.getValue());
if (dropProtMove.getValue()) protections.push('move=' + dropProtMove.getValue());
new mw.Api().postWithToken('csrf', {
action: 'protect',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
protections: protections.join('|'),
expiry: inpProtExpiry.getValue() || 'infinite',
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Protect failed: ' + e));
});
}
Editor.init();
resetPanels();
});
$(window).on('beforeunload', function() {
return "You have unsaved work.";
});
}).catch(e => console.error("wAwB Loader Error:", e));
//</nowiki>
0cymriy155qwrfgkf8in9d94xaegg7h
750466
750465
2026-07-08T05:54:33Z
Ponor
47975
750466
javascript
text/javascript
/*
* wAwB – An in-browser application for automated editing of wiki pages.
* Features: customizable regex or JavaScript search-and-replace rules,
* custom JavaScript pre/post-processing functions and function libraries,
* granular protection or targeting of different parts of wikitext,
* a full-fledged CodeMirror editor, and options to move, delete, and protect pages.
* Author: [[User:Ponor]]
* Documentation: [[User:Ponor/wAwB]]
* License: GNU General Public License (GPL)
*/
//<nowiki>
mw.loader.using([
'oojs-ui-core',
'oojs-ui-widgets',
'oojs-ui-windows',
'mediawiki.api',
'mediawiki.diff.styles',
'mediawiki.util',
'mediawiki.page.gallery.styles',
'oojs-ui.styles.icons-content',
'oojs-ui.styles.icons-interactions',
'oojs-ui.styles.icons-movement',
'oojs-ui.styles.icons-moderation',
'oojs-ui.styles.icons-editing-core',
'oojs-ui.styles.icons-editing-advanced'
]).then(function() {
// =====================================================================
// 1. STATE & CONFIGURATION
// =====================================================================
var SCRIPT_TIMEOUT_MS = window.wa_timeout || 5000;
var FETCH_SAFETY_LIMIT = window.wa_fetchLimit || 10000;
var APP_NAME = "wAwB";
var DO_TAG = false;
var SUMMARY_SUFFIX = window.wa_suffix || " [[:w:en:User:Ponor/wAwB| #wAwB]]";
var APP_VERSION = "0.7";
var DOC_URL = window.wa_docUrl || "https://en.wikipedia.org/wiki/User:Ponor/wAwB";
document.title = window.wa_editIn || "Edit in wAwB";
var PERMS = {
canSave: false,
allowBot: false,
saveDelay: 0
};
var IS_ADMIN = mw.config.get('wgUserGroups').includes('sysop');
var CAN_MOVE = IS_ADMIN || mw.config.get('wgUserGroups').includes('extendedmover') || mw.config.get('wgUserGroups').includes('filemover') || mw.config.get('wgUserGroups').includes('pagemover');
var WIKI = mw.config.get('wgDBname');
var ON_NOTIFY = window.wa_onNotification || 'warn'; // warn, stop, nothing
var ON_NOTIFY_FREQ = 30 * 1000; // every 30s
var SAVED_RUN = 0;
var SAVED_SESSION = 0;
var currentPageExists = false;
var isRunning = false;
var isFetching = false;
var currentTitle = null;
var currentVars = {};
var currentLibrary = {
name: null,
code: null
};
var originalWikitext = "";
var currentPageSummaryAppend = "";
var currentPageSummaryOverride = null;
var baseRevId = 0;
var currentViewMode = 'diff';
var activeView = { page: '', mode: '' };
var scrollCache = {}; // Stores specific positions, e.g., { "PageName|diff": { top: 150, isBottom: false } }
var globalModeBottom = { diff: false, preview: false }; // Tracks the "sticky bottom" rule per mode
var autoSaveTimer = null;
var propNamesLoaded = false;
var hasNewSources = false;
var currentHeightMode = 1; // 0=25%, 1=45% (default), 2=72%
var heightValues = ['25%', '45%', '72%'];
// EXTERNAL RULES STATE
var wikiTypos = [];
var localTypos = [];
// LOADING FLAG
var isLoadingProject = false;
// NAMESPACE ALIASES
var nsIds = mw.config.get('wgNamespaceIds');
var catAliases = [],
fileAliases = [];
for (var key in nsIds) {
if (nsIds[key] === 14) catAliases.push(key.replace(/_/g, ' '));
if (nsIds[key] === 6) fileAliases.push(key.replace(/_/g, ' '));
}
catAliases.sort((a, b) => b.length - a.length);
fileAliases.sort((a, b) => b.length - a.length);
var REGEX_CAT_PFX = catAliases.map(mw.util.escapeRegExp).join('|');
var REGEX_FILE_PFX = fileAliases.map(mw.util.escapeRegExp).join('|');
// MASTER PROTECTION DEFINITIONS
var PROTECTION_DEFS = [{
id: 'nowiki',
isOn: true,
label: 'Nowiki: <nowiki>',
regex: /<nowiki>[\s\S]*?<\/nowiki>|<nowiki\s*\/>/gi
},
{
id: 'comments',
isOn: true,
label: 'Comments: <!' + '-- -->',
regex: new RegExp('<!' + '--[\\s\\S]*?--' + '>', 'g')
},
{
id: 'headers',
isOn: false,
label: 'Headers: == Title ==',
regex: /^==+[\s\S]+?==+\s*$/gm
},
{
id: 'templates',
isOn: false,
label: 'Templates: {{...}}',
open: '{{',
close: '}}',
species: null,
regex: null
},
{
id: 'tables',
isOn: false,
label: 'Tables: {|...|}',
open: '\n{|',
close: '\n|}',
regex: null
},
{
id: 'images',
isOn: false,
label: 'Images: [[File:...|...|...]]',
open: '[[',
close: ']]',
species: '(?:' + REGEX_FILE_PFX + ')\\s*:',
regex: null
},
{
id: 'refs',
isOn: true,
label: 'Refs: <ref...',
regex: /<ref[^>]*?\/>|<ref[^>]*?(?<!\/)>[\s\S]*?<\/ref>/gi
},
{
id: 'blocks',
isOn: false,
label: 'Blocks: math, gallery...',
regex: null
},
{
id: 'categories',
isOn: true,
label: 'Categories: [[Category:...]]',
regex: new RegExp('\\[\\[\\s*(' + REGEX_CAT_PFX + ')\\s*:[^\\]]+\\]\\]', 'giu')
},
{
id: 'files',
isOn: true,
label: 'File names: File:...',
regex: new RegExp('(?<=\\[\\[\\s*:?(:?' + REGEX_FILE_PFX + ')\\s*:)[^|\\]]+' + '|^\\s*(?:' + REGEX_FILE_PFX + ')\\s*:([^\\][}{|\\n]{1,150}\\.(?:svg|png|jpe?g|gif|tiff|webp|xcf|mp3|midi|ogg|webm|flac|wav|mpe?g|pdf|djv))', 'gmiu')
},
{
id: 'targets',
isOn: false,
label: 'Targets of [[...|',
regex: /(?<=\[\[:?)[^|\]]+?(?=\||\]\])/g
},
{
id: 'extlinks',
isOn: true,
label: 'External links: [...]',
regex: /(?<=\[)(https?:\/\/|ftps?:\/\/|mailto:)[^\]]+(?=\])/gi
},
{
id: 'urls',
isOn: true,
label: 'URLs: http...',
regex: /https?:\/\/[^\s<>[\]"'`()]+/gi
}
];
// =====================================================================
// 2. CSS STYLES
// =====================================================================
var styles = `
* { box-sizing: border-box; }
#wa-root { font-family: sans-serif; height: 100vh; width: 100vw; overflow: hidden; display: flex; font-size: 14px; }
#wa-left-panel { width: 400px; min-width: 400px; max-width: 400px; background: var(--background-color-base, #fff); border-right: 1px solid #c8ccd1; display: flex; flex-direction: column; z-index: 10; overflow-x: hidden; }
#wa-left-panel h3 { color: #3f6fcf; text-align: center; margin: 12px 0 0 0; }
#wa-username { color: #3f6fcf; text-align: center; margin: 2px 0; font-size: 92%; }
#wa-content-area { flex: 1; padding: 10px 10px 100px 10px; overflow-y: auto; overflow-x: hidden; }
#wa-right-panel { flex: 1; display: flex; flex-direction: column; height: 100%; background: var(--background-color-interactive, #eaecf0); overflow: hidden; }
#wa-visual-output { flex: 0 0 45%; min-height: 0; overflow-y: auto; background: var(--background-color-base, #fff); padding: 20px; border-bottom: 1px solid #c8ccd1; }
.wa-editor-header { flex: 0 0 40px; min-height: 40px; padding: 0 10px; background: var(--background-color-interactive-subtle, #f8f9fa); border-bottom: 1px solid #c8ccd1; display: flex; gap: 25px; justify-content: space-between; align-items: center; z-index: 10; }
.wa-editor-header.wa-dirty { background: var(--background-color-warning-subtle, #fdf2d5); border-bottom: 1px solid #e6a700; }
@keyframes wa-header-pulse { 0% { background-color: var(--background-color-destructive-subtle, #fee7e6); } 50% { background-color: var(--background-color-interactive-subtle, transparent); } 100% { background-color: var(--background-color-destructive-subtle, #fee7e6); } }
.wa-editor-header.wa-header-alert { border-bottom: 2px solid var(--border-color-destructive, #b32424) !important; animation: wa-header-pulse 1s 60 ease-in-out forwards !important; }
.wa-header-left { flex: 1; display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.wa-header-right { flex: 0 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--color-placeholder, #72777d); font-size: 0.9em; }
.wa-title-link { font-weight: bold; font-size: 1.1em; color: var(--color-progressive--focus, #36c) !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 40%; }
.wa-title-link:hover { text-decoration: underline; }
#wa-status-indicator { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background-color: #00af89; cursor: help; transition: background-color 0.2s; margin-right: 2px; }
#wa-status-indicator.wa-status-working { background-color: #36c; animation: wa-pulse-blue 1.5s infinite; }
#wa-status-indicator.wa-status-error { background-color: #bf3c2c; }
@keyframes wa-pulse-blue { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.wa-header-sep { border-left: 1px solid #ccc; height: 16px; flex-shrink: 0; margin: 0 2px; }
#wa-summary-preview { flex-grow: 1; color: #d00; font-style: italic; white-space: nowrap; text-overflow: ellipsis; overflow-x: auto; background: transparent; border: none; outline: none; box-shadow: none; min-width: 50px; padding: 2px 5px; scrollbar-width: none; -ms-overflow-style: none; font-size: 1em; }
#wa-summary-preview::-webkit-scrollbar { display: none; }
#wa-summary-preview:hover { background: rgba(0, 0, 0, 0.05); cursor: text; }
#wa-summary-preview:focus { background: #fff; }
.wa-info-container { margin-right: 10px; }
.wa-tools-container { display: flex; align-items: center; gap: 2px; }
.wa-resize-container { display: flex; flex-direction: column; justify-content: center; height: 100%; margin-left: 10px; padding-left: 5px; border-left: 1px solid #ccc; }
.wa-resize-btn { cursor: pointer; color: #72777d; user-select: none; width: 20px; height: 14px; display: flex; align-items: center; justify-content: center; transition: color 0.1s ease-in-out; }
.wa-resize-btn:hover { color: #36c; }
.wa-resize-btn.wa-resize-disabled { color: #ccc; cursor: default; }
#wa-proc-header { margin-top: 15px !important; border-bottom: none !important; cursor: default; }
#wa-proc-title { font-weight: bold; padding: 10px; display: block; }
#wa-proc-content { padding: 0 10px 15px 10px; }
#wa-editor-area { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--background-color-base, #fff); position: relative; overflow: hidden; }
#wa-editor-textarea { flex: 1; height: 100%; font-family: monospace; font-size: 13px; border: none; outline: none; padding: 10px; resize: none; width: 100%; }
.cm-editor { height: 100% !important; flex: 1; }
.wa-section-header { margin-top: 12px; border-bottom: 1px solid #eee; width: 100%; display: block; margin-left: 0 !important; }
#wa-content-area .wa-section-header:first-child, #wa-content-area .wa-section-header.oo-ui-buttonElement-frameless:first-child { margin-top: 0; margin-left: 0 !important; }
.wa-section-header > .oo-ui-buttonElement-button { text-align: left; padding: 10px 10px !important; margin: 0 !important; display: block; width: 100%; position: relative; border-left: 3px solid #3f6fcf !important; border-radius: 3px !important; background-color: transparent !important; }
.wa-section-header > .oo-ui-buttonElement-button:focus { outline: none !important; }
.wa-section-header .oo-ui-labelElement-label { font-weight: bold; padding-left: 0 !important; margin-left: 0 !important; color: var(--color-base, #202122); }
.wa-section-header .oo-ui-indicatorElement-indicator { position: absolute; right: 10px !important; top: 50%; margin-top: -10px; left: auto !important; width: 20px; }
.wa-foldable-content { display: none; padding: 10px 0; }
.wa-source-options { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; border-top: none; padding: 8px; margin-bottom: 10px; font-size: 0.9em; }
.wa-opt-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 5px; }
.wa-opt-label { font-weight: bold; width: 100%; margin-bottom: 5px; color: var(--color-base, #202122); }
.wa-opt-row > div { margin-top: 8px !important; margin-bottom: 8px !important; }
.wa-rule-row { background: var(--background-color-interactive-subtle, #f8f9fa); border: 1px solid #c8ccd1; padding: 8px; margin-bottom: 8px; border-radius: 4px; display: flex; align-items: stretch; transition: background-color 0.3s; }
.wa-rule-row.wa-highlight { background-color: var(--background-color-interactive, #eaecf0); border-color: #36c; }
.wa-rule-controls { display: flex; flex-direction: column; justify-content: center; gap: 0px; padding-right: 4px; border-right: 1px solid #eee; margin-right: 8px; }
.wa-rule-btn { margin: 0 !important; margin-right: 0 !important; margin-left: 0 !important; }
.wa-rule-btn > .oo-ui-buttonElement-button { margin: 0 !important; }
.wa-rule-content { flex: 1; min-width: 0; }
.wa-rule-opt-row { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
#wa-ns-selector { width: 100%; margin-bottom: 10px; font-family: sans-serif; font-size: 0.9em; border: 1px solid #a2a9b1; }
.wa-lib-dialog > .oo-ui-window-frame { width: 80vw !important; max-width: none !important; height: 80vh !important; max-height: none !important; }
.wa-lib-editorwrapper { height: 100%; border: 1px solid #c8ccd1; position: relative; boxSizing: border-box; }
.wa-page-list-raw textarea { font-family: monospace; font-size: 0.9em; white-space: pre; overflow-x: auto; }
.wa-list-running textarea { background-color: var(--background-color-neutral-subtle, #f8f8f8) !important; color: var(--color-base, #202122) !important; }
.wa-grid-container { display: flex; gap: 6px; margin-bottom: 10px; }
.wa-grid-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wa-grid-col .oo-ui-buttonWidget { width: 100%; }
.wa-grid-col .oo-ui-buttonWidget .oo-ui-buttonElement-button { width: 100%; text-align: center; justify-content: center; }
.wa-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 4px; border-bottom: 1px solid #eee; padding-bottom: 4px; margin-bottom: 4px; }
.wa-list-counter { margin-right: auto; font-weight: bold; color: var(--color-subtle, #54595d); font-size: 0.9em; padding-left: 5px; }
.wa-project-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px; margin: 8px 0; justify-content: center; }
.wa-project-bar .oo-ui-buttonElement-button { padding-left: 36px !important; padding-right: 12px !important; font-size: 0.9em; }
.wa-project-bar .oo-ui-iconElement-icon { left: 10px !important; }
.wa-settings-header { font-weight: bold; color: var(--color-subtle, #54595d); margin-bottom: 8px; display: block; text-transform: uppercase; font-size: 0.9em; }
.wa-setting-row { display: flex; align-items: center; margin-bottom: 6px; }
.wa-bot-row { background: var(--background-color-success-subtle, #dff2eb); border: 1px solid #a5d6a7; padding: 8px; margin-bottom: 10px; border-radius: 4px; display: flex; align-items: center; justify-content: flex-start; gap: 15px; }
table.diff { width: 100%; font-family: "Adwaita Mono", "Courier New", monospace }
table.diff td { vertical-align: top; }
table.diff tr:hover td { background-color: var(--background-color-progressive-subtle--hover, #d9e2ff); cursor: pointer; }
@keyframes wa-pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); border-color: #ff0000; } 70% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); border-color: #ff0000; } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); border-color: #ff0000; } }
.wa-summary-warning input { animation: wa-pulse-red 1s infinite; border-color: #ff0000 !important; }
`;
$('<style>').text(styles).appendTo('head');
$('body').empty();
// =====================================================================
// 3. HELPER FUNCTIONS
// =====================================================================
function checkPermissions() {
return new Promise(function(resolve) {
var api = new mw.Api();
var projectNs = mw.config.get('wgFormattedNamespaces')[4];
var checkTitles = {
'permissions': projectNs + ':AutoWikiBrowser/CheckPageJSON',
'tag': 'MediaWiki:Tag-wAwB'
};
api.get({
action: 'query',
prop: 'revisions',
titles: Object.values(checkTitles).join('|'),
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(data) {
var pagePerms = data.query.pages.find(p => p.title === checkTitles['permissions']);
var pageTag = data.query.pages.find(p => p.title === checkTitles['tag']);
DO_TAG = pageTag.missing === undefined;
var userName = mw.config.get('wgUserName');
var userGroups = mw.config.get('wgUserGroups');
var isSysop = userGroups.includes('sysop');
if (!pagePerms.missing) {
try {
var content = pagePerms.revisions[0].slots.main.content;
var json = JSON.parse(content);
var inEnabledUsers = json.enabledusers && json.enabledusers.includes(userName);
var inEnabledBots = json.enabledbots && json.enabledbots.includes(userName);
var isBotGroup = userGroups.includes('bot');
var canSave = inEnabledUsers || inEnabledBots || isSysop;
var allowBot = inEnabledBots && isBotGroup;
resolve({
canSave: canSave,
allowBot: allowBot,
saveDelay: 0
});
} catch (e) {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
} else {
var editCount = mw.config.get('wgUserEditCount');
if (editCount > 500) resolve({
canSave: true,
allowBot: false,
saveDelay: 20000
});
else resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
}
}).catch(function() {
resolve({
canSave: false,
allowBot: false,
saveDelay: 0
});
});
});
}
function getUserCode(widget, globalName) {
var val = widget.getValue().trim();
if (!val || val.startsWith('// Enter')) {
if (window[globalName] && typeof window[globalName] === 'function') {
var s = window[globalName].toString();
return s.substring(s.indexOf('{') + 1, s.lastIndexOf('}'));
}
return "";
}
if (val.startsWith('function')) {
return val.substring(val.indexOf('{') + 1, val.lastIndexOf('}'));
}
return val;
}
function normalizeLine(line) {
if (!line) return null;
// Pass through comments/STOP commands (trimmed)
if (line.trim().startsWith('####')) return line.trim();
// Handle Title|Variables
var parts = line.split('|');
var title = parts[0].trim();
if (!title) return null; // Skip if title is empty
// Reassemble: Clean Title + Original Variables (preserving whitespace)
var rest = parts.length > 1 ? parts.slice(1).join('|') : null;
return title + (rest !== null ? '|' + rest : '');
}
function getNormalizedList(text) {
if (!text) return [];
return text.split('\n')
.map(normalizeLine)
.filter(function(l) {
return l !== null;
});
}
function getDeduplicatedList(text) {
if (!text) return [];
var seen = new Set();
var out = [];
var lines = text.split('\n');
for (var i = 0; i < lines.length; i++) {
var clean = normalizeLine(lines[i]);
if (clean && !seen.has(clean)) {
seen.add(clean);
out.push(clean);
}
}
return out;
}
function parseTypoContent(content) {
if (!content) return [];
try {
var $wrapper = $('<body>').html(content);
var rules = [];
$wrapper.find('Typo:not([disabled])').each(function() {
var $t = $(this);
var find = $t.attr('find');
var replace = $t.attr('replace');
if (find && replace !== undefined) {
rules.push({
find: find,
replace: replace,
regex: true,
flags: 'gmu',
enabled: true,
isFunc: false
});
}
});
return rules;
} catch (e) {
return [];
}
}
function updateSummaryPreview(baseText) {
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : (baseText || "");
var finalSum = base + (currentPageSummaryAppend || "");
var previewText = finalSum ? injectVars(finalSum) : '';
$('#wa-summary-preview').val(previewText);
}
function injectVars(text) {
if (!text) return "";
return text.replace(/\$x([A-Z]|x)/g, function(match) {
return currentVars[match] || match; // Swap it, or leave it alone if undefined
});
}
function captureViewScroll() {
var $container = $('#wa-visual-output');
if (!$container.length || !activeView.mode) return;
var scrollTop = $container.scrollTop();
var innerHeight = $container.innerHeight();
var scrollHeight = $container[0].scrollHeight;
var hasScrollbar = scrollHeight > (innerHeight + 4);
var isBottom = false;
if (hasScrollbar) {
isBottom = (scrollTop + innerHeight >= scrollHeight - 10);
globalModeBottom[activeView.mode] = isBottom;
}
// Save the exact position for this specific page AND mode combo
var cacheKey = activeView.page + '|' + activeView.mode;
scrollCache[cacheKey] = {
top: scrollTop,
isBottom: isBottom
};
console.log(scrollHeight, innerHeight, activeView.mode, isBottom, scrollTop);
}
function restoreViewScroll(targetPage, targetMode) {
var $container = $('#wa-visual-output');
if (!$container.length) return;
var cacheKey = targetPage + '|' + targetMode;
var savedState = scrollCache[cacheKey];
if (savedState) {
console.log(savedState)
// Rule A: We have been to this exact page/mode. Restore exactly.
if (savedState.isBottom) {
$container.scrollTop($container[0].scrollHeight);
} else {
$container.scrollTop(savedState.top);
}
} else if (globalModeBottom[targetMode]) {
// Rule B: It is a NEW page. If the sticky bottom is
// globally active for THIS mode, use it.
$container.scrollTop($container[0].scrollHeight);
} else {
// Rule C: New page, no sticky bottom active. Reset to top.
$container.scrollTop(0);
}
activeView.page = targetPage;
activeView.mode = targetMode;
}
function resetViewScroll() {
activeView = { page: '', mode: '' };
scrollCache = {};
globalModeBottom = { diff: false, preview: false };
}
// =====================================================================
// 4. UI CONSTRUCTION
// =====================================================================
checkPermissions().then(function(pState) {
PERMS = pState;
var $main = $('<div>').attr('id', 'wa-root').appendTo('body');
var $left = $('<div>').attr('id', 'wa-left-panel').appendTo($main);
$left.append($('<h3>').append($('<a>').attr('href', DOC_URL).attr('target', '_blank').text(APP_NAME).css({
'text-decoration': 'none',
'color': 'inherit'
})));
$left.append($('<div>').attr('id', 'wa-username').append($('<a>').attr('href', mw.util.getUrl('Special:Contributions/' + mw.config.get('wgUserName'))).attr('target', '_blank').text('User: ' + mw.config.get('wgUserName')).css({
'text-decoration': 'none',
'color': 'inherit'
})));
var btnSaveProj = new OO.ui.ButtonWidget({
icon: 'download',
label: 'Save project',
framed: false,
flags: 'progressive'
});
var btnLoadProj = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load project',
framed: false
});
var $projBar = $('<div>').addClass('wa-project-bar').append(btnSaveProj.$element, btnLoadProj.$element);
$left.append($projBar);
var $fileInput = $('<input type="file" accept=".json">').hide().appendTo('body');
var $content = $('<div>').attr('id', 'wa-content-area').appendTo($left);
var $right = $('<div>').attr('id', 'wa-right-panel').appendTo($main);
var $editorHeader = $('<div>').addClass('wa-editor-header').appendTo($right);
var $headerLeft = $('<div>').addClass('wa-header-left').appendTo($editorHeader);
var $statusIndicator = $('<span>').attr('id', 'wa-status-indicator').attr('title', 'Ready').appendTo($headerLeft);
var $titleLink = $('<a>').addClass('wa-title-link').text('Page content').attr('target', '_blank').appendTo($headerLeft);
$('<span>').addClass('wa-header-sep').appendTo($headerLeft);
var $summaryPreview = $('<input type="text">').attr('id', 'wa-summary-preview').attr('autocomplete', 'off').appendTo($headerLeft);
var $headerRight = $('<div>').addClass('wa-header-right').appendTo($editorHeader);
var $infoContainer = $('<span>').addClass('wa-info-container').appendTo($headerRight);
var $toolsContainer = $('<div>').addClass('wa-tools-container').appendTo($headerRight);
var $resizeContainer = $('<div>').addClass('wa-resize-container').appendTo($headerRight);
var $adminTools = $('<div>').addClass('wa-admin-tools').hide().appendTo($toolsContainer);
// Wide chevron SVGs
var svgUp = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 10 L12 2 L22 10" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var svgDown = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 24 12"><path d="M2 2 L12 10 L22 2" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
var $btnSizeUp = $('<div>').addClass('wa-resize-btn').html(svgUp).attr('title', 'Decrease view size');
var $btnSizeDown = $('<div>').addClass('wa-resize-btn').html(svgDown).attr('title', 'Increase view size');
$resizeContainer.append($btnSizeUp, $btnSizeDown);
function setPanelHeight(modeIndex) {
currentHeightMode = modeIndex;
if (currentHeightMode < 0) currentHeightMode = 0;
if (currentHeightMode > 2) currentHeightMode = 2;
$('#wa-visual-output').css('flex-basis', heightValues[currentHeightMode]);
$btnSizeUp.toggleClass('wa-resize-disabled', currentHeightMode === 0);
$btnSizeDown.toggleClass('wa-resize-disabled', currentHeightMode === 2);
}
$btnSizeUp.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode - 1);
});
$btnSizeDown.on('click', function() {
if (!$(this).hasClass('wa-resize-disabled')) setPanelHeight(currentHeightMode + 1);
});
setPanelHeight(1);
if (CAN_MOVE) {
var btnAdminMove = new OO.ui.ButtonWidget({
icon: 'move',
title: 'Move page to $xA',
disabled: true,
framed: false
});
$adminTools.append(btnAdminMove.$element).show();
}
if (IS_ADMIN) {
var btnAdminDel = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Delete page',
disabled: true,
framed: false
});
var btnAdminProt = new OO.ui.ButtonWidget({
icon: 'lock',
title: 'Protect page',
disabled: true,
framed: false
});
$adminTools.append(btnAdminDel.$element, btnAdminProt.$element).show();
}
var btnManualEdit = new OO.ui.ButtonWidget({
icon: 'edit',
title: 'Open in manual editor',
framed: false,
disabled: true
});
var btnWatch = new OO.ui.ButtonWidget({
icon: 'star',
title: 'Watch this page',
framed: false,
disabled: true,
accessKey: 'w'
});
$toolsContainer.append(btnManualEdit.$element, btnWatch.$element);
var $visualOut = $('<div>').attr('id', 'wa-visual-output').html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready to start...</div>').prependTo($right);
var $editorArea = $('<div>').attr('id', 'wa-editor-area').appendTo($right);
var $textArea = $('<textarea>').attr('id', 'wa-editor-textarea').attr('placeholder', 'Page text will appear here...').appendTo($editorArea);
function setStatus(msg, type) {
if (!msg) msg = "Ready";
$statusIndicator.attr('title', msg).removeClass('wa-status-error wa-status-working');
if (type === 'error') $statusIndicator.addClass('wa-status-error');
if (type === 'working') $statusIndicator.addClass('wa-status-working');
}
// EDITOR OBJECT
var Editor = {
mode: 'textarea',
cmInstance: null,
init: function() {
var self = this;
mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.mode.mediawiki']).then(function(require) {
try {
self.cmInstance = new(require('ext.CodeMirror'))($textArea[0], (require('ext.CodeMirror.mode.mediawiki')).mediawiki());
self.cmInstance.initialize();
self.mode = 'codemirror';
} catch (e) {
console.error("CM Error", e);
}
}).catch(function(err) {
console.error("CM Load Error:", err);
});
$textArea.on('input', updateDirtyState);
},
getValue: function() {
return (this.mode === 'codemirror' && this.cmInstance) ? this.cmInstance.view.state.doc.toString() : $textArea.val();
},
setValue: function(text) {
$textArea.val(text);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.dispatch({
changes: {
from: 0,
to: this.cmInstance.view.state.doc.length,
insert: text
}
});
} else {
$textArea[0].dispatchEvent(new Event('input'));
}
},
setDisabled: function(d) {
$textArea.prop('disabled', d);
if (this.mode === 'codemirror' && this.cmInstance) {
this.cmInstance.view.contentDOM.contentEditable = !d;
$($textArea).parent().find('.cm-editor').css('opacity', d ? 0.5 : 1);
}
},
scrollToLine: function(n) {
if (isNaN(n)) return;
if (this.mode === 'codemirror' && this.cmInstance) {
var v = this.cmInstance.view;
var l = v.state.doc.line(n);
v.dispatch({
effects: v.constructor.scrollIntoView(l.from, {
y: 'center'
}),
selection: {
anchor: l.from
}
});
v.focus();
}
}
};
var WorkerEngine = {
activeWorker: null,
workerURL: null,
currentLibCode: null,
timeoutTimer: null,
initWorker: function(libCode) {
this.destroy(); // Clean up existing if any
this.currentLibCode = libCode || "";
var scriptContent = this.currentLibCode + "\n\n" + `
self.onmessage = async function(e) {
try {
var data = e.data;
var inputs = data.texts || [data.text];
var vars = data.vars;
var outputs = [];
// Helper to construct async functions dynamically
var AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
function inject(str) {
if (!str) return "";
return str.replace(/\\$x([A-Z]|x)/g, function(m) { return vars[m] || ""; });
}
// Returns a Promise and handles 'await' inside user code
async function execUserFunc(code, currentText, currentVars, sharedObj) {
if (!code || code.trim() === "") return currentText;
try {
var func = new AsyncFunction('text', 'vars', 'shared', code);
var res = await func(currentText, currentVars, sharedObj);
if (res && typeof res === 'object' && res.skip) {
return { _skipSignal: true, reason: res.reason || 'Script-requested skip' };
}
return (res !== undefined) ? res : currentText;
} catch (err) {
throw err; // or: return currentText
}
}
var shared = {}; // Shared context for this page
for (var i = 0; i < inputs.length; i++) {
var text = inputs[i];
// 1. Pre-Process
var preRes;
if (data.preCode && data.preCode.trim() !== "") {
preRes = await execUserFunc(data.preCode, text, vars, shared);
} else if (typeof wAwB_Pre === 'function') {
try {
preRes = await wAwB_Pre(text, vars, shared);
if (preRes && typeof preRes === 'object' && preRes.skip) {
preRes = { _skipSignal: true, reason: preRes.reason || 'Script-requested skip' };
}
} catch (err) { preRes = text; }
} else {
preRes = text;
}
if (preRes && preRes._skipSignal) {
self.postMessage({ skipped: true, reason: preRes.reason });
return;
}
text = (preRes !== undefined) ? preRes : text;
// 2. Rules Processing
if (data.rules && data.rules.length > 0) {
data.rules.forEach(function(rule) {
var findStr = inject(rule.find);
if (!findStr) return;
if (rule.isFunc) {
try {
var userFunc = new Function('match', 'groups', 'vars', 'shared', rule.replace);
text = text.replace(new RegExp(findStr, (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '')), function(...args) {
var match = args[0];
var groups = args.slice(1, -2);
try {
var res = userFunc(match, groups, vars, shared);
return res !== undefined ? res : match;
} catch (err) { return match; }
});
} catch (e) {}
} else {
var repStr = inject(rule.replace).replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
if (rule.regex) {
try {
var flags = (rule.flags || 'gmu').replace(/[^gimsuvy]/g, '');
text = text.replace(new RegExp(findStr, flags), repStr);
} catch (e) {}
} else {
var finalFind = findStr.replace(/\\\\n/g, "\\n").replace(/\\\\t/g, "\\t").replace(/\\\\r/g, "\\r");
text = text.split(finalFind).join(repStr);
}
}
});
}
// 3. Post-Process
var postRes;
if (data.postCode && data.postCode.trim() !== "") {
postRes = await execUserFunc(data.postCode, text, vars, shared);
} else if (typeof wAwB_Post === 'function') {
try {
postRes = await wAwB_Post(text, vars, shared);
if (postRes && typeof postRes === 'object' && postRes.skip) {
postRes = { _skipSignal: true, reason: postRes.reason || 'Script-requested skip' };
}
} catch (err) { postRes = text; }
} else {
postRes = text;
}
if (postRes && postRes._skipSignal) {
self.postMessage({ skipped: true, reason: postRes.reason });
return;
}
text = (postRes !== undefined) ? postRes : text;
outputs.push(text);
}
self.postMessage({ success: true, texts: outputs, summaryAppend: shared.summaryAppend, summaryOverride: shared.summaryOverride });
} catch (err) { self.postMessage({ success: false, error: err.toString() }); }
};
`;
var blob = new Blob([scriptContent], {
type: 'application/javascript'
});
this.workerURL = URL.createObjectURL(blob);
this.activeWorker = new Worker(this.workerURL);
},
run: function(payload) {
var self = this;
return new Promise(function(resolve, reject) {
// Re-init if no worker exists, or if the user changed the library code
if (!self.activeWorker || self.currentLibCode !== (payload.libraryCode || "")) {
self.initWorker(payload.libraryCode);
}
if (self.timeoutTimer) clearTimeout(self.timeoutTimer);
self.timeoutTimer = setTimeout(function() {
self.destroy(); // Assassinate the stuck worker
reject("Script timed out (" + SCRIPT_TIMEOUT_MS + "ms).");
}, SCRIPT_TIMEOUT_MS);
self.activeWorker.onmessage = function(e) {
clearTimeout(self.timeoutTimer);
if (e.data.skipped) resolve({
skipped: true,
reason: e.data.reason
});
else if (e.data.success) resolve({
success: true,
texts: e.data.texts,
summaryAppend: e.data.summaryAppend,
summaryOverride: e.data.summaryOverride
});
else reject(e.data.error);
};
self.activeWorker.postMessage(payload);
});
},
destroy: function() {
if (this.activeWorker) {
this.activeWorker.terminate();
this.activeWorker = null;
}
if (this.workerURL) {
URL.revokeObjectURL(this.workerURL);
this.workerURL = null;
}
if (this.timeoutTimer) {
clearTimeout(this.timeoutTimer);
this.timeoutTimer = null;
}
}
};
var PageProtector = {
store: [],
getKey: function() {
var id = this.store.length.toString();
var p = "";
for (var i = 0; i < id.length; i++) {
p += String.fromCharCode(0xE010 + parseInt(id[i]));
}
return '\uE000' + p + '\uE001';
},
protect: function(text, mode, config, templateSpecies = null) {
this.store = [];
var self = this;
var safeRep = function(t, r) {
return t.replace(r, function(m) {
if (!m) return m;
var key = self.getKey();
self.store.push(m);
return key;
});
};
var shouldProcess = function(id) {
if (mode === 'target') return config === id;
return config[id] === true;
};
var matchedBrackets = function(text, op, cl, species = '') {
var newText = "",
depth = 0,
start = 0,
cursor = 0;
var speciesRegex = species ? new RegExp(species, 'iu') : null;
for (var i = 0; i < text.length; i++) {
if (text[i] === op[0] && text.slice(i, i + op.length) === op) {
if (depth === 0) start = i;
depth++;
i += op.length - 1;
} else if (text[i] === cl[0] && text.slice(i, i + cl.length) === cl) {
if (depth > 0) {
depth--;
if (depth === 0) {
var chunk = text.substring(start, i + cl.length);
if (!speciesRegex || speciesRegex.test(chunk)) {
var key = self.getKey();
self.store.push(chunk);
newText += text.substring(cursor, start) + key;
} else {
newText += text.substring(cursor, i + cl.length);
}
cursor = i + cl.length;
}
i += cl.length - 1;
}
}
}
newText += text.substring(cursor);
return newText;
};
PROTECTION_DEFS.forEach(function(def) {
if (shouldProcess(def.id)) {
if (def.id === 'blocks') {
['math', 'pre', 'source', 'syntaxhighlight', 'code', 'gallery'].forEach(t => text = safeRep(text, new RegExp('<' + t + '[^>]*?>[\\s\\S]*?<\\/' + t + '>|<' + t + '[^>]*?/>', 'gi')));
} else if (['templates', 'tables', 'images'].includes(def.id)) {
var activeSpecies = (def.id === 'templates') ? templateSpecies : def.species;
text = matchedBrackets(text, def.open, def.close, activeSpecies || '');
} else if (def.regex) {
text = safeRep(text, def.regex);
}
}
});
return text;
},
restore: function(text) {
var self = this;
var loop = 100;
while (/(\uE000[\uE010-\uE019]+\uE001)/.test(text) && loop > 0) {
text = text.replace(/\uE000([\uE010-\uE019]+)\uE001/g, function(m, d) {
var id = "";
for (var i = 0; i < d.length; i++) id += (d.charCodeAt(i) - 0xE010).toString();
return self.store[parseInt(id, 10)] || m;
});
loop--;
}
return text;
}
};
var accordionRegistry = [];
function addSection(title, $inner) {
var btn = new OO.ui.ButtonWidget({
label: title,
indicator: 'down',
framed: false,
classes: ['wa-section-header']
});
var box = $('<div>').addClass('wa-foldable-content').append($inner);
var sectionObj = {
btn: btn,
box: box,
label: title
};
accordionRegistry.push(sectionObj);
btn.on('click', function() {
var isOpening = !box.is(':visible');
if (isOpening) {
accordionRegistry.forEach(function(sec) {
if (sec !== sectionObj) {
sec.box.hide();
sec.btn.setIndicator('down');
}
});
}
box.toggle();
btn.setIndicator(box.is(':visible') ? 'up' : 'down');
});
$content.append(btn.$element, box);
return sectionObj;
}
// WIDGETS
var srcSelect = new OO.ui.DropdownInputWidget({
options: [{
data: 'cat',
label: 'Category'
}, {
data: 'linksto',
label: 'Pages linking to...'
}, {
data: 'linkson',
label: 'Links on page...'
}, {
data: 'prefix',
label: 'Pages with prefix...'
}, {
data: 'watchlist',
label: 'Watchlist'
}, {
data: 'search',
label: 'Wiki search'
}, {
data: 'usercontribs',
label: 'User contributions'
}, {
data: 'pageswithprop',
label: 'Pages with property'
}]
});
var srcInput = new OO.ui.TextInputWidget({
placeholder: 'Category...'
});
var now = new Date();
var today = now.toISOString().split('T')[0];
var srcInputUser = new OO.ui.TextInputWidget({
placeholder: 'Username'
});
var srcInputStartDate = new OO.ui.TextInputWidget({
value: today + 'T00:00:00',
placeholder: 'ISO start date'
});
var srcInputEndDate = new OO.ui.TextInputWidget({
value: today + 'T23:59:59',
placeholder: 'ISO end date'
});
var srcDropProp = new OO.ui.DropdownInputWidget({
options: []
});
var $optContainer = $('<div>').addClass('wa-source-options').hide();
var $optCat = $('<div>').hide();
var $optUser = $('<div>').hide();
var $optProp = $('<div>').hide();
var chkCatPages = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkCatSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkCatFile = new OO.ui.CheckboxInputWidget({
selected: false
});
$optCat.append($('<div>').addClass('wa-opt-label').text('Include:'), new OO.ui.FieldLayout(chkCatPages, {
label: 'Pages',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatSub, {
label: 'Subcats',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkCatFile, {
label: 'Files',
align: 'inline'
}).$element);
$optUser.append(new OO.ui.FieldLayout(srcInputUser, {
label: 'User',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputStartDate, {
label: 'Start (Older)',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInputEndDate, {
label: 'End (Newer)',
align: 'top'
}).$element);
$optProp.append(new OO.ui.FieldLayout(srcDropProp, {
label: 'Property',
align: 'top'
}).$element);
var $optLinks = $('<div>').hide();
var chkLinkWiki = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkLinkTrans = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkLinkImg = new OO.ui.CheckboxInputWidget({
selected: false
});
var dropLinkRedir = new OO.ui.DropdownInputWidget({
options: [{
data: 'nonredirects',
label: 'No redirects'
}, {
data: 'all',
label: 'Both'
}, {
data: 'redirects',
label: 'Redirects only'
}]
});
var chkLinkToRedir = new OO.ui.CheckboxInputWidget({
selected: false
});
$optLinks.append($('<div>').addClass('wa-opt-label').text('What to include:'), $('<div>').addClass('wa-opt-row').append(new OO.ui.FieldLayout(chkLinkWiki, {
label: 'Wikilinks',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkTrans, {
label: 'Transclusions',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkLinkImg, {
label: 'File usage',
align: 'inline'
}).$element), $('<div>').addClass('wa-opt-label').text('Redirects:'), dropLinkRedir.$element, new OO.ui.FieldLayout(chkLinkToRedir, {
label: 'Include links to redirects',
align: 'inline'
}).$element);
$optContainer.append($optCat, $optLinks, $optUser, $optProp);
var queryCache = {};
var lastMode = 'cat';
srcSelect.on('change', function(newMode) {
if (!isLoadingProject) {
if (lastMode !== 'watchlist' && lastMode !== 'usercontribs' && lastMode !== 'pageswithprop') {
queryCache[lastMode] = srcInput.getValue();
}
}
$optContainer.hide();
$optCat.hide();
$optLinks.hide();
$optUser.hide();
$optProp.hide();
srcInput.setDisabled(false).$element.show();
if (newMode === 'cat') {
$optContainer.show();
$optCat.show();
} else if (newMode === 'linksto') {
$optContainer.show();
$optLinks.show();
} else if (newMode === 'usercontribs') {
$optContainer.show();
$optUser.show();
srcInput.setDisabled(true).$element.hide();
} else if (newMode === 'pageswithprop') {
$optContainer.show();
$optProp.show();
srcInput.setDisabled(true).$element.hide();
if (!propNamesLoaded) {
new mw.Api().get({
action: 'query',
list: 'pagepropnames',
ppnlimit: 'max'
}).then(function(d) {
if (d.query && d.query.pagepropnames) {
srcDropProp.setOptions(d.query.pagepropnames.map(p => ({
data: p.propname,
label: p.propname
})));
propNamesLoaded = true;
}
});
}
}
if (newMode === 'watchlist') {
srcInput.setValue('');
srcInput.setDisabled(true);
srcInput.$input.attr('placeholder', '(No query needed)');
} else if (newMode !== 'usercontribs' && newMode !== 'pageswithprop') {
srcInput.setValue(queryCache[newMode] || '');
var ph = 'Query...';
if (newMode === 'cat') ph = 'Category name';
if (newMode === 'search') ph = 'Search query...';
if (newMode === 'prefix') ph = 'Page prefix...';
if (newMode === 'linksto') ph = 'Pages linking to this title...';
if (newMode === 'linkson') ph = 'Get links from this page...';
srcInput.$input.attr('placeholder', ph);
}
lastMode = newMode;
});
srcSelect.emit('change', srcSelect.getValue());
var $nsSelect = $('<select>').attr('id', 'wa-ns-selector').attr('multiple', 'multiple').attr('size', '8');
var nsMap = mw.config.get('wgFormattedNamespaces');
for (var id in nsMap) {
if (parseInt(id) >= 0) $nsSelect.append($('<option>').val(id).text(id + ': ' + (nsMap[id] || '(Main)')));
}
$nsSelect.val(['0']);
var btnAdd = new OO.ui.ButtonWidget({
label: 'Add to list',
icon: 'add',
flags: ['primary', 'progressive']
});
var $btnRow = $('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-top': '10px'
});
var $fetchStatus = $('<span>').css({
'margin-right': '10px',
'color': '#888',
'font-size': '0.9em',
'align-self': 'center'
}).hide();
$btnRow.append($fetchStatus, btnAdd.$element);
addSection('Source', $('<div>').append(new OO.ui.FieldLayout(srcSelect, {
label: 'Mode',
align: 'top'
}).$element, new OO.ui.FieldLayout(srcInput, {
label: 'Query',
align: 'top'
}).$element, $optContainer, $('<div>').text('Namespaces:').css({
'font-weight': 'bold',
'margin-top': '5px'
}), $nsSelect, $btnRow));
var redirMode = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'edit',
label: 'Edit the redirect page (Default)'
}), new OO.ui.RadioOptionWidget({
data: 'follow',
label: 'Follow redirect (Edit target)'
}), new OO.ui.RadioOptionWidget({
data: 'skip',
label: 'Skip redirects'
})]
});
redirMode.selectItemByData('edit');
var radSkipExist = new OO.ui.RadioSelectWidget({
items: [new OO.ui.RadioOptionWidget({
data: 'none',
label: 'Process all'
}), new OO.ui.RadioOptionWidget({
data: 'missing',
label: 'Skip if page does not exist'
}), new OO.ui.RadioOptionWidget({
data: 'exists',
label: 'Skip if page exists'
})]
});
radSkipExist.selectItemByData('none');
var chkSkipNoChange = new OO.ui.CheckboxInputWidget({
selected: false
});
var inpSkipContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if FOUND'
});
var togSkipContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipNotContains = new OO.ui.TextInputWidget({
placeholder: 'Text/Regex for Skip if MISSING'
});
var togSkipNotContainsRegex = new OO.ui.ToggleSwitchWidget({
value: false,
title: 'Use regex'
});
var inpSkipCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if in: Category1|Category2'
});
var inpSkipNotCategories = new OO.ui.TextInputWidget({
placeholder: 'Skip if NOT in: Category1|Category2'
});
var $settingsPanel = $('<div>')
.append($('<span>').addClass('wa-settings-header').text('Redirects'))
.append(redirMode.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Skip logic'))
.append(new OO.ui.FieldLayout(chkSkipNoChange, {
label: 'Skip if no changes made',
align: 'inline'
}).$element.css('margin-bottom', '8px'))
.append(radSkipExist.$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Content filters'))
.append($('<div>').addClass('wa-setting-row').append(inpSkipContains.$element.css('flex', 1), togSkipContainsRegex.$element.css('margin-left', '5px')))
.append($('<div>').addClass('wa-setting-row').append(inpSkipNotContains.$element.css('flex', 1), togSkipNotContainsRegex.$element.css('margin-left', '5px')))
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($('<span>').addClass('wa-settings-header').text('Category filters'))
.append(new OO.ui.FieldLayout(inpSkipCategories, {
label: 'Blacklist',
align: 'top'
}).$element)
.append(new OO.ui.FieldLayout(inpSkipNotCategories, {
label: 'Whitelist',
align: 'top'
}).$element);
addSection('Skip', $settingsPanel);
var dropProtMode = new OO.ui.DropdownInputWidget({
options: [{
data: 'protect',
label: 'Protect (Exclude)'
}, {
data: 'target',
label: 'Target (Edit Matches Only)'
}]
});
var inpTemplateFilter = new OO.ui.TextInputWidget({
placeholder: 'Regex: infobox rail line|railway'
});
var $templateFilterLayout = new OO.ui.FieldLayout(inpTemplateFilter, {
label: 'Template filter',
align: 'top'
});
var $protList = $('<div>');
var protCheckboxes = {};
PROTECTION_DEFS.forEach(function(def) {
var chk = new OO.ui.CheckboxInputWidget({
selected: def.isOn
});
protCheckboxes[def.id] = chk;
$protList.append(new OO.ui.FieldLayout(chk, {
label: def.label,
align: 'inline'
}).$element);
});
var targetRadioItems = PROTECTION_DEFS.map(function(def) {
return new OO.ui.RadioOptionWidget({
data: def.id,
label: def.label
});
});
var radTargetSet = new OO.ui.RadioSelectWidget({
items: targetRadioItems
});
var $targetList = $('<div>').hide().append(radTargetSet.$element);
dropProtMode.on('change', function(mode) {
if (mode === 'protect') {
$protList.show();
$targetList.hide();
} else {
$protList.hide();
$targetList.show();
}
});
addSection('Protection', $('<div>').addClass('wa-source-options')
.append(new OO.ui.FieldLayout(dropProtMode, {
label: 'Mode',
align: 'top'
}).$element)
.append($('<hr>').css('border-top', '1px solid #eee'))
.append($protList).append($targetList)
.append($('<div style="margin-top:10px;">').append($templateFilterLayout.$element))
);
var $rulesList = $('<div>');
var btnAddRule = new OO.ui.ButtonWidget({
label: 'Add rule',
icon: 'add'
});
var rulesRegistry = [];
addSection('Rules', $('<div>').append($rulesList, btnAddRule.$element));
var togWikiTypos = new OO.ui.ToggleSwitchWidget({
value: false
});
var lblWikiStatus = $('<div>').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var btnLoadLocal = new OO.ui.ButtonWidget({
icon: 'upload',
label: 'Load file',
framed: false
});
var btnClearLocal = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear local',
framed: false,
flags: 'destructive',
disabled: true
});
var lblLocalStatus = $('<div>').text('No local rules').css({
'font-size': '0.9em',
'color': '#888',
'margin-top': '2px'
});
var $typoInput = $('<input type="file">').hide().appendTo('body');
var $extRulesPanel = $('<div>').addClass('wa-source-options');
$extRulesPanel.append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'space-between'
}).append($('<span>').text('Project:AutoWikiBrowser/Typos').css('font-weight', 'bold'), togWikiTypos.$element),
$('<div>').css('margin-bottom', '10px').append(lblWikiStatus),
$('<hr>').css('border-top', '1px solid #eee'),
$('<div>').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Local rules (session only)').css({
'font-weight': 'bold'
}), $('<div>').css('flex', '1'), btnLoadLocal.$element, btnClearLocal.$element), lblLocalStatus)
);
addSection('External rules', $extRulesPanel);
var txtPreScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var txtPostScript = new OO.ui.MultilineTextInputWidget({
rows: 6,
value: '',
placeholder: '// Enter JavaScript function body here.\n// Available variables: text, vars, shared\nreturn text;'
});
var btnLoadLib = new OO.ui.ButtonWidget({
icon: 'upload',
title: 'Load library (.js)',
framed: false
});
var btnRemoveLib = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Remove library',
framed: false,
flags: 'destructive'
});
var txtLibStatus = new OO.ui.TextInputWidget({
value: '(No library loaded)',
readOnly: true
});
var $libInput = $('<input type="file" accept=".js">').hide().appendTo('body');
var btnEditLib = new OO.ui.ButtonWidget({
icon: 'edit',
label: 'Edit project library',
framed: false
});
var $scriptPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'gap': '5px',
'margin-bottom': '10px'
}).append($('<span>').text('JS library:').css({
'font-weight': 'bold',
'white-space': 'nowrap'
}), txtLibStatus.$element.css('flex', '1'), btnLoadLib.$element, btnRemoveLib.$element),
$('<div>').css({
'display': 'flex',
'justify-content': 'flex-end',
'margin-bottom': '10px'
}).append(btnEditLib.$element),
new OO.ui.FieldLayout(txtPreScript, {
label: 'Pre-Process',
align: 'top'
}).$element,
new OO.ui.FieldLayout(txtPostScript, {
label: 'Post-Process',
align: 'top'
}).$element
);
addSection('Scripts', $scriptPanel);
function updateLibUI() {
if (currentLibrary.code) {
txtLibStatus.setValue(currentLibrary.name);
btnRemoveLib.setDisabled(false);
} else {
txtLibStatus.setValue('(No library loaded)');
btnRemoveLib.setDisabled(true);
}
}
updateLibUI();
function LibraryEditorDialog(config) {
LibraryEditorDialog.super.call(this, config);
}
OO.inheritClass(LibraryEditorDialog, OO.ui.ProcessDialog);
LibraryEditorDialog.static.name = 'libraryEditor';
LibraryEditorDialog.static.title = 'Edit project library';
LibraryEditorDialog.static.actions = [{
action: 'save',
label: 'Save',
flags: ['primary', 'progressive']
},
{
label: 'Cancel',
flags: 'safe'
}
];
LibraryEditorDialog.prototype.initialize = function() {
LibraryEditorDialog.super.prototype.initialize.call(this);
this.$element.addClass('wa-lib-dialog'); // Attach our custom CSS override class
this.panel = new OO.ui.PanelLayout({
padded: true,
expanded: true
});
this.$editorWrapper = $('<div>').addClass('wa-lib-editorwrapper');
this.panel.$element.append(this.$editorWrapper);
this.$body.append(this.panel.$element);
};
LibraryEditorDialog.prototype.getSetupProcess = function(data) {
data = data || {};
return LibraryEditorDialog.super.prototype.getSetupProcess.call(this, data)
.next(function() {
var self = this;
self.$editorWrapper.empty();
// Create a textarea for the MediaWiki CM wrapper to properly bind to
var $libTextArea = $('<textarea>').appendTo(self.$editorWrapper);
var initCode = currentLibrary.code || "// All custom library functions defined here will be passed to the worker.\n// Special functions:\n// function wAwB_Pre(text, vars, shared) { return text; }\n// function wAwB_Post(text, vars, shared) { return text; }\n";
return mw.loader.using(['ext.CodeMirror', 'ext.CodeMirror.modes']).then(function(require) {
var CM = require('ext.CodeMirror');
var modes = require('ext.CodeMirror.modes');
self.cmInstance = new CM($libTextArea[0], modes.javascript());
self.cmInstance.initialize();
self.cmInstance.view.dispatch({
changes: {
from: 0,
insert: initCode
}
});
// Force CodeMirror to fill the wrapper
self.$editorWrapper.find('.cm-editor').css({
height: '100%'
});
}).catch(function(err) {
console.error("wAwB CM Init Error:", err);
});
}, this);
};
LibraryEditorDialog.prototype.getActionProcess = function(action) {
var dialog = this;
if (action === 'save') {
return new OO.ui.Process(function() {
var newCode = "";
if (dialog.cmInstance) {
newCode = dialog.cmInstance.view.state.doc.toString();
}
if (newCode.trim() === "") {
currentLibrary = {
name: null,
code: null
};
} else {
currentLibrary.code = newCode;
currentLibrary.name = "custom code";
}
updateLibUI();
dialog.close({
action: action
});
});
}
if (action === 'cancel' || !action) {
return new OO.ui.Process(function() {
dialog.close({
action: action
});
});
}
return LibraryEditorDialog.super.prototype.getActionProcess.call(this, action);
};
LibraryEditorDialog.prototype.getTeardownProcess = function(data) {
return LibraryEditorDialog.super.prototype.getTeardownProcess.call(this, data)
.next(function() {
if (this.cmInstance) {
try {
this.cmInstance.view.destroy();
} catch (e) {}
this.cmInstance = null;
}
}, this);
};
var windowManager = new OO.ui.WindowManager();
$('body').append(windowManager.$element);
var libDialog = new LibraryEditorDialog();
windowManager.addWindows([libDialog]);
btnEditLib.on('click', function() {
windowManager.openWindow(libDialog);
});
var togAdminEnable = new OO.ui.ToggleSwitchWidget({
value: false
});
var chkMovRedirect = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkMovTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var chkMovSub = new OO.ui.CheckboxInputWidget({
selected: false
});
var chkDelTalk = new OO.ui.CheckboxInputWidget({
selected: true
});
var dropProtEdit = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var dropProtMove = new OO.ui.DropdownInputWidget({
options: [{
data: '',
label: '(No Change)'
}, {
data: 'all',
label: 'All'
}, {
data: 'autoconfirmed',
label: 'Autoconfirmed'
}, {
data: 'sysop',
label: 'Sysop'
}]
});
var inpProtExpiry = new OO.ui.TextInputWidget({
placeholder: 'infinite / 2 days / 12 hours'
});
if (CAN_MOVE || IS_ADMIN) {
var $adminPanel = $('<div>').append(
$('<div>').css({
'display': 'flex',
'align-items': 'center',
'justify-content': 'flex-start',
'gap': '10px'
}).append($('<span>').text('Enable page actions').css('font-weight', 'bold'), togAdminEnable.$element),
$('<hr>')
);
if (CAN_MOVE) {
$adminPanel.append(
$('<strong>').text('Move options:'), new OO.ui.FieldLayout(chkMovRedirect, {
label: 'Do not create redirect',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovTalk, {
label: 'Move talk page',
align: 'inline'
}).$element, new OO.ui.FieldLayout(chkMovSub, {
label: 'Move subpages',
align: 'inline'
}).$element, $('<br>')
);
}
if (IS_ADMIN) {
$adminPanel.append(
$('<strong>').text('Delete options:'), new OO.ui.FieldLayout(chkDelTalk, {
label: 'Delete talk page',
align: 'inline'
}).$element, $('<br>'),
$('<strong>').text('Protect options:'), new OO.ui.FieldLayout(dropProtEdit, {
label: 'Edit level',
align: 'top'
}).$element, new OO.ui.FieldLayout(dropProtMove, {
label: 'Move level',
align: 'top'
}).$element, new OO.ui.FieldLayout(inpProtExpiry, {
label: 'Expiry',
align: 'top'
}).$element
);
}
addSection('Page actions', $adminPanel);
}
var btnPower = new OO.ui.ButtonWidget({
label: 'Start',
icon: 'power',
flags: ['primary', 'progressive'],
title: 'Start editing',
accessKey: 'a'
});
var btnDiff = new OO.ui.ButtonWidget({
label: 'Diff',
icon: 'update',
title: 'Show diff',
accessKey: 'd'
});
var btnSkip = new OO.ui.ButtonWidget({
label: 'Next',
icon: 'next',
title: 'Skip to next page',
accessKey: 'n',
disabled: true
});
var btnPreview = new OO.ui.ButtonWidget({
label: 'Preview',
icon: 'article',
title: 'Preview page',
accessKey: 'p'
});
var btnSave = new OO.ui.ButtonWidget({
label: 'Save',
icon: 'upload',
flags: 'progressive',
title: 'Save edit',
accessKey: 's',
disabled: true
});
var inputSummary = new OO.ui.TextInputWidget({
placeholder: '',
value: '',
title: 'Enter edit summary',
accessKey: 'b'
});
var $sumLayout = new OO.ui.FieldLayout(inputSummary, {
label: 'Edit summary',
align: 'top'
}).$element;
$sumLayout.css('margin-bottom', '6px');
var listTextarea = new OO.ui.MultilineTextInputWidget({
rows: 15,
classes: ['wa-page-list-raw']
});
var btnSort = new OO.ui.ButtonWidget({
icon: 'sortVertical',
title: 'Sort list',
framed: false
});
var btnDedup = new OO.ui.ButtonWidget({
icon: 'funnel',
title: 'Remove duplicates',
framed: false
});
var btnClear = new OO.ui.ButtonWidget({
icon: 'trash',
title: 'Clear list',
framed: false
});
var btnPreParse = new OO.ui.ButtonWidget({
label: 'Pre-parse',
title: 'Process list in background',
icon: 'robot',
framed: false
});
var $listCounter = $('<span>').addClass('wa-list-counter').text('0 pages');
var togAutoSave = new OO.ui.ToggleSwitchWidget({
value: false
});
var txtAutoDelay = new OO.ui.TextInputWidget({
value: '10'
});
var $botRow = $('<div>').addClass('wa-bot-row').hide();
if (PERMS.allowBot) {
$botRow.show().append($('<span>').css('font-weight', 'bold').text('Bot mode: '), togAutoSave.$element, $('<span>').text('Delay (s):'), txtAutoDelay.$element.css('max-width', '40px'));
togAutoSave.on('change', function(v) {
if (v) txtAutoDelay.setValue('10');
});
}
var sortAsc = true;
var $procHeader = $('<div>').addClass('wa-section-header').attr('id', 'wa-proc-header').css({
'display': 'flex',
'justify-content': 'space-between',
'align-items': 'center'
});
var $procTitle = $('<span>').attr('id', 'wa-proc-title').text('Processing');
var chkMinor = new OO.ui.CheckboxInputWidget({
selected: true,
title: 'Minor edit'
});
var $minorLayout = new OO.ui.FieldLayout(chkMinor, {
label: 'm',
align: 'inline',
title: 'Minor edit'
});
$minorLayout.$element.css({
'margin-right': '15px',
'font-weight': 'normal'
});
$procHeader.append($procTitle, $minorLayout.$element);
var $procContent = $('<div>').attr('id', 'wa-proc-content').append(
$sumLayout, $botRow,
$('<div>').addClass('wa-grid-container').append(
$('<div>').addClass('wa-grid-col').append(btnPower.$element),
$('<div>').addClass('wa-grid-col').append(btnDiff.$element, btnSkip.$element),
$('<div>').addClass('wa-grid-col').append(btnPreview.$element, btnSave.$element)
),
$('<div>').addClass('wa-toolbar').append($listCounter, btnSort.$element, btnDedup.$element, btnClear.$element),
listTextarea.$element,
$('<div>').css({
'margin-top': '5px'
}).append(btnPreParse.$element)
);
$content.append($procHeader, $procContent);
var configWidgets = [
srcSelect, srcInput, srcInputUser, srcInputStartDate, srcInputEndDate, srcDropProp,
chkCatPages, chkCatSub, chkCatFile, chkLinkWiki, chkLinkTrans, chkLinkImg, dropLinkRedir, chkLinkToRedir,
btnAdd, redirMode, chkSkipNoChange, radSkipExist,
inpSkipContains, togSkipContainsRegex, inpSkipNotContains, togSkipNotContainsRegex, inpSkipCategories, inpSkipNotCategories,
dropProtMode, radTargetSet, inpTemplateFilter, btnAddRule,
txtPreScript, txtPostScript, chkMovRedirect, chkMovTalk, chkMovSub, chkDelTalk, dropProtEdit, dropProtMove, inpProtExpiry,
togWikiTypos, btnLoadLocal, btnClearLocal, btnPreParse
];
// =====================================================================
// 5. FUNCTION DEFINITIONS (Core Logic)
// =====================================================================
function checkSummaryWarning() {
var val = inputSummary.getValue();
var isBlank = !val || val.trim() === "";
if (isBlank || hasNewSources) inputSummary.$element.addClass('wa-summary-warning');
else inputSummary.$element.removeClass('wa-summary-warning');
}
function renderCurrentView() {
if (currentViewMode === 'preview') renderPreview();
else renderDiff();
}
function toggleConfig(isLocked) {
configWidgets.forEach(function(w) {
if (w instanceof OO.ui.TextInputWidget || w instanceof OO.ui.MultilineTextInputWidget) {
w.setReadOnly(isLocked);
w.$element.css('opacity', isLocked ? 0.8 : 1);
} else {
w.setDisabled(isLocked);
}
});
$nsSelect.prop('disabled', isLocked);
for (var key in protCheckboxes) protCheckboxes[key].setDisabled(isLocked);
rulesRegistry.forEach(function(r) {
r.find.setReadOnly(isLocked);
r.rep.setReadOnly(isLocked);
r.regex.setDisabled(isLocked);
r.flags.setReadOnly(isLocked);
r.enable.setDisabled(isLocked);
r.del.setDisabled(isLocked);
r.btnFunc.setDisabled(isLocked || !r.regex.getValue());
r.btnUp.setDisabled(isLocked || rulesRegistry.indexOf(r) === 0);
r.btnDown.setDisabled(isLocked || rulesRegistry.indexOf(r) === rulesRegistry.length - 1);
});
if (CAN_MOVE || IS_ADMIN) togAdminEnable.setDisabled(isLocked);
btnLoadLib.setDisabled(isLocked);
btnRemoveLib.setDisabled(isLocked || !currentLibrary.code);
btnEditLib.setDisabled(isLocked);
btnLoadLocal.setDisabled(isLocked);
btnClearLocal.setDisabled(isLocked || localTypos.length === 0);
}
function updateListCount() {
var val = listTextarea.getValue();
var count = val.trim() ? val.split('\n').filter(function(l) {
var line = l.trim();
return line !== "" && !line.startsWith("####");
}).length : 0;
$listCounter.text(count + ' pages');
}
listTextarea.on('change', updateListCount);
function updateDirtyState() {
if (isRunning && currentTitle && Editor.getValue() !== originalWikitext) $editorHeader.addClass('wa-dirty');
else $editorHeader.removeClass('wa-dirty');
}
var notificationWatermark = 0;
var lastNotifCheck = 0;
function checkNotifications(notifList) {
if ((ON_NOTIFY !== "warn" && ON_NOTIFY !== "stop")|| !notifList || notifList.length === 0) return false;
var triggerFound = false;
var newWatermark = notificationWatermark;
for (var i = 0; i < notifList.length; i++) {
var n = notifList[i];
var currentId = parseInt(n.id, 10) || 0;
if (currentId > newWatermark) {
newWatermark = currentId;
}
if (currentId > notificationWatermark && (n.type === 'edit-user-talk' || n.type === 'reverted')) {
triggerFound = true;
}
}
notificationWatermark = newWatermark;
if (triggerFound) {
$('.wa-editor-header').addClass('wa-header-alert');
if (ON_NOTIFY === "stop") {
var halt = confirm("A new talk page message or revert was detected!\n\nClick OK to stop the processing queue.\nClick Cancel to acknowledge and continue.");
if (halt) {
btnPower.emit('click');
return true; // Signals the save loop to halt
} else {
$('.wa-editor-header').removeClass('wa-header-alert');
}
}
}
return false;
}
function removeTopLine() {
var l = listTextarea.getValue().split('\n');
l.shift();
listTextarea.setValue(l.join('\n'));
updateListCount();
}
function updateInterfaceMode() {
var isAdminMode = togAdminEnable.getValue();
var pageLoaded = !!currentTitle;
btnSave.setDisabled(isAdminMode || !pageLoaded || !PERMS.canSave);
btnSkip.setDisabled(!pageLoaded);
btnPreview.setDisabled(!pageLoaded);
btnDiff.setDisabled(isAdminMode || !pageLoaded);
Editor.setDisabled(isAdminMode || !pageLoaded);
if (CAN_MOVE) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminMove.setDisabled(!(allowAdmin && currentVars['$xA']));
if (currentVars['$xA']) btnAdminMove.setTitle('Move page to ' + currentVars['$xA']);
else btnAdminMove.setTitle('Move page to $xA (Variable not set)');
}
if (IS_ADMIN) {
var allowAdmin = isAdminMode && currentPageExists;
btnAdminDel.setDisabled(!allowAdmin);
btnAdminProt.setDisabled(!allowAdmin);
}
}
function renderDiff() {
captureViewScroll();
$visualOut.html('<div style="color:#888; text-align:center;">Generating Diff...</div>');
var currentText = Editor.getValue();
new mw.Api().post({
'action': 'compare',
fromtitle: currentTitle,
toslots: 'main',
'totext-main': currentText,
slots: 'main',
topst: window.wa_diffPST ? true : undefined,
prop: 'diff',
formatversion: 2
}).then(function(data) {
var diffBody = data.compare && data.compare.bodies && data.compare.bodies.main;
if (diffBody) {
$visualOut.html('<h4>Diff: ' + currentTitle + '</h4><table class="diff"><colgroup><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content"></colgroup><tbody>' + diffBody + '</tbody></table>');
processDiffTable();
} else {
$visualOut.html('<div style="color:green; text-align:center; padding-top:20px;">No Changes detected</div>');
}
restoreViewScroll(currentTitle, 'diff');
});
}
function processDiffTable() {
var rightLineNum = 0;
$visualOut.find('table.diff tr').each(function() {
var $tr = $(this);
var $linenos = $tr.find('td.diff-lineno');
if ($linenos.length > 0) {
var txt = $linenos.last().text();
var m = txt.match(/(\d+)/);
if (m) rightLineNum = parseInt(m[1]);
return;
}
if ($tr.find('.diff-addedline').length > 0 || $tr.find('.diff-context').length > 0) {
$tr.attr('data-line', rightLineNum);
$tr.css('cursor', 'pointer').attr('title', 'Jump to line ' + rightLineNum);
rightLineNum++;
}
});
// Attach a single delegated click listener to the table instead of every row
$visualOut.find('table.diff').on('click', 'tr[data-line]', function() {
Editor.scrollToLine(parseInt($(this).attr('data-line')));
});
}
function renderPreview() {
captureViewScroll();
$visualOut.html('<div style="color:#888; text-align:center;">Generating Preview...</div>');
new mw.Api().post({
action: 'parse',
title: currentTitle,
text: Editor.getValue(),
prop: 'text|categorieshtml|modules|jsconfigvars',
useskin: mw.config.get('skin'),
disablelimitreport: true,
pst: true,
contentmodel: 'wikitext'
}).then(function(data) {
if (data.parse && data.parse.text) {
var $prev = $('<div>').html(data.parse.text['*']);
if (data.parse.categorieshtml) $prev.append(data.parse.categorieshtml['*']);
$prev.find('a').attr('target', '_blank');
$visualOut.empty().append($prev);
mw.loader.using(data.parse.modules.concat(data.parse.modulestyles, data.parse.modulescripts), function() {
mw.hook('wikipage.content').fire($('.wa-visual-output .mw-parser-output'));
});
restoreViewScroll(currentTitle, 'preview');
}
}).catch(function(err) {
$visualOut.html('Error generating preview.');
alert("Preview failed: " + err);
});
}
async function transformPageText(rawText, title, config) {
var filters = config.filters;
if (filters) {
var check = function(text, rule) {
if (!rule || !rule.val) return false;
if (rule.regex) {
try {
return new RegExp(rule.val, 'mu').test(text);
} catch (e) {
return false;
}
}
return text.indexOf(rule.val) !== -1;
};
if (filters.skipContains && filters.skipContains.val && check(rawText, filters.skipContains)) {
return {
skipped: true,
reason: 'Contains: ' + filters.skipContains.val
};
}
if (filters.skipNotContains && filters.skipNotContains.val && !check(rawText, filters.skipNotContains)) {
return {
skipped: true,
reason: 'Missing: ' + filters.skipNotContains.val
};
}
}
var mode = config.mode;
var inputs = [];
var compiledSpecies = null;
if (config.templateFilter) {
var tFilter = config.templateFilter;
if (tFilter[0] === "^") tFilter = "^\\{\\{\\s*" + tFilter.slice(1);
else tFilter = "\\{\\{\\s*" + tFilter;
compiledSpecies = tFilter + "(?=\\s*[|}\\n])";
}
var skeleton = PageProtector.protect(rawText, mode, config.excludes, compiledSpecies);
if (mode === 'target') inputs = PageProtector.store;
else inputs = [skeleton];
var combinedRules = rulesRegistry.filter(r => r.isActive()).map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
}));
if (togWikiTypos.getValue()) combinedRules = combinedRules.concat(wikiTypos);
if (localTypos.length > 0) combinedRules = combinedRules.concat(localTypos);
var payload = {
texts: inputs,
vars: config.vars,
preCode: getUserCode(txtPreScript, 'wAwB_Pre'),
libraryCode: currentLibrary.code,
rules: combinedRules,
postCode: getUserCode(txtPostScript, 'wAwB_Post')
};
var result = await WorkerEngine.run(payload);
if (result.skipped) return {
skipped: true,
reason: result.reason
};
var finalText = "";
if (mode === 'target') {
PageProtector.store = result.texts;
finalText = PageProtector.restore(skeleton);
} else {
finalText = PageProtector.restore(result.texts[0]);
}
return {
skipped: false,
text: finalText,
summaryAppend: result.summaryAppend,
summaryOverride: result.summaryOverride
};
}
async function processPageContent() {
try {
setStatus('Processing...', 'working');
var mode = dropProtMode.getValue();
var activeConfig = {
mode: mode,
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: currentVars,
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
var res = await transformPageText(originalWikitext, currentTitle, activeConfig);
if (res.skipped) {
removeTopLine();
loadNextPage();
return;
}
currentPageSummaryAppend = res.summaryAppend || "";
currentPageSummaryOverride = res.summaryOverride || null;
updateSummaryPreview(inputSummary.getValue());
if (chkSkipNoChange.isSelected() && res.text === originalWikitext) {
removeTopLine();
loadNextPage();
return;
}
setStatus('Ready');
Editor.setValue(res.text);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
else {
Editor.setDisabled(false);
btnSave.setDisabled(!PERMS.canSave);
btnSkip.setDisabled(false);
btnPreview.setDisabled(false);
btnDiff.setDisabled(false);
}
updateDirtyState();
renderCurrentView();
if (PERMS.allowBot && togAutoSave.getValue()) {
var delay = Math.max(0, parseInt(txtAutoDelay.getValue(), 10) || 0) * 1000;
setStatus('Auto-save in ' + (delay / 1000) + 's...', 'working');
if (autoSaveTimer) clearTimeout(autoSaveTimer);
autoSaveTimer = setTimeout(function() {
if (isRunning && PERMS.canSave) {
btnSave.emit('click');
}
}, delay);
}
} catch (e) {
setStatus('Error', 'error');
alert(e);
btnPower.emit('click');
}
}
async function runPreParseBatch() {
// 1. Toggle / Stop Logic
if (isRunning) {
isRunning = false;
setStatus('Stopping...', 'working');
btnPreParse.setLabel('Pre-parse');
return;
}
// 2. Start & Deduplicate
var currentVal = listTextarea.getValue();
var cleanVal = getDeduplicatedList(currentVal).join('\n');
listTextarea.setValue(cleanVal);
updateListCount();
isRunning = true;
toggleUI(true);
// 3. Lock UI
toggleUI(true);
btnSkip.setDisabled(true);
btnDiff.setDisabled(true);
btnPreview.setDisabled(true);
btnSave.setDisabled(true);
Editor.setDisabled(true);
btnPreParse.setLabel('Stop pre-parse');
// Inject STOP marker if not present
var currentList = listTextarea.getValue().split('\n');
if (!currentList.includes('####STOP')) {
currentList.push('####STOP');
listTextarea.setValue(currentList.join('\n'));
}
// Gather Config
var activeConfig = {
mode: dropProtMode.getValue(),
excludes: {},
templateFilter: inpTemplateFilter.getValue().trim(),
vars: {},
filters: {
skipContains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
skipNotContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
}
}
};
if (activeConfig.mode === 'protect') {
for (var k in protCheckboxes) activeConfig.excludes[k] = protCheckboxes[k].isSelected();
} else {
var sel = radTargetSet.findSelectedItem();
activeConfig.excludes = sel ? sel.getData() : null;
}
setStatus('Pre-parsing...', 'working');
while (isRunning) {
var lines = listTextarea.getValue().split('\n');
var batchTitles = [];
var stopFound = false;
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
if (line === '####STOP') {
stopFound = true;
break;
}
if (line && !line.startsWith('####')) {
var parts = line.split('|');
batchTitles.push({
fullLine: line,
title: parts[0],
vars: parts.slice(1)
});
}
if (batchTitles.length >= 50) break;
}
if (batchTitles.length === 0) {
if (stopFound) setStatus('Pre-parse complete');
else setStatus('List empty');
break;
}
$listCounter.text('Fetching ' + batchTitles.length + '...');
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
try {
var data = await api.get({
action: 'query',
prop: 'revisions' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: batchTitles.map(t => t.title).join('|'),
rvprop: 'content',
rvslots: 'main',
redirects: 1,
cllimit: 'max'
});
var pageMap = {};
if (data.query && data.query.pages) Object.values(data.query.pages).forEach(p => pageMap[p.title] = p);
var redirMap = {};
if (data.query && data.query.redirects) data.query.redirects.forEach(r => redirMap[r.from] = r.to);
var keptLines = [];
for (var k = 0; k < batchTitles.length; k++) {
var item = batchTitles[k];
var lookupTitle = redirMap[item.title] || item.title;
var page = pageMap[lookupTitle];
if (!page || page.missing || page.invalid || !page.revisions || !page.revisions[0]) {
console.warn("Skipping invalid/missing page:", item.title);
continue;
}
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) continue; // Skip
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) continue; // Skip
var rawText = page.revisions[0].slots.main['*'];
activeConfig.vars = {
'$xx': item.title
};
item.vars.forEach((v, idx) => activeConfig.vars['$x' + String.fromCharCode(65 + idx)] = v);
var res = await transformPageText(rawText, item.title, activeConfig);
// UPDATED LOGIC: Respect "Skip if no change" checkbox
if (!res.skipped && (!chkSkipNoChange.isSelected() || res.text !== rawText)) {
keptLines.push(item.fullLine);
}
}
var freshLines = listTextarea.getValue().split('\n');
var stopIndex = -1;
for (var x = 0; x < freshLines.length; x++) {
if (freshLines[x] === '####STOP') {
stopIndex = x;
break;
}
}
if (stopIndex > -1) {
var topChunk = freshLines.slice(0, stopIndex);
var botChunk = freshLines.slice(stopIndex + 1);
var processedSet = new Set(batchTitles.map(t => t.fullLine));
var newTop = topChunk.filter(l => !processedSet.has(l));
var newList = newTop.concat(['####STOP']).concat(botChunk).concat(keptLines);
listTextarea.setValue(newList.join('\n'));
updateListCount();
}
} catch (e) {
console.error(e);
setStatus('Batch error: ' + e, 'error');
break;
}
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
btnPreParse.setLabel('Pre-parse');
if (listTextarea.getValue().startsWith('####STOP')) setStatus('Pre-parse done!');
else setStatus('Stopped');
}
btnPreParse.on('click', runPreParseBatch);
function loadNextPage() {
if (!isRunning) return;
var allLines = listTextarea.getValue().split('\n');
var listChanged = false;
var stopCommand = false;
while (allLines.length > 0) {
var line = allLines[0];
if (line === '####STOP') {
stopCommand = true;
break;
}
if (line.startsWith('####') || line === "") {
allLines.shift();
listChanged = true;
} else {
break;
}
}
if (listChanged) {
listTextarea.setValue(allLines.join('\n'));
updateListCount();
}
if (stopCommand) {
btnPower.emit('click');
setStatus("Stopped by ####STOP");
return;
}
if (allLines.length === 0) {
btnPower.emit('click');
setStatus("Done!");
return;
}
var raw = allLines[0];
var parts = raw.split('|');
currentTitle = parts[0].trim();
baseRevId = 0;
originalWikitext = "";
if (!currentTitle) {
removeTopLine();
loadNextPage();
return;
}
currentVars = {};
currentVars['$xx'] = currentTitle;
for (var i = 1; i < parts.length; i++) currentVars['$x' + String.fromCharCode(64 + i)] = parts[i];
currentPageSummaryAppend = "";
currentPageSummaryOverride = null;
updateSummaryPreview(inputSummary.getValue());
setStatus('Loading...', 'working');
btnSave.setDisabled(true);
btnPreview.setDisabled(true);
btnDiff.setDisabled(true);
btnSkip.setDisabled(true);
Editor.setDisabled(true);
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
$editorHeader.removeClass('wa-dirty');
$visualOut.empty();
Editor.setValue('Loading...');
$infoContainer.empty();
currentPageExists = false;
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
var badCats = inpSkipCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var reqCats = inpSkipNotCategories.getValue().split('|').map(s => s.trim()).filter(s => s);
var api = new mw.Api();
var params = {
action: 'query',
prop: 'revisions|info' + (badCats.length + reqCats.length > 0 ? '|categories' : ''),
titles: currentTitle,
rvprop: 'content|timestamp|ids',
rvslots: 'main',
inprop: 'watched',
cllimit: 'max'
};
var now = Date.now();
var shouldCheckNotifs = (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") && (now - lastNotifCheck > ON_NOTIFY_FREQ);
if (shouldCheckNotifs) {
params.meta = 'notifications';
params.notprop = 'list';
params.notsections = 'alert';
params.notlimit = 4;
lastNotifCheck = now;
}
var rMode = redirMode.findSelectedItem().getData();
if (rMode === 'follow') params.redirects = 1;
return api.get(params).then(async function(data) {
// piggyback notification check
if (data.query && data.query.notifications && data.query.notifications.list) {
var stopped = checkNotifications(data.query.notifications.list);
if (stopped) return; // exit before loading the page content
}
var pid = Object.keys(data.query.pages)[0];
var page = data.query.pages[pid];
currentPageExists = !page.missing && !page.invalid;
var pageCats = new Set((page.categories || []).map(c => c.title.replace(/^[^:]+:/, '').trim()));
if (badCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat blacklist');
removeTopLine();
loadNextPage();
return;
}
if (reqCats.length > 0 && !reqCats.some(c => pageCats.has(c))) {
setStatus('Skip: cat whitelist');
removeTopLine();
loadNextPage();
return;
}
if (rMode === 'follow' && data.query.redirects) {
currentTitle = page.title;
$titleLink.attr('href', mw.util.getUrl(currentTitle)).text(currentTitle);
mw.notify('Redirect followed to: ' + currentTitle);
}
if (rMode === 'skip' && page.redirect !== undefined) {
removeTopLine();
loadNextPage();
return;
}
var skipMode = radSkipExist.findSelectedItem().getData();
if (pid === "-1") {
if (skipMode === 'missing') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = "";
baseRevId = 0;
} else {
if (skipMode === 'exists') {
removeTopLine();
loadNextPage();
return;
}
originalWikitext = page.revisions[0].slots.main['*'];
baseRevId = page.revisions[0].revid;
}
if (page.revisions && page.revisions.length > 0) {
var rev = page.revisions[0];
var ts = new Date(rev.timestamp).toISOString().replace('T', ' ').substring(0, 16);
$infoContainer.empty().append('Last edit: ' + ts + ' | ', $('<a>').attr('href', mw.util.getUrl(currentTitle, {
action: 'history'
})).attr('target', '_blank').text('history'));
}
btnWatch.setDisabled(!currentPageExists);
btnManualEdit.setDisabled(!currentPageExists);
if (page.watched !== undefined) btnWatch.setIcon('unStar');
else btnWatch.setIcon('star');
if (CAN_MOVE || IS_ADMIN) {
updateInterfaceMode();
if (togAdminEnable.getValue()) {
Editor.setValue(originalWikitext);
renderCurrentView();
setStatus('Ready (Page actions)');
return;
}
}
processPageContent();
}).catch(function(e) {
setStatus('API error', 'error');
alert('Load error: ' + e);
btnPower.emit('click');
});
}
async function fetchWithContinue(api, params) {
var allTitles = new Set();
var continueToken = {};
var safetyLimit = FETCH_SAFETY_LIMIT;
var count = 0;
isFetching = true;
btnAdd.setLabel('Cancel fetch');
$fetchStatus.text('Fetching...').show();
try {
while (isFetching && count < safetyLimit) {
var merged = Object.assign({}, params, continueToken);
var data = await api.get(merged);
var batch = [];
if (data.watchlistraw) batch = data.watchlistraw;
else if (data.query) {
if (data.query.pages) batch = Object.values(data.query.pages);
else if (data.query.categorymembers) batch = data.query.categorymembers;
else if (data.query.backlinks) batch = data.query.backlinks;
else if (data.query.embeddedin) batch = data.query.embeddedin;
else if (data.query.imageusage) batch = data.query.imageusage;
else if (data.query.search) batch = data.query.search;
else if (data.query.allpages) batch = data.query.allpages;
else if (data.query.usercontribs) batch = data.query.usercontribs;
else if (data.query.pageswithprop) batch = data.query.pageswithprop;
}
if (batch.length > 0) {
batch.forEach(item => {
if (item.title) allTitles.add(item.title);
});
count = allTitles.size;
$fetchStatus.text('Fetched ' + count + '...');
}
if (data.continue) continueToken = data.continue;
else break;
}
} catch (e) {
alert("Fetch interrupted: " + e);
}
isFetching = false;
btnAdd.setLabel('Add to list').setDisabled(false);
$fetchStatus.text('Added ' + allTitles.size + ' pages').delay(3000).fadeOut();
if (allTitles.size > 0) {
hasNewSources = true;
checkSummaryWarning();
}
return Array.from(allTitles);
}
function toggleUI(d) {
if (d) {
btnPower.setLabel('Stop').setIcon('power').setFlags(['destructive']);
} else {
btnPower.setLabel('Start').setIcon('power').clearFlags().setFlags(['primary', 'progressive']);
if (PERMS.allowBot) togAutoSave.setValue(false);
}
toggleConfig(d);
btnSort.setDisabled(d);
btnDedup.setDisabled(d);
btnClear.setDisabled(d);
btnSaveProj.setDisabled(d);
btnLoadProj.setDisabled(d);
btnSkip.setDisabled(!d);
btnSave.setDisabled(true);
listTextarea.setReadOnly(d);
if (d) listTextarea.$element.addClass('wa-list-running');
else listTextarea.$element.removeClass('wa-list-running');
}
function resetPanels() {
Editor.setValue('');
$titleLink.text('Page content').removeAttr('href');
$editorHeader.removeClass('wa-dirty');
setStatus('Ready');
$('#wa-summary-preview').val('');
currentTitle = null;
$visualOut.html('<div style="color:#aaa; text-align:center; margin-top:50px;">Ready...</div>');
$infoContainer.empty();
btnWatch.setDisabled(true);
btnManualEdit.setDisabled(true);
Editor.setDisabled(true);
currentPageExists = false;
if (CAN_MOVE || IS_ADMIN) updateInterfaceMode();
toggleUI(false);
updateListCount();
if (autoSaveTimer) clearTimeout(autoSaveTimer);
}
function arrayMove(arr, old_index, new_index) {
if (new_index >= arr.length) {
var k = new_index - arr.length + 1;
while (k--) arr.push(undefined);
}
arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);
}
function updateRuleButtons() {
rulesRegistry.forEach(function(item, idx) {
item.btnUp.setDisabled(idx === 0);
item.btnDown.setDisabled(idx === rulesRegistry.length - 1);
});
}
function addRule() {
var row = $('<div>').addClass('wa-rule-row');
var controls = $('<div>').addClass('wa-rule-controls');
var btnUp = new OO.ui.ButtonWidget({
icon: 'collapse',
framed: false,
title: 'Move up',
classes: ['wa-rule-btn']
});
var btnDown = new OO.ui.ButtonWidget({
icon: 'expand',
framed: false,
title: 'Move down',
classes: ['wa-rule-btn']
});
controls.append(btnUp.$element, btnDown.$element);
var contentDiv = $('<div>').addClass('wa-rule-content');
var f = new OO.ui.TextInputWidget({
placeholder: 'Find'
});
var r = new OO.ui.TextInputWidget({
placeholder: 'Replace'
});
var reg = new OO.ui.ToggleSwitchWidget();
var fl = new OO.ui.TextInputWidget({
value: 'gmu',
disabled: true
}).toggle(false);
var btnEnable = new OO.ui.ButtonWidget({
icon: 'power',
framed: false,
title: 'Toggle rule',
flags: ['progressive']
});
var isRuleActive = true;
var btnFunc = new OO.ui.ButtonWidget({
icon: 'code',
framed: false,
title: 'Toggle JS mode',
disabled: true
});
var isRuleFunc = false;
var toggleRule = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleActive;
isRuleActive = val;
row.css('opacity', isRuleActive ? 1 : 0.5);
if (isRuleActive) btnEnable.setFlags(['progressive']);
else btnEnable.clearFlags();
};
btnEnable.on('click', function() {
toggleRule();
});
var toggleFunc = function(forceVal) {
var val = (forceVal !== undefined) ? forceVal : !isRuleFunc;
isRuleFunc = val;
if (isRuleFunc) {
btnFunc.setFlags(['progressive']);
r.$input.attr('placeholder', 'return match.toUpperCase();');
} else {
btnFunc.clearFlags();
r.$input.attr('placeholder', 'Replace');
}
};
btnFunc.on('click', function() {
toggleFunc();
});
btnFunc.toggle(false);
reg.on('change', function(v) {
fl.setDisabled(!v);
fl.toggle(v);
btnFunc.setDisabled(!v);
if (!v) {
btnFunc.toggle(false);
if (isRuleFunc) toggleFunc(false);
} else btnFunc.toggle(true);
});
var del = new OO.ui.ButtonWidget({
icon: 'trash',
flags: 'destructive',
framed: false,
title: 'Delete rule',
});
del.on('click', function() {
row.fadeOut(200, function() {
row.remove();
rulesRegistry = rulesRegistry.filter(x => x.row !== row);
updateRuleButtons();
});
});
contentDiv.append(f.$element, $('<div>').css('margin-top', '3px').append(r.$element), $('<div>').addClass('wa-rule-opt-row').append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<div>').css({
'display': 'flex',
'align-items': 'center'
}).append($('<span>').text('Regex: ').css({
'font-size': '0.8em',
'margin-right': '4px'
}), reg.$element, fl.$element.css({
'width': '50px',
'margin-left': '5px'
})), btnFunc.$element.css('margin-left', '10px')), $('<div>').css('display', 'flex').append(btnEnable.$element, del.$element)));
row.append(controls, contentDiv);
$rulesList.append(row);
var ruleItem = {
row: row,
find: f,
rep: r,
regex: reg,
flags: fl,
btnUp: btnUp,
btnDown: btnDown,
enable: btnEnable,
del: del,
btnFunc: btnFunc,
isActive: function() {
return isRuleActive;
},
setActive: toggleRule,
isFunc: function() {
return isRuleFunc;
},
setFunc: toggleFunc
};
rulesRegistry.push(ruleItem);
btnUp.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx > 0) {
var prevRow = rulesRegistry[idx - 1].row;
row.fadeOut(150, function() {
row.insertBefore(prevRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx - 1);
updateRuleButtons();
}
});
btnDown.on('click', function() {
var idx = rulesRegistry.indexOf(ruleItem);
if (idx < rulesRegistry.length - 1) {
var nextRow = rulesRegistry[idx + 1].row;
row.fadeOut(150, function() {
row.insertAfter(nextRow).fadeIn(150).addClass('wa-highlight');
setTimeout(function() {
row.removeClass('wa-highlight');
}, 500);
});
arrayMove(rulesRegistry, idx, idx + 1);
updateRuleButtons();
}
});
updateRuleButtons();
}
btnAddRule.on('click', addRule);
addRule();
togWikiTypos.on('change', function(v) {
if (v) {
if (wikiTypos.length > 0) lblWikiStatus.text(wikiTypos.length + ' rules loaded (Cached)');
else {
lblWikiStatus.text('Fetching...');
togWikiTypos.setDisabled(true);
new mw.Api().get({
action: 'query',
prop: 'revisions',
titles: mw.config.get('wgFormattedNamespaces')[4] + ':AutoWikiBrowser/Typos',
rvprop: 'content',
rvslots: 'main',
formatversion: 2
}).then(function(d) {
var page = d.query.pages[0];
if (!page.missing) {
wikiTypos = parseTypoContent(page.revisions[0].slots.main.content);
lblWikiStatus.text(wikiTypos.length + ' rules loaded');
} else {
lblWikiStatus.text('Page not found');
togWikiTypos.setValue(false);
}
}).catch(function() {
lblWikiStatus.text('Error');
togWikiTypos.setValue(false);
}).always(function() {
togWikiTypos.setDisabled(false);
});
}
} else lblWikiStatus.text('Rules inactive');
});
btnLoadLocal.on('click', function() {
$typoInput.click();
});
$typoInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
localTypos = parseTypoContent(evt.target.result);
lblLocalStatus.text(localTypos.length + ' local rules loaded');
btnClearLocal.setDisabled(false);
};
reader.readAsText(file);
$typoInput.val('');
});
btnClearLocal.on('click', function() {
localTypos = [];
lblLocalStatus.text('No local rules');
btnClearLocal.setDisabled(true);
});
btnLoadLib.on('click', function() {
$libInput.click();
});
btnRemoveLib.on('click', function() {
currentLibrary = {
name: null,
code: null
};
updateLibUI();
});
$libInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
currentLibrary = {
name: file.name,
code: evt.target.result
};
updateLibUI();
};
reader.readAsText(file);
$libInput.val('');
});
btnPower.on('click', async function() {
hasNewSources = false;
checkSummaryWarning();
$('.wa-editor-header').removeClass('wa-header-alert');
if (!isRunning) {
resetViewScroll();
if (ON_NOTIFY === "warn" || ON_NOTIFY === "stop") {
setStatus('Setting watermark...', 'working');
try {
var notifData = await new mw.Api().get({
action: 'query',
meta: 'notifications',
notprop: 'list',
notsections: 'alert',
notlimit: 1,
formatversion: 2
});
if (notifData.query && notifData.query.notifications && notifData.query.notifications.list.length > 0) {
notificationWatermark = parseInt(notifData.query.notifications.list[0].id, 10) || 0;
} else {
notificationWatermark = 0;
}
} catch (e) {
console.warn("wAwB: Failed to fetch notification watermark", e);
}
}
if (SAVED_SESSION === 0) mw.track('stats.mediawiki_gadget_wAwB_total');
isRunning = true;
toggleUI(true);
loadNextPage();
} else {
if (SAVED_RUN > 0) {
mw.track('stats.mediawiki_gadget_wAwB_saved_total', SAVED_RUN, {
wiki: WIKI
});
SAVED_SESSION += SAVED_RUN;
SAVED_RUN = 0;
}
isRunning = false;
toggleUI(false);
WorkerEngine.destroy();
resetPanels();
}
});
inputSummary.on('change', function() {
checkSummaryWarning();
if (currentTitle) {
updateSummaryPreview(inputSummary.getValue());
}
});
btnSkip.on('click', function() {
if (Editor.getValue() === 'Loading...') return;
removeTopLine();
loadNextPage();
});
btnDiff.on('click', function() {
currentViewMode = 'diff';
updateDirtyState();
if (currentTitle) renderDiff();
});
btnPreview.on('click', function() {
currentViewMode = 'preview';
updateDirtyState();
if (currentTitle) renderPreview();
});
btnSave.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
if (autoSaveTimer) clearTimeout(autoSaveTimer);
btnSave.setDisabled(true);
setStatus('Saving...', 'working');
var effectiveDelay = PERMS.saveDelay || 0;
if (effectiveDelay > 0) setStatus('Throttling (' + (effectiveDelay / 1000) + 's)...', 'working');
setTimeout(function() {
if (effectiveDelay > 0) setStatus('Saving...', 'working');
var finalSum = $('#wa-summary-preview').val().trim();
var summary = finalSum + SUMMARY_SUFFIX;
new mw.Api().postWithToken('csrf', {
action: 'edit',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
text: Editor.getValue(),
summary: summary,
minor: chkMinor.isSelected(),
baserevid: baseRevId,
bot: PERMS.allowBot,
watchlist: 'nochange',
tags: DO_TAG ? APP_NAME : undefined
}).then(function() {
SAVED_RUN += 1;
removeTopLine();
loadNextPage();
}).catch(function(c) {
btnSave.setDisabled(false);
setStatus('Save error', 'error');
alert('Save failed: ' + c);
});
}, effectiveDelay);
});
btnManualEdit.on('click', function() {
if (Editor.getValue() === 'Loading...' || !currentTitle) return;
// Calculate the final injected summary
var base = currentPageSummaryOverride !== null ? currentPageSummaryOverride : inputSummary.getValue();
var finalSum = base + (currentPageSummaryAppend || "");
var translatedSummary = injectVars(finalSum);
var summary = translatedSummary; // no SUMMARY_SUFFIX
// Create an invisible form targeting a new tab
var $form = $('<form>').attr({
method: 'POST',
action: mw.util.getUrl(currentTitle, { action: 'edit' }),
target: '_blank'
}).hide();
// Populate it with MediaWiki's native input names
$('<textarea>').attr('name', 'wpTextbox1').val(Editor.getValue()).appendTo($form);
$('<input>').attr('name', 'wpSummary').val(summary).appendTo($form);
if (chkMinor.isSelected()) {
$('<input>').attr('name', 'wpMinoredit').val('1').appendTo($form);
}
// Append, fire, and destroy
$form.appendTo('body').submit().remove();
});
btnWatch.on('click', function() {
var isWatched = btnWatch.getIcon() === 'unStar';
new mw.Api()[isWatched ? 'unwatch' : 'watch'](currentTitle).then(function() {
btnWatch.setIcon(isWatched ? 'star' : 'unStar');
mw.notify(isWatched ? 'Unwatched' : 'Watched');
});
});
btnAdd.on('click', function() {
if (isFetching) {
isFetching = false;
btnAdd.setDisabled(true).setLabel('Cancelling...');
return;
}
try {
var mode = srcSelect.getValue(),
q = srcInput.getValue().trim();
if (mode !== 'watchlist' && mode !== 'usercontribs' && mode !== 'pageswithprop' && !q) {
alert('Query empty');
return;
}
var nsIds = ($nsSelect.val() || []).map(v => parseInt(v));
var nsStr = nsIds.join('|');
var api = new mw.Api(),
promises = [];
if (mode === 'cat') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'categorymembers',
cmtitle: mw.Title.newFromText(q, 14) ? mw.Title.newFromText(q, 14).getPrefixedText() : 'Category:' + q,
cmnamespace: nsStr,
cmtype: (chkCatPages.isSelected() ? 'page|' : '') + (chkCatSub.isSelected() ? 'subcat|' : '') + (chkCatFile.isSelected() ? 'file' : ''),
cmlimit: 'max'
}));
else if (mode === 'linksto') {
if (chkLinkWiki.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'backlinks',
bltitle: q,
blnamespace: nsStr,
bllimit: 'max',
blfilterredir: dropLinkRedir.getValue(),
blredirect: chkLinkToRedir.isSelected()
}));
if (chkLinkTrans.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'embeddedin',
eititle: q,
einamespace: nsStr,
eilimit: 'max',
eifilterredir: dropLinkRedir.getValue()
}));
if (chkLinkImg.isSelected()) promises.push(fetchWithContinue(api, {
action: 'query',
list: 'imageusage',
iutitle: q,
iunamespace: nsStr,
iulimit: 'max',
iufilterredir: dropLinkRedir.getValue()
}));
} else if (mode === 'linkson') promises.push(fetchWithContinue(api, {
action: 'query',
generator: 'links',
titles: q,
gplnamespace: nsStr,
gpllimit: 'max',
prop: 'info'
}));
else if (mode === 'prefix') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'allpages',
apprefix: q,
apnamespace: nsIds[0] || 0,
aplimit: 'max'
}));
else if (mode === 'watchlist') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'watchlistraw',
wrnamespace: nsStr,
wrlimit: 'max'
}));
else if (mode === 'search') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'search',
srsearch: q,
srnamespace: nsStr,
srlimit: 'max'
}));
else if (mode === 'usercontribs') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'usercontribs',
ucuser: srcInputUser.getValue(),
ucstart: srcInputStartDate.getValue(),
ucend: srcInputEndDate.getValue(),
ucdir: 'newer',
uclimit: 'max',
ucnamespace: nsStr,
ucprop: 'title'
}));
else if (mode === 'pageswithprop') promises.push(fetchWithContinue(api, {
action: 'query',
list: 'pageswithprop',
pwppropname: srcDropProp.getValue(),
pwplimit: 'max'
}));
Promise.all(promises).then(function(res) {
var list = new Set();
res.forEach(titles => titles.forEach(t => list.add(t)));
var currentVal = listTextarea.getValue();
var newVal = Array.from(list).join('\n');
listTextarea.setValue(currentVal ? currentVal + '\n' + newVal : newVal);
mw.notify('Added ' + list.size + ' pages');
}).catch(e => alert('Error: ' + e));
} catch (e) {
alert("Fetch error: " + e);
}
});
btnSort.on('click', function() {
var v = listTextarea.getValue();
if (v) {
var lines = getNormalizedList(v);
lines.sort((a, b) => sortAsc ? a.localeCompare(b) : b.localeCompare(a));
listTextarea.setValue(lines.join('\n'));
sortAsc = !sortAsc;
}
});
btnDedup.on('click', function() {
var v = listTextarea.getValue();
if (v) listTextarea.setValue(getDeduplicatedList(v).join('\n'));
});
btnClear.on('click', function() {
listTextarea.setValue('');
});
btnSaveProj.on('click', function() {
try {
var currentMode = srcSelect.getValue();
if (['watchlist', 'usercontribs', 'pageswithprop'].indexOf(currentMode) === -1) queryCache[currentMode] = srcInput.getValue();
var saveExcludes = {};
for (var k in protCheckboxes) saveExcludes[k] = protCheckboxes[k].isSelected();
var data = {
version: APP_VERSION,
library: currentLibrary,
source: {
activeMode: currentMode,
namespaces: ($nsSelect.val() || []).map(v => parseInt(v)),
modes: {
cat: {
query: queryCache['cat'] || '',
options: {
pages: chkCatPages.isSelected(),
sub: chkCatSub.isSelected(),
file: chkCatFile.isSelected()
}
},
linksto: {
query: queryCache['linksto'] || '',
options: {
wiki: chkLinkWiki.isSelected(),
trans: chkLinkTrans.isSelected(),
img: chkLinkImg.isSelected(),
redir: dropLinkRedir.getValue(),
toRedir: chkLinkToRedir.isSelected()
}
},
linkson: {
query: queryCache['linkson'] || ''
},
prefix: {
query: queryCache['prefix'] || ''
},
watchlist: {
query: ''
},
search: {
query: queryCache['search'] || ''
},
usercontribs: {
options: {
user: srcInputUser.getValue(),
start: srcInputStartDate.getValue(),
end: srcInputEndDate.getValue()
}
},
pageswithprop: {
options: {
prop: srcDropProp.getValue()
}
}
}
},
settings: {
redir: redirMode.findSelectedItem().getData(),
skipLogic: radSkipExist.findSelectedItem().getData(),
skipNoChange: chkSkipNoChange.isSelected(),
minor: chkMinor.isSelected()
},
filters: {
contains: {
val: inpSkipContains.getValue(),
regex: togSkipContainsRegex.getValue()
},
notContains: {
val: inpSkipNotContains.getValue(),
regex: togSkipNotContainsRegex.getValue()
},
categories: {
skip: inpSkipCategories.getValue(),
require: inpSkipNotCategories.getValue()
}
},
rules: rulesRegistry.map(r => ({
find: r.find.getValue(),
replace: r.rep.getValue(),
regex: r.regex.getValue(),
flags: r.flags.getValue(),
enabled: r.isActive(),
isFunc: r.isFunc()
})),
scripts: {
pre: txtPreScript.getValue(),
post: txtPostScript.getValue()
},
processing: {
summary: inputSummary.getValue(),
list: listTextarea.getValue()
},
protection: {
mode: dropProtMode.getValue(),
excludes: saveExcludes,
target: (radTargetSet.findSelectedItem() || {
getData: () => null
}).getData(),
templateFilter: inpTemplateFilter.getValue()
}
};
var a = document.createElement('a');
a.href = URL.createObjectURL(new Blob([JSON.stringify(data, null, 1)], {
type: "application/json"
}));
a.download = "wawb_project.json";
a.click();
} catch (e) {
alert("Save error: " + e);
}
});
btnLoadProj.on('click', function() {
$fileInput.click();
});
function applyIf(val, action) {
if (val !== undefined && val !== null) action(val);
}
$fileInput.on('change', function(e) {
var file = e.target.files[0];
if (!file) return;
var reader = new FileReader();
reader.onload = function(evt) {
try {
var data = JSON.parse(evt.target.result);
isLoadingProject = true;
// --- 1. SOURCE SETTINGS ---
applyIf(data?.source?.namespaces, v => $nsSelect.val(v.map(String)));
if (data?.source?.modes) {
var m = data.source.modes;
// Merge into queryCache instead of wiping it
for (var key in m) {
if (m[key]?.query !== undefined) queryCache[key] = m[key].query;
}
applyIf(m?.cat?.options?.pages, v => chkCatPages.setSelected(v));
applyIf(m?.cat?.options?.sub, v => chkCatSub.setSelected(v));
applyIf(m?.cat?.options?.file, v => chkCatFile.setSelected(v));
applyIf(m?.linksto?.options?.wiki, v => chkLinkWiki.setSelected(v));
applyIf(m?.linksto?.options?.trans, v => chkLinkTrans.setSelected(v));
applyIf(m?.linksto?.options?.img, v => chkLinkImg.setSelected(v));
applyIf(m?.linksto?.options?.redir, v => dropLinkRedir.setValue(v));
applyIf(m?.linksto?.options?.toRedir, v => chkLinkToRedir.setSelected(v));
applyIf(m?.usercontribs?.options?.user, v => srcInputUser.setValue(v));
applyIf(m?.usercontribs?.options?.start, v => srcInputStartDate.setValue(v));
applyIf(m?.usercontribs?.options?.end, v => srcInputEndDate.setValue(v));
applyIf(m?.pageswithprop?.options?.prop, v => srcDropProp.setValue(v));
}
// --- 2. SETTINGS & SKIP LOGIC ---
applyIf(data?.settings?.redir, v => redirMode.selectItemByData(v));
applyIf(data?.settings?.skipLogic, v => radSkipExist.selectItemByData(v));
applyIf(data?.settings?.skipNoChange, v => chkSkipNoChange.setSelected(v));
applyIf(data?.settings?.minor, v => chkMinor.setSelected(v));
// --- 3. PROTECTION ---
applyIf(data?.protection?.mode, v => dropProtMode.setValue(v));
applyIf(data?.protection?.target, v => radTargetSet.selectItemByData(v));
applyIf(data?.protection?.templateFilter, v => inpTemplateFilter.setValue(v));
if (data?.protection?.excludes) {
for (var k in data.protection.excludes) {
if (protCheckboxes[k]) applyIf(data.protection.excludes[k], v => protCheckboxes[k].setSelected(v));
}
}
// --- 4. LIBRARY ---
applyIf(data?.library?.name, v => currentLibrary.name = v);
applyIf(data?.library?.code, v => currentLibrary.code = v);
if (data?.library?.name || data?.library?.code) updateLibUI();
// --- 5. FILTERS ---
applyIf(data?.filters?.contains?.val, v => inpSkipContains.setValue(v));
applyIf(data?.filters?.contains?.regex, v => togSkipContainsRegex.setValue(v));
applyIf(data?.filters?.notContains?.val, v => inpSkipNotContains.setValue(v));
applyIf(data?.filters?.notContains?.regex, v => togSkipNotContainsRegex.setValue(v));
applyIf(data?.filters?.categories?.skip, v => inpSkipCategories.setValue(v));
applyIf(data?.filters?.categories?.require, v => inpSkipNotCategories.setValue(v));
// --- 6. SCRIPTS & PROCESSING ---
applyIf(data?.scripts?.pre, v => txtPreScript.setValue(v));
applyIf(data?.scripts?.post, v => txtPostScript.setValue(v));
applyIf(data?.processing?.summary, v => inputSummary.setValue(v));
applyIf(data?.processing?.list, v => listTextarea.setValue(v));
// --- 7. DYNAMIC RULES ARRAY ---
if (data?.rules && Array.isArray(data.rules)) {
rulesRegistry.forEach(r => r.row.remove());
rulesRegistry = [];
$rulesList.empty();
data.rules.forEach(r => {
addRule();
var last = rulesRegistry[rulesRegistry.length - 1];
applyIf(r.find, v => last.find.setValue(v));
applyIf(r.replace, v => last.rep.setValue(v));
applyIf(r.regex, v => {
last.regex.setValue(v);
last.flags.setDisabled(!v);
});
applyIf(r.flags, v => last.flags.setValue(v));
applyIf(r.enabled, v => last.setActive(v));
applyIf(r.isFunc, v => last.setFunc(v));
});
if (rulesRegistry.length === 0) addRule();
}
// --- 8. TRIGGER UI UPDATES ---
applyIf(data?.source?.activeMode, v => {
isLoadingProject = false;
srcSelect.setValue(v);
srcSelect.emit('change', v);
isLoadingProject = true;
});
isLoadingProject = false;
setStatus('Project loaded');
} catch (err) {
alert("Load Error: " + err);
}
$fileInput.val('');
};
reader.readAsText(file);
});
if (CAN_MOVE || IS_ADMIN) {
togAdminEnable.on('change', function(val) {
if (!currentTitle) {
updateInterfaceMode();
return;
}
if (val) {
Editor.setValue(originalWikitext);
updateInterfaceMode();
renderDiff();
setStatus('Ready (Page actions)');
} else processPageContent();
});
}
if (CAN_MOVE) {
btnAdminMove.on('click', function() {
if (!currentVars['$xA']) {
mw.notify('Variable $xA not set', {
type: 'error'
});
return;
}
new mw.Api().postWithToken('csrf', {
action: 'move',
assert: 'user', //throw 'assertuserfailed' when logged-out
from: currentTitle,
to: currentVars['$xA'],
reason: inputSummary.getValue() + SUMMARY_SUFFIX,
movetalk: chkMovTalk.isSelected(),
movesubpages: chkMovSub.isSelected(),
noredirect: chkMovRedirect.isSelected()
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Move failed: ' + e));
});
}
if (IS_ADMIN) {
btnAdminDel.on('click', function() {
new mw.Api().postWithToken('csrf', {
action: 'delete',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
if (chkDelTalk.isSelected()) new mw.Api().postWithToken('csrf', {
action: 'delete',
title: mw.Title.newFromText(currentTitle).getTalkPage().getPrefixedText(),
reason: 'Talk page of deleted page'
});
removeTopLine();
loadNextPage();
}).catch(e => alert('Delete failed: ' + e));
});
btnAdminProt.on('click', function() {
var protections = [];
if (dropProtEdit.getValue()) protections.push('edit=' + dropProtEdit.getValue());
if (dropProtMove.getValue()) protections.push('move=' + dropProtMove.getValue());
new mw.Api().postWithToken('csrf', {
action: 'protect',
assert: 'user', //throw 'assertuserfailed' when logged-out
title: currentTitle,
protections: protections.join('|'),
expiry: inpProtExpiry.getValue() || 'infinite',
reason: inputSummary.getValue() + SUMMARY_SUFFIX
}).then(function() {
removeTopLine();
loadNextPage();
}).catch(e => alert('Protect failed: ' + e));
});
}
Editor.init();
resetPanels();
});
$(window).on('beforeunload', function() {
return "You have unsaved work.";
});
}).catch(e => console.error("wAwB Loader Error:", e));
//</nowiki>
rufgnyb127wbxgahs1xr34sffghpnat
Winter Olympics 2026
0
171914
750402
733694
2026-07-07T13:25:39Z
DMburugu (WMF)
61358
Added category
750402
wikitext
text/x-wiki
{{Infobox Olympic games
| Name = 2026 Winter Olympics
| Logo =
| Size = 250
| Host city = [[Milan]] and [[Cortina d'Ampezzo]], [[Italy]]
| Motto = IT's Your Vibe
| Nations = 92 (expected)
| Athletes = 2,871 (expected)<br>1,533 men, 1,338 women
| Events = 116 in 8 sports (16 disciplines)
| Opening = {{Start date|2026|2|6}}
| Closing = {{End date|2026|2|22}}
| Opened by =
| Cauldron =
| Stadium = [[San Siro]] (opening)<br>[[Verona Arena]] (closing)
| Winter = [[Pyeongchang 2018|Pyeongchang]]←<br>→[[Brisbane 2032|Brisbane]]
| Summer = [[Paris 2024|Paris]]←<br>→[[Los Angeles 2028|Los Angeles]]
}}
The '''2026 Winter Olympics''', officially the '''XXV Olympic Winter Games''' ({{lang-it|XXV Giochi olimpici invernali}}) and commonly known as '''Milano Cortina 2026''', is an upcoming international multi-sport event scheduled to take place from 6 to 22 February 2026 in the [[Italy|Italian]] cities of [[Milan]] and [[Cortina d'Ampezzo]], with preliminary events beginning on 4 February 2026.
The Games will mark several historic milestones for the [[Olympic Games|Olympic Movement]]. Milano Cortina 2026 will be the first Winter Olympics to be officially co-hosted by two cities, with events distributed across five venue clusters spanning approximately {{convert|22000|km2|sqmi|abbr=on}} of northern Italy.<ref name="olympics-overview">{{cite web|url=https://www.olympics.com/en/olympic-games/milano-cortina-2026|title=Milano Cortina 2026|publisher=International Olympic Committee|access-date=2025|date=Unknown date}}</ref> The Games will also feature the highest-ever proportion of female athletes at a Winter Olympics, with women comprising 47% of the expected 2,871 competitors from 92 nations.<ref name="gender-parity">{{cite news|url=https://www.reuters.com/sports/2026-winter-olympics-set-record-womens-participation-2024|title=2026 Winter Olympics set for record women's participation|publisher=Reuters|access-date=2024|date=Unknown date}}</ref> Additionally, the Games will witness the [[Olympic Games|Olympic]] debut of [[ski mountaineering]], bringing the total to 116 medal events across eight sports and 16 disciplines.<ref name="ski-mountaineering">{{cite web|url=https://www.olympics.com/en/news/ski-mountaineering-added-2026-winter-olympics|title=Ski mountaineering added to Milano Cortina 2026 programme|publisher=International Olympic Committee|access-date=2023|date=Unknown date}}</ref>
The hosting rights were awarded to Milan and Cortina d'Ampezzo on 24 June 2019, at the [[134th IOC Session]] in [[Lausanne]], [[Switzerland]], defeating the [[Stockholm]]–[[Åre]] bid from Sweden in the final round of voting.<ref name="host-selection">{{cite news|url=https://www.bbc.com/sport/winter-olympics/48750850|title=Milan and Cortina d'Ampezzo to host 2026 Winter Olympics|publisher=BBC Sport|date=24 June 2019|access-date=2019}}</ref> The successful Italian bid emphasized sustainability and legacy, proposing to utilize 13 existing venues and construct only one new permanent facility, aligning with the [[International Olympic Committee]]'s [[Olympic Agenda 2020]] reform initiatives.<ref name="sustainability-focus">{{cite news|url=https://www.theguardian.com/sport/2019/jun/24/milan-cortina-awarded-2026-winter-olympics|title=Milan-Cortina awarded 2026 Winter Olympics after presenting low-cost bid|publisher=The Guardian|date=24 June 2019}}</ref> This marks Italy's third time hosting the Winter Olympics, following [[1956 Winter Olympics|Cortina d'Ampezzo 1956]] and [[2006 Winter Olympics|Turin 2006]], and will be the fourth Olympics held in the country overall when including the [[1960 Summer Olympics|Rome 1960]] Summer Games.<ref name="italy-history">{{cite web|url=https://www.olympics.com/en/news/italy-olympic-games-history|title=Italy and the Olympic Games|publisher=International Olympic Committee|date=Unknown date}}</ref>
The opening ceremony is scheduled to take place on 6 February 2026, at Milan's [[San Siro|San Siro Stadium]], with an expected capacity of over 80,000 spectators under the thematic concept of "Armonia" (Harmony).<ref name="opening-ceremony">{{cite news|url=https://www.espn.com/olympics/story/_/id/39000000/2026-olympics-opening-ceremony-milan-san-siro|title=2026 Winter Olympics opening ceremony set for Milan's San Siro|publisher=ESPN|date=2024}}</ref> In another unprecedented move for the Winter Olympics, the closing ceremony will be held on 22 February 2026, at the historic [[Verona Arena]] in [[Verona]], marking the first time a Winter Games closing ceremony will occur outside the primary host city.<ref name="verona-closing">{{cite news|url=https://www.aljazeera.com/sports/2024/verona-arena-to-host-2026-winter-olympics-closing-ceremony|title=Verona Arena to host 2026 Winter Olympics closing ceremony|publisher=Al Jazeera|date=2024}}</ref> The Games will be marketed under the slogan "IT's Your Vibe," a dual reference to both Italy and the integration of information technology, with mascots Tina and Milo, two [[stoat]]s representing the Italian Alps.<ref name="branding">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-2026-unveils-mascots|title=Milano Cortina 2026 unveils mascots Tina and Milo|publisher=International Olympic Committee|date=2023}}</ref>
== Host city selection ==
=== Bidding process ===
The bidding process for the 2026 Winter Olympics was conducted under the [[International Olympic Committee]]'s reformed procedures established through [[Olympic Agenda 2020]], which aimed to make hosting the Games more financially sustainable and reduce the burden on candidate cities.<ref name="agenda2020">{{cite web|url=https://www.olympics.com/ioc/olympic-agenda-2020|title=Olympic Agenda 2020|publisher=International Olympic Committee|access-date=2023|date=Unknown date}}</ref> The IOC announced an invitation phase beginning in 2018, encouraging interested cities and National Olympic Committees to engage in a non-committal dialogue about potential bids without the pressure of a formal candidature.<ref name="invitation-phase">{{cite news|url=https://www.reuters.com/article/olympics-2026-bidding/ioc-launches-new-bidding-process-for-2026-winter-games-idUSL8N1TS3D2|title=IOC launches new bidding process for 2026 Winter Games|publisher=Reuters|date=2018}}</ref>
Initially, seven cities expressed interest in hosting the 2026 Winter Olympics: [[Sapporo]] ([[Japan]]), [[Calgary]] ([[Canada]]), [[Sion]] ([[Switzerland]]), [[Stockholm]]–[[Åre]] ([[Sweden]]), [[Graz]] ([[Austria]]), [[Erzurum]] ([[Turkey]]), and Milan–Cortina d'Ampezzo (Italy).<ref name="initial-candidates">{{cite news|url=https://www.bbc.com/sport/winter-olympics/43500000|title=Seven cities interested in hosting 2026 Winter Olympics|publisher=BBC Sport|date=2018}}</ref> However, the process was marked by an unprecedented wave of withdrawals driven by public opposition, financial concerns, and political considerations. Calgary withdrew following a November 2018 referendum in which 56.4% of voters rejected the bid, citing cost concerns and lack of public support.<ref name="calgary-referendum">{{cite news|url=https://www.theguardian.com/sport/2018/nov/14/calgary-2026-winter-olympics-bid-rejected-referendum|title=Calgary's 2026 Winter Olympics bid rejected in referendum|publisher=The Guardian|date=14 November 2018}}</ref> Sion's candidacy ended after Swiss voters rejected the necessary federal funding in a referendum, while Graz withdrew due to political opposition in the [[Styria|Styrian]] regional government.<ref name="european-withdrawals">{{cite news|url=https://www.aljazeera.com/sports/2018/multiple-cities-withdraw-2026-olympics-bids|title=Multiple cities withdraw 2026 Olympics bids amid costs concerns|publisher=Al Jazeera|date=2018}}</ref> Sapporo, Erzurum, and initially Turkey also withdrew to focus on future bids or due to insufficient support.<ref name="withdrawals">{{cite news|url=https://www.espn.com/olympics/story/_/id/25000000/cities-dropping-out-2026-winter-olympics-race|title=Cities dropping out of 2026 Winter Olympics race|publisher=ESPN|date=2018}}</ref>
By June 2019, only two candidates remained: Milan–Cortina d'Ampezzo from Italy and Stockholm–Åre from Sweden, making it the smallest field of finalists in Winter Olympic history since the modern bidding process began.<ref name="two-finalists">{{cite news|url=https://www.nbcsports.com/olympics/news/2026-winter-olympics-down-to-two-candidates|title=2026 Winter Olympics down to two candidates|publisher=NBC Sports|date=2019}}</ref> The extensive withdrawals reflected growing concerns about the financial and logistical burdens of hosting major sporting events, as well as increasing public scrutiny over the use of taxpayer funds for Olympic infrastructure.<ref name="bid-crisis">{{cite news|url=https://www.bloomberg.com/news/articles/2019-olympics-bid-crisis|title=The Olympics Has a Bid Problem. Can the IOC Fix It?|publisher=Bloomberg|date=2019}}</ref>
=== Candidature ===
The Italian bid, officially branded as "Milano Cortina 2026," was a joint proposal from the cities of [[Milan]], Italy's financial and fashion capital, and [[Cortina d'Ampezzo]], a renowned Alpine ski resort that previously hosted the [[1956 Winter Olympics]].<ref name="italian-bid">{{cite news|url=https://www.reuters.com/article/olympics-2026-italy/milan-cortina-join-forces-for-2026-winter-olympics-bid-idUSL8N1QB3F0|title=Milan, Cortina join forces for 2026 Winter Olympics bid|publisher=Reuters|date=2018}}</ref> The bid emphasized sustainability, legacy, and fiscal responsibility, proposing to use 13 existing venues with only one new permanent facility to be constructed, the [[Cortina d'Ampezzo#Olympic venues|Olympic Ice Stadium in Cortina d'Ampezzo]].<ref name="existing-venues">{{cite news|url=https://www.theguardian.com/sport/2019/jun/24/milan-cortina-awarded-2026-winter-olympics|title=Milan-Cortina awarded 2026 Winter Olympics after presenting low-cost bid|publisher=The Guardian|date=24 June 2019}}</ref> The total proposed budget was approximately €1.35 billion (US$1.5 billion), significantly lower than many previous Winter Olympics and positioned as a model of the IOC's cost-reduction initiatives.<ref name="budget">{{cite news|url=https://www.espn.com/olympics/story/_/id/27000000/milan-cortina-low-cost-bid-wins-2026-games|title=Milan-Cortina's low-cost bid wins 2026 Games|publisher=ESPN|date=2019}}</ref>
The Italian bid received strong support from the [[Italian National Olympic Committee]] (CONI) and the Italian government, which provided financial guarantees and committed to infrastructure improvements in the Alpine regions.<ref name="government-support">{{cite news|url=https://www.reuters.com/article/olympics-2026-italy-government/italian-government-backs-milan-cortina-2026-olympic-bid-idUSL8N21B3XY|title=Italian government backs Milan-Cortina 2026 Olympic bid|publisher=Reuters|date=2019}}</ref> The bid proposal highlighted Italy's strong winter sports tradition, existing expertise in hosting major international events, and the opportunity to showcase the country's diverse geography and culture. The bid also emphasized the benefits of distributing events across multiple venue clusters, which would allow for optimal use of existing world-class facilities while spreading economic benefits across northern Italy.<ref name="bid-advantages">{{cite web|url=https://www.olympics.com/ioc/news/milan-cortina-2026-candidature|title=Milan Cortina 2026 Candidature File|publisher=International Olympic Committee|date=2019}}</ref>
The competing Stockholm–Åre bid from Sweden similarly emphasized sustainability and the use of existing venues, with events distributed between the Swedish capital and the northern ski resort of Åre.<ref name="sweden-bid">{{cite news|url=https://www.bbc.com/sport/winter-olympics/48500000|title=Stockholm-Are bid for 2026 Winter Olympics|publisher=BBC Sport|date=2019}}</ref> However, the Swedish bid faced challenges including political divisions, concerns about the geographic distance between the two host cities (approximately {{convert|640|km|mi|abbr=on}} apart), and questions about public support and financial guarantees.<ref name="sweden-challenges">{{cite news|url=https://www.theguardian.com/sport/2019/jun/stockholm-are-olympic-challenges|title=Stockholm-Are faces challenges in 2026 Olympic race|publisher=The Guardian|date=2019}}</ref>
=== Selection ===
The final selection took place on 24 June 2019, at the [[134th IOC Session]] held at the [[Lausanne]] headquarters of the [[International Olympic Committee]] in Switzerland.<ref name="ioc-session">{{cite web|url=https://www.olympics.com/ioc/134-ioc-session|title=134th IOC Session|publisher=International Olympic Committee|date=2019}}</ref> Each candidate city delivered a 45-minute presentation to the IOC membership, followed by a question-and-answer session. The Italian delegation, led by [[Italian National Olympic Committee]] President [[Giovanni Malagò]] and including Milan Mayor [[Giuseppe Sala]] and Olympic champions, emphasized their sustainable approach, existing infrastructure, and passion for winter sports.<ref name="italian-presentation">{{cite news|url=https://www.espn.com/olympics/story/_/id/27000500/italy-makes-final-pitch-2026-winter-games|title=Italy makes final pitch for 2026 Winter Games|publisher=ESPN|date=24 June 2019}}</ref>
In the subsequent secret ballot vote by eligible IOC members, Milan–Cortina d'Ampezzo won decisively with 47 votes compared to 34 for Stockholm–Åre, with one abstention.<ref name="vote-results">{{cite news|url=https://www.bbc.com/sport/winter-olympics/48750850|title=Milan and Cortina d'Ampezzo to host 2026 Winter Olympics|publisher=BBC Sport|date=24 June 2019}}</ref> The result was announced by IOC President [[Thomas Bach]], who praised both bids for their alignment with Olympic Agenda 2020 principles and their commitment to sustainability.<ref name="bach-announcement">{{cite news|url=https://www.reuters.com/article/us-olympics-2026-idUSKCN1TP1GL|title=Italy's Milan-Cortina wins 2026 Winter Olympics vote|publisher=Reuters|date=24 June 2019}}</ref> The victory was celebrated across Italy, with officials expressing pride that the country would host the Winter Olympics for the third time and promising to deliver Games that would "set a new standard" for sustainability and legacy.<ref name="italy-reaction">{{cite news|url=https://www.theguardian.com/sport/2019/jun/24/italy-celebrates-winning-2026-winter-olympics-bid|title=Italy celebrates winning 2026 Winter Olympics bid|publisher=The Guardian|date=24 June 2019}}</ref>
Following the selection, the IOC, the Italian National Olympic Committee, and local organizing committee officials signed the Host City Contract, formally establishing the obligations and rights of all parties involved in organizing the Games.<ref name="host-contract">{{cite web|url=https://www.olympics.com/ioc/news/host-city-contract-signed-milano-cortina-2026|title=Host City Contract signed for Milano Cortina 2026|publisher=International Olympic Committee|date=2019}}</ref> The organizing committee, known as the Fondazione Milano Cortina 2026, was officially established in December 2019 to oversee all aspects of planning and executing the Games.<ref name="organizing-committee">{{cite news|url=https://www.reuters.com/article/olympics-2026-committee/milano-cortina-2026-organizing-committee-established-idUSL8N28F3D2|title=Milano Cortina 2026 organizing committee established|publisher=Reuters|date=2019}}</ref>
== Development and preparation ==
=== Venues ===
The 2026 Winter Olympics will utilize 14 competition venues spread across five geographic clusters in northern Italy, covering an area of approximately {{convert|22000|km2|sqmi|abbr=on}}.<ref name="venue-overview">{{cite web|url=https://www.olympics.com/en/olympic-games/milano-cortina-2026/venues|title=Milano Cortina 2026 Venues|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> This geographic distribution represents the most spread-out Winter Olympics in history, surpassing the previous record held by the [[2018 Winter Olympics]] in [[Pyeongchang]].<ref name="geographic-spread">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-2026-most-spread-out-winter-games-2024|title=Milan-Cortina 2026 to be most spread-out Winter Games|publisher=Reuters|date=2024}}</ref> In alignment with the IOC's sustainability initiatives, 13 of the 14 venues are existing facilities that will undergo renovations or temporary modifications, with only one new permanent venue to be constructed.<ref name="existing-infrastructure">{{cite news|url=https://www.theguardian.com/sport/2024/milan-cortina-sustainability-existing-venues|title=Milan-Cortina 2026 prioritizes existing venues for sustainability|publisher=The Guardian|date=2024}}</ref>
==== Milan cluster ====
The Milan cluster will host ice hockey, figure skating, short track speed skating, and speed skating events at venues in and around Italy's second-largest city.<ref name="milan-cluster">{{cite web|url=https://www.olympics.com/en/news/milan-cluster-venues-2026|title=Milan cluster venues for 2026|publisher=International Olympic Committee|date=2023}}</ref>
The '''[[PalaItalia Santa Giulia]]''', a new multi-purpose indoor arena under construction in Milan's Santa Giulia district, will serve as the primary ice hockey venue with a capacity of approximately 16,000 spectators during the Games.<ref name="palaitalia">{{cite news|url=https://www.espn.com/olympics/story/_/id/38000000/new-milan-arena-ice-hockey-2026-olympics|title=New Milan arena to host ice hockey at 2026 Olympics|publisher=ESPN|date=2023}}</ref> This facility represents the only new permanent venue being built specifically for the Games and will become a lasting legacy for Milan's sports infrastructure. Following the Olympics, it will serve as a venue for concerts, sports events, and other entertainment purposes.<ref name="palaitalia-legacy">{{cite news|url=https://www.reuters.com/sports/milan-new-arena-olympic-legacy-2024|title=Milan's new arena designed with Olympic legacy in mind|publisher=Reuters|date=2024}}</ref>
The '''[[Fiera Milano]]''' exhibition center in the Rho-Pero district will be temporarily converted to host figure skating and short track speed skating competitions.<ref name="fiera">{{cite web|url=https://www.olympics.com/en/news/fiera-milano-figure-skating-venue|title=Fiera Milano to host figure skating at 2026 Games|publisher=International Olympic Committee|date=2023}}</ref> The facility's large exhibition halls will be fitted with temporary ice rinks and seating for approximately 15,000 spectators, demonstrating the Games' commitment to using existing infrastructure creatively rather than building new permanent facilities.<ref name="fiera-temporary">{{cite news|url=https://www.theguardian.com/sport/2023/milan-exhibition-center-olympic-venue|title=Milan exhibition center to become temporary Olympic venue|publisher=The Guardian|date=2023}}</ref>
The '''[[Oval Lingotto|Torino Olympic Oval]]''' in nearby [[Turin]], approximately {{convert|140|km|mi|abbr=on}} from Milan, will be reused from the [[2006 Winter Olympics]] to host speed skating events.<ref name="oval">{{cite news|url=https://www.nbcsports.com/olympics/news/turin-oval-reused-2026-games|title=Turin Oval from 2006 to be reused for 2026 Games|publisher=NBC Sports|date=2023}}</ref> Originally built for the 2006 Games, this venue has been maintained as a training facility for Italian speed skaters and will undergo minor renovations to meet current Olympic standards.<ref name="oval-legacy">{{cite news|url=https://www.reuters.com/sports/2006-olympic-venues-still-use-2024|title=2006 Olympic venues still in use ahead of 2026 Games|publisher=Reuters|date=2024}}</ref>
==== Cortina d'Ampezzo cluster ====
The Cortina d'Ampezzo cluster, centered on the historic Alpine resort town that hosted the [[1956 Winter Olympics]], will feature venues for alpine skiing, curling, bobsled, luge, and skeleton events.<ref name="cortina-cluster">{{cite web|url=https://www.olympics.com/en/news/cortina-cluster-venues-2026|title=Cortina d'Ampezzo cluster venues|publisher=International Olympic Committee|date=2023}}</ref>
The '''[[Tofane|Tofana]]''' ski area will host the women's alpine skiing speed events (downhill and super-G) on the famous '''Olympia delle Tofane''' course, which hosted alpine skiing during the 1956 Winter Olympics.<ref name="tofana">{{cite news|url=https://www.espn.com/olympics/story/_/id/37500000/cortina-historic-tofana-course-womens-alpine|title=Cortina's historic Tofana course set for women's alpine skiing|publisher=ESPN|date=2023}}</ref> The course will undergo significant upgrades to meet modern [[International Ski Federation]] (FIS) standards while preserving its historic character.<ref name="tofana-upgrades">{{cite news|url=https://www.reuters.com/sports/winter/cortina-tofana-course-upgrades-2026-2024|title=Cortina's Tofana course receives upgrades for 2026|publisher=Reuters|date=2024}}</ref>
The '''Cortina Sliding Centre''' at [[Eugenio Monti Olympic Track|Eugenio Monti track]], originally built for the 1956 Games but demolished in 1962, will be reconstructed to host bobsled, luge, and skeleton competitions.<ref name="sliding-centre">{{cite news|url=https://www.theguardian.com/sport/2023/cortina-sliding-track-reconstruction|title=Cortina rebuilding sliding track for 2026 Olympics|publisher=The Guardian|date=2023}}</ref> The reconstruction has been subject to environmental concerns and debates about the necessity of the facility, but organizers have committed to building a modern, sustainable track that can serve as a training venue for Italian athletes after the Games.<ref name="sliding-controversy">{{cite news|url=https://www.aljazeera.com/sports/2024/cortina-sliding-track-environmental-concerns|title=Environmental concerns raised over Cortina sliding track|publisher=Al Jazeera|date=2024}}</ref>
The '''Stadio Olimpico del Ghiaccio''' (Olympic Ice Stadium), a renovation and expansion of the historic 1956 ice venue, will host curling competitions with seating for approximately 3,500 spectators.<ref name="curling-venue">{{cite web|url=https://www.olympics.com/en/news/cortina-curling-venue-renovation|title=Cortina curling venue receives renovation|publisher=International Olympic Committee|date=2023}}</ref>
==== Valtellina cluster ====
The Valtellina cluster, located in the [[Valtellina]] valley in the [[Lombardy]] region, will host alpine skiing technical events, freestyle skiing, snowboarding, and the debut Olympic sport of ski mountaineering across venues in [[Bormio]] and [[Livigno]].<ref name="valtellina-cluster">{{cite web|url=https://www.olympics.com/en/news/valtellina-cluster-venues|title=Valtellina cluster to host multiple snow sports|publisher=International Olympic Committee|date=2023}}</ref>
The '''[[Bormio|Stelvio]]''' slope in Bormio will host the men's alpine skiing speed events (downhill and super-G), featuring one of the most challenging and iconic downhill courses on the [[FIS Alpine Ski World Cup]] circuit.<ref name="bormio">{{cite news|url=https://www.espn.com/olympics/story/_/id/38500000/bormio-stelvio-course-mens-alpine-2026|title=Bormio's Stelvio course ready for men's alpine skiing|publisher=ESPN|date=2024}}</ref> The course has regularly hosted World Cup races and has undergone continuous improvements to maintain its status as one of the premier downhill venues in the world.<ref name="stelvio-legacy">{{cite news|url=https://www.reuters.com/sports/alpine/bormio-stelvio-one-worlds-great-downhills-2024|title=Bormio's Stelvio: One of the world's great downhills|publisher=Reuters|date=2024}}</ref>
The '''Mottolino Fun Mountain''' in [[Livigno]] will host freestyle skiing and snowboarding events including halfpipe, slopestyle, and snowboard cross.<ref name="livigno">{{cite web|url=https://www.olympics.com/en/news/livigno-freestyle-snowboard-venue|title=Livigno to host freestyle and snowboard events|publisher=International Olympic Committee|date=2023}}</ref> Located at high altitude (approximately {{convert|2800|m|ft|abbr=on}}), the venue benefits from excellent natural snow conditions and has hosted numerous international competitions in recent years.<ref name="livigno-altitude">{{cite news|url=https://www.theguardian.com/sport/2024/livigno-high-altitude-snow-sports|title=Livigno's high altitude ensures quality snow conditions|publisher=The Guardian|date=2024}}</ref>
Livigno will also host the inaugural Olympic ski mountaineering competitions, featuring both individual and sprint events for men and women, as well as a mixed relay.<ref name="ski-mountaineering-venue">{{cite news|url=https://www.espn.com/olympics/story/_/id/39500000/livigno-host-debut-ski-mountaineering-2026|title=Livigno to host debut ski mountaineering at 2026 Olympics|publisher=ESPN|date=2024}}</ref> The sport's inclusion represents a significant milestone for mountain sports and is expected to showcase the endurance and technical skills required for competitive ski mountaineering.<ref name="ski-mountaineering-debut">{{cite web|url=https://www.olympics.com/en/news/ski-mountaineering-olympic-debut-2026|title=Ski mountaineering makes Olympic debut in 2026|publisher=International Olympic Committee|date=2023}}</ref>
==== Val di Fiemme cluster ====
The Val di Fiemme cluster in the [[Trentino]] region will host all Nordic skiing events, including cross-country skiing, ski jumping, and Nordic combined, at venues previously used during the [[2013 FIS Nordic World Ski Championships]].<ref name="fiemme-cluster">{{cite web|url=https://www.olympics.com/en/news/val-di-fiemme-nordic-skiing|title=Val di Fiemme to host Nordic skiing events|publisher=International Olympic Committee|date=2023}}</ref>
The '''Stadio del Trampolino''' in [[Predazzo]] will host ski jumping events, while the '''Stadio del Fondo''' in nearby [[Lago di Tesero]] will serve as the cross-country skiing venue.<ref name="nordic-venues">{{cite news|url=https://www.reuters.com/sports/nordic/val-di-fiemme-reuses-world-championship-venues-2024|title=Val di Fiemme reuses World Championship venues for 2026|publisher=Reuters|date=2024}}</ref> These facilities have been regularly maintained and upgraded since hosting the 2013 World Championships and are considered among the finest Nordic skiing venues in the world.<ref name="nordic-quality">{{cite news|url=https://www.nbcsports.com/olympics/news/val-di-fiemme-world-class-nordic-venues|title=Val di Fiemme offers world-class Nordic venues|publisher=NBC Sports|date=2024}}</ref> Nordic combined events will utilize both venues, with ski jumping at Predazzo and cross-country skiing at Lago di Tesero.<ref name="nordic-combined">{{cite web|url=https://www.olympics.com/en/news/nordic-combined-venues-2026|title=Nordic combined to use multiple venues|publisher=International Olympic Committee|date=2023}}</ref>
The '''Biathlon Stadium''' in [[Tesero|Lago di Tesero]] will host all biathlon competitions, featuring world-class shooting ranges and cross-country loops that have been used for numerous international competitions.<ref name="biathlon">{{cite news|url=https://www.espn.com/olympics/story/_/id/38800000/tesero-biathlon-stadium-ready-2026|title=Tesero biathlon stadium ready for 2026 Olympics|publisher=ESPN|date=2024}}</ref>
==== Other venues ====
The '''[[Verona Arena]]''' in [[Verona]], approximately {{convert|200|km|mi|abbr=on}} from Milan, will host the closing ceremony on 22 February 2026.<ref name="verona">{{cite news|url=https://www.aljazeera.com/sports/2024/verona-arena-closing-ceremony|title=Historic Verona Arena to host 2026 closing ceremony|publisher=Al Jazeera|date=2024}}</ref> This ancient Roman amphitheater, built in 30 AD and one of the best-preserved ancient structures of its kind, represents a unique venue choice that highlights Italy's rich cultural heritage.<ref name="verona-history">{{cite news|url=https://www.theguardian.com/sport/2024/verona-arena-ancient-olympic-venue|title=Ancient Verona Arena brings history to modern Olympics|publisher=The Guardian|date=2024}}</ref> The selection of Verona for the closing ceremony marks the first time a Winter Olympics closing ceremony will take place outside the primary host city, emphasizing the distributed nature of these Games.<ref name="verona-first">{{cite news|url=https://www.reuters.com/sports/olympics/verona-first-closing-ceremony-outside-host-city-2024|title=Verona: First closing ceremony outside host city|publisher=Reuters|date=2024}}</ref>
The '''[[San Siro]]''' stadium (officially Stadio Giuseppe Meazza) in Milan will host the opening ceremony on 6 February 2026.<ref name="san-siro">{{cite news|url=https://www.espn.com/olympics/story/_/id/39000000/san-siro-opening-ceremony-2026|title=Milan's San Siro to host opening ceremony|publisher=ESPN|date=2024}}</ref> With a capacity of over 80,000, it is one of the largest and most iconic football stadiums in Europe, home to both [[A.C. Milan]] and [[Inter Milan]].<ref name="san-siro-capacity">{{cite news|url=https://www.nbcsports.com/olympics/news/san-siro-stadium-massive-opening-ceremony|title=San Siro's massive capacity for opening ceremony|publisher=NBC Sports|date=2024}}</ref> The stadium will be temporarily adapted for the ceremony with special staging, lighting, and production elements to deliver the "Armonia" (Harmony) themed spectacle.<ref name="san-siro-adaptation">{{cite news|url=https://www.reuters.com/sports/olympics/san-siro-adapted-olympic-ceremony-2024|title=San Siro to be adapted for Olympic opening ceremony|publisher=Reuters|date=2024}}</ref>
=== Olympic Villages ===
Two Olympic Villages will accommodate athletes and team officials during the Games, reflecting the dual-city hosting model.<ref name="villages-overview">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-olympic-villages|title=Milano Cortina 2026 Olympic Villages|publisher=International Olympic Committee|date=2024}}</ref>
The '''Milan Olympic Village''' will be constructed in the Santa Giulia district near the PalaItalia arena, providing accommodation for approximately 1,800 athletes competing in ice sports.<ref name="milan-village">{{cite news|url=https://www.reuters.com/sports/milan-olympic-village-construction-2024|title=Milan Olympic Village under construction|publisher=Reuters|date=2024}}</ref> The village is being designed with post-Games conversion in mind, with the residential units planned for conversion into affordable housing and student accommodation following the Olympics, ensuring a positive long-term legacy for the city.<ref name="milan-village-legacy">{{cite news|url=https://www.theguardian.com/sport/2024/milan-olympic-village-housing-legacy|title=Milan Olympic Village designed for housing legacy|publisher=The Guardian|date=2024}}</ref>
The '''Cortina Olympic Village''' will accommodate approximately 1,000 athletes participating in mountain sports events in Cortina d'Ampezzo and surrounding areas.<ref name="cortina-village">{{cite news|url=https://www.espn.com/olympics/story/_/id/39200000/cortina-olympic-village-mountain-athletes|title=Cortina Olympic Village for mountain athletes|publisher=ESPN|date=2024}}</ref> Given the smaller scale and the resort nature of Cortina, the village will utilize a combination of new construction and existing hotel facilities, with plans for the new structures to serve as tourist accommodation after the Games.<ref name="cortina-village-plans">{{cite news|url=https://www.reuters.com/sports/cortina-village-mixed-use-approach-2024|title=Cortina village takes mixed-use approach|publisher=Reuters|date=2024}}</ref>
Both villages will feature comprehensive amenities including dining halls, medical facilities, recreation areas, training facilities, and religious/meditation spaces, designed to meet the needs of athletes from diverse cultural backgrounds.<ref name="village-amenities">{{cite web|url=https://www.olympics.com/en/news/olympic-village-amenities-2026|title=Olympic Village amenities for Milano Cortina 2026|publisher=International Olympic Committee|date=2024}}</ref> Sustainability is a key focus, with both villages incorporating renewable energy systems, waste reduction programs, and environmentally friendly construction materials.<ref name="village-sustainability">{{cite news|url=https://www.theguardian.com/sport/2024/milan-cortina-sustainable-olympic-villages|title=Milano Cortina prioritizes sustainable Olympic Villages|publisher=The Guardian|date=2024}}</ref>
=== Torch relay ===
The Olympic torch relay for the 2026 Winter Olympics will traverse Italy, showcasing the country's diverse landscapes, cultural heritage, and sporting traditions.<ref name="torch-relay-overview">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-2026-torch-relay|title=Milano Cortina 2026 Olympic Torch Relay|publisher=International Olympic Committee|date=2024}}</ref> Detailed route information will be announced closer to the Games, but organizers have confirmed the relay will visit all 20 Italian regions, emphasizing national unity and the shared excitement of hosting the Olympics.<ref name="torch-national">{{cite news|url=https://www.reuters.com/sports/olympics/italy-torch-relay-visit-all-regions-2024|title=Italy torch relay to visit all regions|publisher=Reuters|date=2024}}</ref>
The torch design for Milano Cortina 2026 draws inspiration from Italian design excellence, Alpine landscapes, and sustainable materials, though the specific design details have not yet been publicly revealed.<ref name="torch-design">{{cite news|url=https://www.espn.com/olympics/story/_/id/39800000/2026-olympic-torch-italian-design-inspiration|title=2026 Olympic torch draws Italian design inspiration|publisher=ESPN|date=2024}}</ref> Organizers have indicated that sustainability will be a core principle of the torch relay, with measures to minimize environmental impact including the use of renewable fuels and carbon offset programs.<ref name="torch-sustainability">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-torch-relay-sustainability|title=Olympic torch relay emphasizes sustainability|publisher=The Guardian|date=2024}}</ref>
The relay is expected to include notable Italian athletes, cultural figures, and community heroes as torchbearers, celebrating Italy's Olympic heritage and inspiring the next generation of athletes.<ref name="torchbearers">{{cite news|url=https://www.nbcsports.com/olympics/news/italy-torch-relay-notable-bearers|title=Italy torch relay to feature notable bearers|publisher=NBC Sports|date=2024}}</ref> The torch will arrive at San Siro Stadium on 6 February 2026, for the lighting of the Olympic cauldron during the opening ceremony.<ref name="torch-arrival">{{cite web|url=https://www.olympics.com/en/news/torch-arrives-opening-ceremony-2026|title=Olympic torch arrives for opening ceremony|publisher=International Olympic Committee|date=2024}}</ref>
=== Medal design ===
The medals for the 2026 Winter Olympics were officially unveiled in December 2024, featuring a distinctive design that celebrates Italian craftsmanship, Alpine nature, and Olympic values.<ref name="medals-unveiled">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-unveils-2026-olympic-medals-2024|title=Milan-Cortina unveils 2026 Olympic medal design|publisher=Reuters|date=2024}}</ref> Each medal incorporates elements representing the mountains, glaciers, and snow that define winter sports, with subtle references to Italian art and design traditions.<ref name="medal-design-elements">{{cite news|url=https://www.espn.com/olympics/story/_/id/40000000/2026-olympic-medals-italian-alpine-inspiration|title=2026 Olympic medals feature Italian and Alpine inspiration|publisher=ESPN|date=2024}}</ref>
The medals are made from responsibly sourced metals, with gold medals consisting of silver gilt with at least 6 grams of pure gold plating, silver medals made of pure silver, and bronze medals made of copper alloy, all conforming to IOC regulations.<ref name="medal-composition">{{cite web|url=https://www.olympics.com/ioc/olympic-medals-specifications|title=Olympic Medal Specifications|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> In keeping with the sustainability theme of the Games, organizers have emphasized the use of recycled metals where possible and ethical sourcing practices for all materials.<ref name="medal-sustainability">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-medals-recycled-materials|title=Olympic medals emphasize recycled and sustainable materials|publisher=The Guardian|date=2024}}</ref>
The reverse side of each medal features the Milano Cortina 2026 logo, while the obverse includes the traditional Olympic rings and unique design elements specific to these Games.<ref name="medal-sides">{{cite news|url=https://www.aljazeera.com/sports/2024/milan-cortina-medal-design-details|title=Milan-Cortina medal design details revealed|publisher=Al Jazeera|date=2024}}</ref> Each medal weighs approximately 500-600 grams and measures around 85mm in diameter, suspended from a specially designed ribbon featuring the Games' color palette.<ref name="medal-specs">{{cite news|url=https://www.nbcsports.com/olympics/news/2026-olympic-medal-specifications|title=2026 Olympic medal specifications announced|publisher=NBC Sports|date=2024}}</ref>
=== Sustainability initiatives ===
Sustainability is a cornerstone of the Milano Cortina 2026 Games, with organizers implementing comprehensive environmental initiatives aligned with the IOC's [[Olympic Agenda 2020+5]] and the [[United Nations Sustainable Development Goals]].<ref name="sustainability-overview">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-2026-sustainability|title=Milano Cortina 2026 Sustainability Strategy|publisher=International Olympic Committee|date=2023}}</ref> The Games aim to achieve carbon neutrality through a combination of emissions reduction, renewable energy use, and offset programs.<ref name="carbon-neutral">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-targets-carbon-neutral-games-2024|title=Milan-Cortina targets carbon-neutral Games|publisher=Reuters|date=2024}}</ref>
The decision to use 13 existing venues and build only one new permanent facility represents one of the most significant sustainability achievements, dramatically reducing the embodied carbon associated with construction and ensuring minimal environmental impact.<ref name="existing-venues-impact">{{cite news|url=https://www.theguardian.com/sport/2024/milan-cortina-existing-venues-environmental-benefit|title=Existing venues provide major environmental benefit|publisher=The Guardian|date=2024}}</ref> This approach also ensures that the Games leave a positive legacy without creating "white elephant" venues that may be underutilized after the Olympics.<ref name="legacy-venues">{{cite news|url=https://www.bloomberg.com/news/articles/2024-olympic-venues-legacy-planning|title=Olympic venues designed with legacy in mind|publisher=Bloomberg|date=2024}}</ref>
Transportation is another key focus area, with organizers prioritizing public transit, electric and hydrogen-powered buses, and rail connections between venues to minimize emissions from spectator and athlete travel.<ref name="sustainable-transport">{{cite news|url=https://www.espn.com/olympics/story/_/id/39600000/milan-cortina-sustainable-transportation-plan|title=Milan-Cortina unveils sustainable transportation plan|publisher=ESPN|date=2024}}</ref> High-speed rail connections between Milan and the mountain venues will be enhanced, and shuttle services will utilize low-emission vehicles.<ref name="rail-connections">{{cite news|url=https://www.reuters.com/sports/olympics/italy-invests-rail-connections-2026-games-2024|title=Italy invests in rail connections for 2026 Games|publisher=Reuters|date=2024}}</ref>
Renewable energy will power all Olympic venues, with solar panels, wind energy, and hydroelectric power sources utilized throughout the Games.<ref name="renewable-energy">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-venues-renewable-energy|title=Olympic venues to run on 100% renewable energy|publisher=The Guardian|date=2024}}</ref> Waste management programs will emphasize reduction, reuse, and recycling, with a goal of diverting at least 75% of waste from landfills.<ref name="waste-management">{{cite news|url=https://www.aljazeera.com/sports/2024/olympic-waste-reduction-targets|title=Olympics sets ambitious waste reduction targets|publisher=Al Jazeera|date=2024}}</ref>
The organizing committee has also committed to sustainable procurement practices, favoring local suppliers, seasonal food products, and environmentally certified goods and services.<ref name="sustainable-procurement">{{cite web|url=https://www.olympics.com/en/news/sustainable-procurement-2026-games|title=Sustainable procurement for 2026 Games|publisher=International Olympic Committee|date=2024}}</ref> Food services at Olympic venues will feature predominantly plant-based options, locally sourced ingredients, and efforts to minimize food waste.<ref name="food-services">{{cite news|url=https://www.nbcsports.com/olympics/news/olympic-food-services-sustainability|title=Olympic food services emphasize sustainability|publisher=NBC Sports|date=2024}}</ref>
Climate considerations have been central to planning, with organizers developing contingency plans for potential snow reliability issues due to climate change.<ref name="climate-planning">{{cite news|url=https://www.reuters.com/sports/olympics/climate-change-planning-winter-olympics-2024|title=Climate change considerations in Winter Olympics planning|publisher=Reuters|date=2024}}</ref> While most venues benefit from high altitude and historically reliable natural snow conditions, snowmaking capabilities have been enhanced at key venues as a precautionary measure, using energy-efficient systems and sustainable water management practices.<ref name="snowmaking">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-venues-sustainable-snowmaking|title=Olympic venues invest in sustainable snowmaking|publisher=The Guardian|date=2024}}</ref>
== The Games ==
=== Opening ceremony ===
The opening ceremony of the 2026 Winter Olympics is scheduled to take place on Friday, 6 February 2026, at the [[San Siro]] stadium (officially Stadio Giuseppe Meazza) in [[Milan]], beginning at 20:00 [[Central European Time|CET]].<ref name="opening-ceremony-details">{{cite news|url=https://www.espn.com/olympics/story/_/id/39000000/2026-olympics-opening-ceremony-milan-san-siro|title=2026 Winter Olympics opening ceremony set for Milan's San Siro|publisher=ESPN|date=2024}}</ref> With a capacity exceeding 80,000 spectators, the iconic football stadium—home to both [[A.C. Milan]] and [[Inter Milan]]—will provide one of the largest opening ceremony venues in Winter Olympics history.<ref name="ceremony-capacity">{{cite news|url=https://www.nbcsports.com/olympics/news/san-siro-stadium-massive-opening-ceremony|title=San Siro's massive capacity for opening ceremony|publisher=NBC Sports|date=2024}}</ref>
The ceremony will be produced under the artistic concept of '''Armonia''' (Harmony), emphasizing themes of unity, diversity, cultural exchange, and the harmonious relationship between humanity and nature.<ref name="armonia-theme">{{cite news|url=https://www.reuters.com/sports/olympics/milan-2026-opening-ceremony-armonia-theme-2024|title=Milan 2026 opening ceremony embraces 'Armonia' theme|publisher=Reuters|date=2024}}</ref> Creative director [[Marco Balich]], an Italian producer known for his work on previous Olympic ceremonies including [[2006 Winter Olympics|Turin 2006]], [[2016 Summer Olympics|Rio 2016]], and [[2022 Winter Olympics|Beijing 2022]], will lead the artistic vision for the ceremony.<ref name="balich-director">{{cite news|url=https://www.theguardian.com/sport/2023/marco-balich-2026-opening-ceremony|title=Marco Balich to direct 2026 Olympic opening ceremony|publisher=The Guardian|date=2023}}</ref>
The ceremony is expected to showcase Italy's rich cultural heritage, from ancient Roman civilization through the Renaissance to contemporary contributions in art, music, fashion, design, and cinema.<ref name="italian-culture">{{cite news|url=https://www.aljazeera.com/sports/2024/olympic-ceremony-showcase-italian-culture|title=Olympic ceremony to showcase Italian cultural heritage|publisher=Al Jazeera|date=2024}}</ref> Alpine traditions, winter sports history, and Italy's mountainous landscapes will feature prominently, celebrating the connection between Italian identity and the winter environment.<ref name="alpine-traditions">{{cite news|url=https://www.espn.com/olympics/story/_/id/40100000/olympic-ceremony-celebrate-alpine-traditions|title=Olympic ceremony to celebrate Alpine traditions|publisher=ESPN|date=2024}}</ref> Musical performances are expected to blend classical Italian compositions with contemporary artists, representing Italy's influential music scene across multiple generations and genres.<ref name="ceremony-music">{{cite news|url=https://www.reuters.com/sports/olympics/olympic-ceremony-blend-classical-contemporary-music-2024|title=Olympic ceremony to blend classical and contemporary music|publisher=Reuters|date=2024}}</ref>
The traditional [[Parade of Nations]] will see athletes from approximately 92 countries enter the stadium, led by [[Greece]] (as per Olympic tradition) and concluding with the host nation Italy.<ref name="parade-of-nations">{{cite web|url=https://www.olympics.com/ioc/olympic-ceremonies-protocol|title=Olympic Ceremonies Protocol|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The ceremony will include the formal speeches by the president of the organizing committee and [[International Olympic Committee]] President [[Kirsty Coventry]], who will preside over her first Olympics as IOC President following her election in 2025.<ref name="coventry-first">{{cite news|url=https://www.nbcsports.com/olympics/news/kirsty-coventry-first-olympics-ioc-president|title=Kirsty Coventry's first Olympics as IOC President|publisher=NBC Sports|date=2025}}</ref>
The lighting of the Olympic cauldron will serve as the ceremony's climax, though the identity of the final torchbearer traditionally remains secret until the moment of lighting.<ref name="cauldron-lighting">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-cauldron-lighting-speculation|title=Speculation builds over Olympic cauldron lighter|publisher=The Guardian|date=2024}}</ref> Italy's rich Olympic heritage offers numerous possibilities, with legendary winter sports athletes from Italian history considered potential candidates to light the flame that will burn throughout the 17-day celebration.<ref name="italian-legends">{{cite news|url=https://www.espn.com/olympics/story/_/id/40200000/italian-olympic-legends-cauldron-candidates|title=Italian Olympic legends among cauldron lighting candidates|publisher=ESPN|date=2024}}</ref>
The ceremony will be broadcast live to a global audience expected to exceed one billion viewers across all platforms, representing the first opportunity for the world to experience the Milano Cortina 2026 vision.<ref name="global-broadcast">{{cite news|url=https://www.reuters.com/sports/olympics/opening-ceremony-expected-reach-billion-viewers-2024|title=Opening ceremony expected to reach billion viewers|publisher=Reuters|date=2024}}</ref> Sustainability considerations have been integrated into the ceremony production, with efforts to minimize waste, utilize renewable energy, and reduce the environmental footprint of this large-scale event.<ref name="ceremony-sustainability">{{cite news|url=https://www.theguardian.com/sport/2024/sustainable-olympic-opening-ceremony|title=Sustainable practices in Olympic opening ceremony|publisher=The Guardian|date=2024}}</ref>
=== Sports ===
The 2026 Winter Olympics will feature 116 medal events across eight sports and 16 disciplines, representing a slight increase from the [[2022 Winter Olympics|Beijing 2022]] program and including the debut of [[ski mountaineering]] as an Olympic sport.<ref name="sports-overview">{{cite web|url=https://www.olympics.com/en/olympic-games/milano-cortina-2026/sports|title=Milano Cortina 2026 Sports Programme|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The Games will feature the highest proportion of women's events in Winter Olympics history, with 47% of all athletes expected to be women, marking continued progress toward gender equality in Olympic sport.<ref name="gender-equality">{{cite news|url=https://www.reuters.com/sports/2026-winter-olympics-set-record-womens-participation-2024|title=2026 Winter Olympics set for record women's participation|publisher=Reuters|date=2024}}</ref>
==== Alpine skiing ====
[[Alpine skiing at the 2026 Winter Olympics|Alpine skiing]] will feature 11 medal events (5 men's, 5 women's, and 1 mixed), held across venues in [[Cortina d'Ampezzo]] and [[Bormio]].<ref name="alpine-skiing">{{cite web|url=https://www.olympics.com/en/sports/alpine-skiing|title=Alpine Skiing|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Men's speed events (downhill, super-G, and combined) will take place on the legendary Stelvio course in Bormio, known as one of the most challenging downhill courses in the world.<ref name="stelvio">{{cite news|url=https://www.espn.com/olympics/story/_/id/38500000/bormio-stelvio-course-mens-alpine-2026|title=Bormio's Stelvio course ready for men's alpine skiing|publisher=ESPN|date=2024}}</ref> Women's speed events will be held on the Olympia delle Tofane course in Cortina, which hosted alpine skiing at the [[1956 Winter Olympics]].<ref name="tofane">{{cite news|url=https://www.reuters.com/sports/alpine/cortina-tofane-course-womens-alpine-2024|title=Cortina's Tofane course for women's alpine skiing|publisher=Reuters|date=2024}}</ref> Technical events (slalom and giant slalom) for both genders, as well as the mixed team parallel event, will also be contested at these historic venues.<ref name="alpine-technical">{{cite web|url=https://www.olympics.com/en/news/alpine-skiing-technical-events-2026|title=Alpine skiing technical events at 2026 Games|publisher=International Olympic Committee|date=2024}}</ref>
==== Biathlon ====
[[Biathlon at the 2026 Winter Olympics|Biathlon]] will consist of 11 medal events (5 men's, 5 women's, and 1 mixed relay), held at the Biathlon Stadium in [[Tesero|Lago di Tesero]] in the [[Val di Fiemme]].<ref name="biathlon">{{cite web|url=https://www.olympics.com/en/sports/biathlon|title=Biathlon|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The program includes individual races, sprint races, pursuit races, mass start events, and relay competitions, testing athletes' abilities in both cross-country skiing and rifle shooting.<ref name="biathlon-events">{{cite news|url=https://www.espn.com/olympics/story/_/id/38800000/biathlon-events-2026-olympics|title=Biathlon events at 2026 Olympics|publisher=ESPN|date=2024}}</ref>
==== Bobsled ====
[[Bobsled at the 2026 Winter Olympics|Bobsled]] will feature 4 medal events: two-man, two-woman, four-man, and the monobob (women's solo event introduced at Beijing 2022).<ref name="bobsled">{{cite web|url=https://www.olympics.com/en/sports/bobsled|title=Bobsled|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Competitions will take place at the reconstructed Cortina Sliding Centre, built on the site of the original 1956 track.<ref name="sliding-centre">{{cite news|url=https://www.reuters.com/sports/bobsled/cortina-sliding-centre-ready-2026-2024|title=Cortina Sliding Centre ready for 2026|publisher=Reuters|date=2024}}</ref>
==== Cross-country skiing ====
[[Cross-country skiing at the 2026 Winter Olympics|Cross-country skiing]] will include 12 medal events (6 men's, 6 women's), held at the Stadio del Fondo in Lago di Tesero.<ref name="cross-country">{{cite web|url=https://www.olympics.com/en/sports/cross-country-skiing|title=Cross-country Skiing|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The program encompasses various distances and formats, including sprint, distance, skiathlon, and relay events, showcasing the endurance and technique of elite Nordic skiers.<ref name="cross-country-events">{{cite news|url=https://www.theguardian.com/sport/2024/cross-country-skiing-events-2026|title=Cross-country skiing events at 2026 Olympics|publisher=The Guardian|date=2024}}</ref>
==== Curling ====
[[Curling at the 2026 Winter Olympics|Curling]] will feature 3 medal events: men's tournament, women's tournament, and mixed doubles, held at the Stadio Olimpico del Ghiaccio in Cortina d'Ampezzo.<ref name="curling">{{cite web|url=https://www.olympics.com/en/sports/curling|title=Curling|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Each tournament features round-robin play followed by medal playoffs, with teams competing for Olympic glory in this strategy-intensive ice sport.<ref name="curling-format">{{cite news|url=https://www.nbcsports.com/olympics/news/curling-format-2026-olympics|title=Curling format for 2026 Olympics|publisher=NBC Sports|date=2024}}</ref>
==== Figure skating ====
[[Figure skating at the 2026 Winter Olympics|Figure skating]] will consist of 5 medal events: men's singles, women's singles, pairs, ice dance, and team event.<ref name="figure-skating">{{cite web|url=https://www.olympics.com/en/sports/figure-skating|title=Figure Skating|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Competitions will be held at the Fiera Milano exhibition center, temporarily converted into a figure skating venue.<ref name="fiera-figure-skating">{{cite news|url=https://www.espn.com/olympics/story/_/id/40300000/fiera-milano-figure-skating-venue-2026|title=Fiera Milano hosts figure skating at 2026 Games|publisher=ESPN|date=2024}}</ref> The team event, introduced at the [[2014 Winter Olympics|Sochi 2014]] Games, features multiple nations competing across all four disciplines with combined scoring determining medal winners.<ref name="team-event">{{cite news|url=https://www.reuters.com/sports/figure-skating/team-event-highlights-2026-program-2024|title=Team event highlights 2026 figure skating program|publisher=Reuters|date=2024}}</ref>
==== Freestyle skiing ====
[[Freestyle skiing at the 2026 Winter Olympics|Freestyle skiing]] will include 13 medal events across multiple disciplines: moguls, aerials, ski cross, halfpipe, slopestyle, and big air.<ref name="freestyle">{{cite web|url=https://www.olympics.com/en/sports/freestyle-skiing|title=Freestyle Skiing|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Most events will take place at the Mottolino Fun Mountain in [[Livigno]], known for its excellent terrain parks and halfpipe facilities.<ref name="livigno-freestyle">{{cite news|url=https://www.theguardian.com/sport/2024/livigno-freestyle-skiing-venue|title=Livigno to host freestyle skiing at 2026 Olympics|publisher=The Guardian|date=2024}}</ref> The diverse freestyle program showcases the creativity, technical skill, and aerial prowess of winter sports' most progressive athletes.<ref name="freestyle-diversity">{{cite news|url=https://www.espn.com/olympics/story/_/id/40400000/freestyle-skiing-diverse-program-2026|title=Freestyle skiing's diverse program at 2026 Games|publisher=ESPN|date=2024}}</ref>
==== Ice hockey ====
[[Ice hockey at the 2026 Winter Olympics|Ice hockey]] will feature 2 medal events: men's tournament and women's tournament, with preliminary and playoff games held at multiple venues including the PalaItalia in Milan.<ref name="ice-hockey">{{cite web|url=https://www.olympics.com/en/sports/ice-hockey|title=Ice Hockey|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The men's tournament is expected to feature participation from [[National Hockey League|NHL]] players, marking their return to Olympic competition after sitting out the [[2018 Winter Olympics|PyeongChang 2018]] and [[2022 Winter Olympics|Beijing 2022]] Games due to scheduling conflicts and pandemic-related concerns.<ref name="nhl-return">{{cite news|url=https://www.espn.com/olympics/story/_/id/40500000/nhl-players-return-2026-olympics|title=NHL players confirmed for return to 2026 Olympics|publisher=ESPN|date=2024}}</ref> The women's tournament continues to grow in competitiveness, with traditional powers like the United States, Canada, and Finland joined by emerging nations challenging for medals.<ref name="womens-hockey">{{cite news|url=https://www.reuters.com/sports/ice-hockey/womens-hockey-grows-ahead-2026-2024|title=Women's hockey grows ahead of 2026 Olympics|publisher=Reuters|date=2024}}</ref>
==== Luge ====
[[Luge at the 2026 Winter Olympics|Luge]] will consist of 4 medal events: men's singles, women's singles, doubles, and team relay, all held at the Cortina Sliding Centre.<ref name="luge">{{cite web|url=https://www.olympics.com/en/sports/luge|title=Luge|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Athletes will reach speeds exceeding {{convert|130|km/h|mph|abbr=on}} as they navigate the challenging ice track on their backs, demonstrating remarkable courage and precision.<ref name="luge-speeds">{{cite news|url=https://www.nbcsports.com/olympics/news/luge-extreme-speeds-2026|title=Luge athletes reach extreme speeds at 2026 Games|publisher=NBC Sports|date=2024}}</ref>
==== Nordic combined ====
[[Nordic combined at the 2026 Winter Olympics|Nordic combined]] will feature 3 medal events combining ski jumping and cross-country skiing.<ref name="nordic-combined">{{cite web|url=https://www.olympics.com/en/sports/nordic-combined|title=Nordic Combined|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Following controversy over the exclusion of women's events from previous Olympics despite their inclusion in World Championships, Milano Cortina 2026 was expected to feature women's Nordic combined, but final program decisions have faced ongoing discussion regarding gender equity in the sport.<ref name="nordic-combined-women">{{cite news|url=https://www.theguardian.com/sport/2024/nordic-combined-gender-equity-debate|title=Nordic combined faces gender equity questions|publisher=The Guardian|date=2024}}</ref> Events will utilize the Stadio del Trampolino in Predazzo for ski jumping and the Stadio del Fondo in Lago di Tesero for cross-country segments.<ref name="nordic-combined-venues">{{cite news|url=https://www.espn.com/olympics/story/_/id/40600000/nordic-combined-venues-2026|title=Nordic combined venues for 2026 Olympics|publisher=ESPN|date=2024}}</ref>
==== Short track speed skating ====
[[Short track speed skating at the 2026 Winter Olympics|Short track speed skating]] will include 9 medal events featuring individual distances, relays, and mixed team relay.<ref name="short-track">{{cite web|url=https://www.olympics.com/en/sports/short-track-speed-skating|title=Short Track Speed Skating|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The fast-paced, physical racing will take place at Fiera Milano, with athletes reaching speeds over {{convert|50|km/h|mph|abbr=on}} on the tight {{convert|111.12|m|ft|abbr=on}} oval track.<ref name="short-track-action">{{cite news|url=https://www.reuters.com/sports/short-track/fast-paced-short-track-action-2026-2024|title=Fast-paced short track action at 2026 Games|publisher=Reuters|date=2024}}</ref>
==== Skeleton ====
[[Skeleton at the 2026 Winter Olympics|Skeleton]] will feature 2 medal events (men's and women's), held at the Cortina Sliding Centre.<ref name="skeleton">{{cite web|url=https://www.olympics.com/en/sports/skeleton|title=Skeleton|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Athletes will descend the track head-first on their sleds, reaching speeds similar to luge while lying face-down just inches from the ice, making skeleton one of the most thrilling and nerve-testing Olympic sports.<ref name="skeleton-thrill">{{cite news|url=https://www.nbcsports.com/olympics/news/skeleton-olympic-thrill-2026|title=Skeleton provides Olympic thrills in 2026|publisher=NBC Sports|date=2024}}</ref>
==== Ski jumping ====
[[Ski jumping at the 2026 Winter Olympics|Ski jumping]] will consist of 5 medal events, including individual and team competitions for both men and women, as well as a mixed team event.<ref name="ski-jumping">{{cite web|url=https://www.olympics.com/en/sports/ski-jumping|title=Ski Jumping|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The Stadio del Trampolino in Predazzo will host all ski jumping competitions, featuring both normal hill and large hill events.<ref name="predazzo-jumping">{{cite news|url=https://www.espn.com/olympics/story/_/id/40700000/predazzo-ski-jumping-venue-2026|title=Predazzo hosts ski jumping at 2026 Games|publisher=ESPN|date=2024}}</ref> Athletes will soar through the air at distances exceeding {{convert|130|m|ft|abbr=on}}, combining technique, courage, and aerodynamic positioning in one of winter sports' most spectacular events.<ref name="ski-jumping-spectacle">{{cite news|url=https://www.theguardian.com/sport/2024/ski-jumping-spectacular-2026|title=Ski jumping spectacle at 2026 Olympics|publisher=The Guardian|date=2024}}</ref>
==== Ski mountaineering ====
[[Ski mountaineering at the 2026 Winter Olympics|Ski mountaineering]] will make its Olympic debut at Milano Cortina 2026 with 5 medal events: men's individual, women's individual, men's sprint, women's sprint, and mixed relay.<ref name="ski-mountaineering-debut">{{cite web|url=https://www.olympics.com/en/news/ski-mountaineering-added-2026-winter-olympics|title=Ski mountaineering added to Milano Cortina 2026 programme|publisher=International Olympic Committee|date=2023}}</ref> Competitions will be held in [[Livigno]], where the high-altitude terrain provides ideal conditions for this demanding discipline that combines uphill climbing with skis and skins, technical transitions, and rapid downhill skiing.<ref name="ski-mountaineering-livigno">{{cite news|url=https://www.espn.com/olympics/story/_/id/40800000/ski-mountaineering-debut-livigno-2026|title=Ski mountaineering makes debut in Livigno|publisher=ESPN|date=2024}}</ref>
The inclusion of ski mountaineering represents a significant moment for mountain sports, bringing recognition to a discipline with deep roots in Alpine culture and growing global participation.<ref name="ski-mountaineering-significance">{{cite news|url=https://www.reuters.com/sports/ski-mountaineering/olympic-debut-milestone-mountain-sports-2024|title=Olympic debut a milestone for mountain sports|publisher=Reuters|date=2024}}</ref> The sport requires exceptional cardiovascular fitness, technical skiing ability, and efficient movement through variable mountain terrain, often described as one of the most physically demanding winter sports.<ref name="ski-mountaineering-demands">{{cite news|url=https://www.theguardian.com/sport/2024/ski-mountaineering-physical-demands|title=Ski mountaineering's extreme physical demands|publisher=The Guardian|date=2024}}</ref> Traditional powerhouses in mountain sports from Alpine nations like Italy, France, Switzerland, and Austria are expected to compete alongside emerging nations where ski mountaineering has gained popularity in recent years.<ref name="ski-mountaineering-competition">{{cite news|url=https://www.aljazeera.com/sports/2024/ski-mountaineering-competitive-field|title=Competitive field expected for ski mountaineering debut|publisher=Al Jazeera|date=2024}}</ref>
==== Snowboarding ====
[[Snowboarding at the 2026 Winter Olympics|Snowboarding]] will feature 11 medal events across multiple disciplines: halfpipe, slopestyle, big air, parallel giant slalom, and snowboard cross.<ref name="snowboarding">{{cite web|url=https://www.olympics.com/en/sports/snowboarding|title=Snowboarding|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Most events will be held at Livigno's Mottolino Fun Mountain, sharing facilities with freestyle skiing.<ref name="livigno-snowboarding">{{cite news|url=https://www.nbcsports.com/olympics/news/livigno-snowboarding-venue-2026|title=Livigno hosts snowboarding at 2026 Olympics|publisher=NBC Sports|date=2024}}</ref> Snowboarding continues to bring youth appeal and progressive athleticism to the Winter Olympics, with athletes performing gravity-defying aerial tricks and racing at high speeds through challenging courses.<ref name="snowboarding-appeal">{{cite news|url=https://www.reuters.com/sports/snowboarding/snowboarding-youth-appeal-2026-2024|title=Snowboarding brings youth appeal to 2026 Games|publisher=Reuters|date=2024}}</ref>
==== Speed skating ====
[[Speed skating at the 2026 Winter Olympics|Speed skating]] will consist of 14 medal events (7 men's, 7 women's) covering distances from 500m sprints to 10,000m marathons, plus team pursuit events.<ref name="speed-skating">{{cite web|url=https://www.olympics.com/en/sports/speed-skating|title=Speed Skating|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> All speed skating events will be held at the Torino Olympic Oval, reused from the 2006 Winter Olympics.<ref name="oval-speed-skating">{{cite news|url=https://www.espn.com/olympics/story/_/id/40900000/turin-oval-hosts-speed-skating-2026|title=Turin Oval hosts speed skating at 2026 Games|publisher=ESPN|date=2024}}</ref> Athletes will race on the {{convert|400|m|ft|abbr=on}} oval track, reaching speeds exceeding {{convert|60|km/h|mph|abbr=on}} as they compete for Olympic glory in one of the most demanding cardiovascular sports.<ref name="speed-skating-demands">{{cite news|url=https://www.theguardian.com/sport/2024/speed-skating-cardiovascular-demands|title=Speed skating's cardiovascular demands|publisher=The Guardian|date=2024}}</ref>
=== Calendar ===
The competition schedule for the 2026 Winter Olympics will span 17 days from 6 to 22 February 2026, with preliminary events in curling and ice hockey beginning on 4 February.<ref name="calendar-overview">{{cite web|url=https://www.olympics.com/en/olympic-games/milano-cortina-2026/schedule|title=Milano Cortina 2026 Schedule|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Medal events will be distributed throughout the Games to maintain spectator interest and accommodate global broadcast audiences across different time zones.<ref name="medal-distribution">{{cite news|url=https://www.reuters.com/sports/olympics/medal-events-distributed-across-2026-games-2024|title=Medal events distributed across 2026 Games|publisher=Reuters|date=2024}}</ref>
The opening ceremony on 6 February will be followed by the first medal events on 7 February, traditionally including cross-country skiing and speed skating competitions.<ref name="first-medals">{{cite news|url=https://www.espn.com/olympics/story/_/id/41000000/first-medals-awarded-february-7-2026|title=First medals to be awarded February 7, 2026|publisher=ESPN|date=2024}}</ref> Alpine skiing events will be scheduled throughout the Games, weather permitting, with speed events (downhill, super-G) typically held early in the program and technical events (slalom, giant slalom) later.<ref name="alpine-schedule">{{cite news|url=https://www.nbcsports.com/olympics/news/alpine-skiing-schedule-2026|title=Alpine skiing schedule for 2026 Olympics|publisher=NBC Sports|date=2024}}</ref>
Figure skating will anchor the middle portion of the Games, with the highly anticipated singles events and gala exhibition following the team event.<ref name="figure-skating-schedule">{{cite news|url=https://www.reuters.com/sports/figure-skating/figure-skating-anchors-2026-schedule-2024|title=Figure skating anchors 2026 Olympic schedule|publisher=Reuters|date=2024}}</ref> Ice hockey tournaments for both men and women will run throughout the Games, building toward medal round games and finals in the concluding days.<ref name="hockey-schedule">{{cite news|url=https://www.espn.com/olympics/story/_/id/41100000/ice-hockey-tournaments-span-2026-games|title=Ice hockey tournaments span 2026 Games|publisher=ESPN|date=2024}}</ref>
The final weekend of competition (21-22 February) will feature multiple high-profile finals, including the men's ice hockey gold medal game, cross-country skiing mass start events, and the four-man bobsled competition.<ref name="final-weekend">{{cite news|url=https://www.theguardian.com/sport/2024/2026-olympics-final-weekend-highlights|title=2026 Olympics final weekend features major finals|publisher=The Guardian|date=2024}}</ref> The closing ceremony will follow the conclusion of competitions on 22 February, marking the end of the Milano Cortina 2026 Winter Olympics.<ref name="closing-date">{{cite news|url=https://www.aljazeera.com/sports/2024/closing-ceremony-february-22-2026|title=Closing ceremony set for February 22, 2026|publisher=Al Jazeera|date=2024}}</ref>
=== Participating nations ===
The 2026 Winter Olympics are expected to feature athletes from approximately 92 [[National Olympic Committee]]s (NOCs), representing a slight increase from recent Winter Games and reflecting the continued global growth of winter sports.<ref name="participating-nations">{{cite web|url=https://www.olympics.com/en/olympic-games/milano-cortina-2026/countries|title=Participating Countries - Milano Cortina 2026|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> A total of 2,871 athletes are expected to compete, comprising 1,533 men and 1,338 women, achieving the highest proportion of female participation (47%) in Winter Olympics history.<ref name="athlete-numbers">{{cite news|url=https://www.reuters.com/sports/olympics/2026-games-feature-record-womens-participation-2024|title=2026 Games to feature record women's participation|publisher=Reuters|date=2024}}</ref>
Traditional winter sports powers including [[Norway]], [[Germany]], the [[United States]], [[Canada]], [[Austria]], [[Switzerland]], [[France]], [[Sweden]], the [[Netherlands]], and host nation [[Italy]] are expected to field large delegations across multiple sports.<ref name="traditional-powers">{{cite news|url=https://www.espn.com/olympics/story/_/id/41200000/traditional-winter-sports-powers-2026|title=Traditional winter sports powers at 2026 Games|publisher=ESPN|date=2024}}</ref> Asian nations including [[China]], [[Japan]], and [[South Korea]] have continued to strengthen their winter sports programs and are expected to compete strongly in sports such as short track speed skating, figure skating, and ski jumping.<ref name="asian-nations">{{cite news|url=https://www.nbcsports.com/olympics/news/asian-nations-winter-sports-strength|title=Asian nations show winter sports strength|publisher=NBC Sports|date=2024}}</ref>
Emerging winter sports nations from warmer climates continue to expand their participation, often focusing on specific disciplines where they have developed expertise or in sliding sports where athletes can train year-round at specialized facilities.<ref name="emerging-nations">{{cite news|url=https://www.theguardian.com/sport/2024/emerging-winter-sports-nations-2026|title=Emerging winter sports nations at 2026 Olympics|publisher=The Guardian|date=2024}}</ref> Several nations may make their Winter Olympics debut or return after extended absences, pending qualification results across various sports.<ref name="debut-nations">{{cite news|url=https://www.aljazeera.com/sports/2024/potential-debut-nations-2026-olympics|title=Potential debut nations at 2026 Olympics|publisher=Al Jazeera|date=2024}}</ref>
Qualification for the Games takes place through various sport-specific systems managed by international federations, typically based on World Cup results, continental championships, and dedicated Olympic qualification events held in the years and months preceding the Games.<ref name="qualification-systems">{{cite web|url=https://www.olympics.com/ioc/qualification-systems-2026|title=Qualification Systems for Milano Cortina 2026|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> Each NOC must adhere to qualification standards and quota limits established by the IOC and individual sport federations to ensure high-quality competition while maintaining opportunities for diverse international representation.<ref name="qualification-standards">{{cite news|url=https://www.reuters.com/sports/olympics/qualification-standards-ensure-quality-2026-2024|title=Qualification standards ensure quality at 2026 Games|publisher=Reuters|date=2024}}</ref>
The host nation Italy receives automatic qualification slots in certain sports and events, allowing Italian athletes to compete across a broader range of disciplines and showcase the country's winter sports heritage before home crowds.<ref name="host-nation-quota">{{cite news|url=https://www.espn.com/olympics/story/_/id/41300000/italy-host-nation-qualification-benefits|title=Italy receives host nation qualification benefits|publisher=ESPN|date=2024}}</ref> Italy is expected to field one of its largest Winter Olympic teams, with particular strength in Alpine skiing, cross-country skiing, biathlon, short track speed skating, and sliding sports.<ref name="italy-team">{{cite news|url=https://www.theguardian.com/sport/2024/italy-large-olympic-team-2026|title=Italy to field large Olympic team in 2026|publisher=The Guardian|date=2024}}</ref>
=== Closing ceremony ===
The closing ceremony of the 2026 Winter Olympics will take place on Sunday, 22 February 2026, at the historic [[Verona Arena]] in [[Verona]], beginning at 20:00 [[Central European Time|CET]].<ref name="closing-ceremony-details">{{cite news|url=https://www.aljazeera.com/sports/2024/verona-arena-closing-ceremony-details|title=Verona Arena closing ceremony details announced|publisher=Al Jazeera|date=2024}}</ref> This marks the first time in Winter Olympics history that the closing ceremony will be held outside the primary host city, representing a bold departure from tradition and emphasizing the distributed, multi-city nature of Milano Cortina 2026.<ref name="closing-historic">{{cite news|url=https://www.reuters.com/sports/olympics/historic-closing-ceremony-location-2026-2024|title=Historic closing ceremony location for 2026 Games|publisher=Reuters|date=2024}}</ref>
The [[Verona Arena]], an ancient Roman amphitheater built in 30 AD, is one of the best-preserved structures of its kind and has a capacity of approximately 15,000 spectators for the ceremony configuration.<ref name="arena-capacity">{{cite news|url=https://www.espn.com/olympics/story/_/id/41400000/verona-arena-15000-capacity-closing|title=Verona Arena 15,000 capacity for closing ceremony|publisher=ESPN|date=2024}}</ref> The venue is world-renowned for its summer opera festival and dramatic acoustics, offering a uniquely intimate yet grand setting for the Olympic closing ceremony compared to the massive stadium venues typically used.<ref name="arena-acoustics">{{cite news|url=https://www.theguardian.com/sport/2024/verona-arena-dramatic-olympic-setting|title=Verona Arena provides dramatic Olympic setting|publisher=The Guardian|date=2024}}</ref>
The ceremony will follow the traditional Olympic closing ceremony protocol, including the parade of athletes (typically in a mixed formation rather than by nation), the extinguishing of the Olympic flame, the handover to the next host city ([[2030 Winter Olympics|2030 host to be determined]]), speeches by Olympic officials, and a celebratory cultural program.<ref name="closing-protocol">{{cite web|url=https://www.olympics.com/ioc/closing-ceremony-protocol|title=Olympic Closing Ceremony Protocol|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The ceremony's artistic program is expected to celebrate Italian culture, the achievements of the athletes, and the spirit of international friendship fostered during the Games, while also looking forward to the future of the Olympic Movement.<ref name="closing-themes">{{cite news|url=https://www.nbcsports.com/olympics/news/closing-ceremony-themes-2026|title=Closing ceremony themes for 2026 Olympics|publisher=NBC Sports|date=2024}}</ref>
The choice of Verona for the closing ceremony reflects the organizing committee's vision of showcasing Italy's rich historical and cultural legacy while demonstrating innovative approaches to Olympic hosting.<ref name="verona-choice">{{cite news|url=https://www.reuters.com/sports/olympics/verona-choice-reflects-italian-innovation-2024|title=Verona choice reflects Italian Olympic innovation|publisher=Reuters|date=2024}}</ref> The ancient amphitheater's intimate scale compared to modern stadiums is intended to create a warm, celebratory atmosphere for athletes and spectators to share the conclusion of the Games together.<ref name="intimate-atmosphere">{{cite news|url=https://www.espn.com/olympics/story/_/id/41500000/intimate-atmosphere-planned-closing-ceremony|title=Intimate atmosphere planned for closing ceremony|publisher=ESPN|date=2024}}</ref> The ceremony will be broadcast globally, providing a final showcase of Italian hospitality and culture as the world bids farewell to Milano Cortina 2026.<ref name="global-broadcast-closing">{{cite news|url=https://www.theguardian.com/sport/2024/closing-ceremony-global-broadcast|title=Closing ceremony to receive global broadcast|publisher=The Guardian|date=2024}}</ref>
== Marketing ==
=== Emblem ===
The official emblem of the Milano Cortina 2026 Winter Olympics was unveiled on 30 March 2021, at a ceremony held simultaneously in Milan and Cortina d'Ampezzo, with digital participation from around the world due to ongoing pandemic precautions.<ref name="emblem-unveiling">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-2026-unveils-official-emblem-2021|title=Milan-Cortina 2026 unveils official emblem|publisher=Reuters|date=30 March 2021}}</ref> The emblem, designed by Italian creative studio Landor & Fitch, features a dynamic, modern interpretation that evokes the spirit of winter sports and Italian design excellence.<ref name="emblem-design">{{cite news|url=https://www.espn.com/olympics/story/_/id/31200000/2026-olympic-emblem-italian-design-heritage|title=2026 Olympic emblem honors Italian design heritage|publisher=ESPN|date=2021}}</ref>
The design incorporates stylized representations of the number "26" (referencing 2026), mountains, snow, and movement, all integrated with the iconic five Olympic rings.<ref name="emblem-elements">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-2026-emblem-explained|title=Milano Cortina 2026 Emblem Explained|publisher=International Olympic Committee|date=2021}}</ref> The color palette draws from Italian cultural heritage and Alpine landscapes, featuring combinations of white (representing snow and purity), blue (evoking sky, ice, and Italian national colors), and accent colors that reference Italy's vibrant artistic traditions.<ref name="emblem-colors">{{cite news|url=https://www.theguardian.com/sport/2021/milan-cortina-emblem-italian-colors|title=Milan-Cortina emblem embraces Italian colors and heritage|publisher=The Guardian|date=2021}}</ref>
The fluid, dynamic nature of the emblem design reflects the movement and energy of winter sports, while its modern aesthetic signals Italy's forward-looking approach to hosting the Games.<ref name="emblem-modern">{{cite news|url=https://www.aljazeera.com/sports/2021/olympic-emblem-modern-design-approach|title=Olympic emblem takes modern design approach|publisher=Al Jazeera|date=2021}}</ref> The emblem has been adapted for various applications across digital and physical media, maintaining its distinctive identity while remaining versatile for different contexts and backgrounds.<ref name="emblem-versatility">{{cite news|url=https://www.nbcsports.com/olympics/news/2026-emblem-versatile-applications|title=2026 emblem designed for versatile applications|publisher=NBC Sports|date=2021}}</ref>
Public reception to the emblem was generally positive, with design critics praising its contemporary approach and successful integration of Olympic tradition with Italian innovation.<ref name="emblem-reception">{{cite news|url=https://www.reuters.com/sports/olympics/positive-reception-2026-olympic-emblem-2021|title=Positive reception for 2026 Olympic emblem|publisher=Reuters|date=2021}}</ref> The emblem serves as the visual cornerstone of the Milano Cortina 2026 brand identity, appearing on all official communications, merchandise, venues, and promotional materials throughout the lead-up to and during the Games.<ref name="emblem-applications">{{cite web|url=https://www.olympics.com/en/news/emblem-brand-applications-2026|title=Emblem and brand applications for Milano Cortina 2026|publisher=International Olympic Committee|date=2021}}</ref>
=== Slogan ===
The official slogan for Milano Cortina 2026 is "'''IT's Your Vibe'''," unveiled alongside the emblem in March 2021.<ref name="slogan-unveiling">{{cite news|url=https://www.espn.com/olympics/story/_/id/31200100/milan-cortina-2026-slogan-its-your-vibe|title=Milan-Cortina 2026 adopts 'IT's Your Vibe' slogan|publisher=ESPN|date=2021}}</ref> The slogan carries multiple layers of meaning that reflect the organizing committee's vision for the Games. The capitalized "IT" serves as a double reference to both Italy and information technology, emphasizing the country's cultural richness and commitment to innovation and digital engagement.<ref name="slogan-meaning">{{cite news|url=https://www.reuters.com/sports/olympics/2026-slogan-dual-meaning-italy-technology-2021|title=2026 slogan carries dual meaning: Italy and technology|publisher=Reuters|date=2021}}</ref>
"Your Vibe" emphasizes personalization, individual expression, and the unique atmosphere that each participant—whether athlete, spectator, or volunteer—brings to the Olympic experience.<ref name="slogan-personalization">{{cite news|url=https://www.theguardian.com/sport/2021/olympic-slogan-emphasizes-personal-experience|title=Olympic slogan emphasizes personal experience|publisher=The Guardian|date=2021}}</ref> The phrase aims to capture the energy, passion, and diverse expressions of Olympic competition while inviting global audiences to connect with the Games in their own way.<ref name="slogan-connection">{{cite news|url=https://www.aljazeera.com/sports/2021/olympic-slogan-invites-global-connection|title=Olympic slogan invites global connection|publisher=Al Jazeera|date=2021}}</ref>
The slogan also reflects contemporary youth culture and social media language, designed to resonate with younger audiences and create shareable, engaging content across digital platforms.<ref name="slogan-youth">{{cite news|url=https://www.nbcsports.com/olympics/news/2026-slogan-targets-youth-engagement|title=2026 slogan targets youth engagement|publisher=NBC Sports|date=2021}}</ref> Organizing committee officials explained that "vibe" encapsulates the feeling, atmosphere, and emotional connection they hope to create throughout the Games, from the excitement of competition to the celebration of international friendship and cultural exchange.<ref name="slogan-explanation">{{cite web|url=https://www.olympics.com/en/news/its-your-vibe-slogan-explained|title='IT's Your Vibe' slogan explained|publisher=International Olympic Committee|date=2021}}</ref>
The slogan has been integrated into marketing campaigns, social media content, merchandise, and promotional materials, serving as a rallying cry for the Milano Cortina 2026 Games and helping to build anticipation and engagement in the years leading up to the event.<ref name="slogan-marketing">{{cite news|url=https://www.espn.com/olympics/story/_/id/41600000/slogan-integrated-2026-marketing-campaigns|title=Slogan integrated into 2026 marketing campaigns|publisher=ESPN|date=2023}}</ref>
=== Mascots ===
The official mascots for the Milano Cortina 2026 Winter Olympics are '''Tina''' and '''Milo''', two anthropomorphic [[stoat]]s (also known as ermines) unveiled on 28 November 2023.<ref name="mascots-unveiling">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-2026-unveils-mascots-tina-milo-2023|title=Milan-Cortina 2026 unveils mascots Tina and Milo|publisher=Reuters|date=28 November 2023}}</ref> Stoats are small mammals native to the Alpine regions of northern Italy, known for their distinctive white winter coat (as ermines) and their agility, playfulness, and adaptability to harsh mountain environments.<ref name="mascots-animals">{{cite news|url=https://www.espn.com/olympics/story/_/id/39000500/olympic-mascots-represent-alpine-wildlife|title=Olympic mascots represent Alpine wildlife|publisher=ESPN|date=2023}}</ref>
'''Tina''' is characterized by her energetic, adventurous personality, representing the bold spirit of winter sports athletes and the determination required to achieve Olympic excellence.<ref name="tina-character">{{cite web|url=https://www.olympics.com/en/news/tina-mascot-milano-cortina-2026|title=Meet Tina, Milano Cortina 2026 mascot|publisher=International Olympic Committee|date=2023}}</ref> Her design features dynamic poses and sporting equipment, embodying the excitement and athleticism of the Olympic Games. '''Milo''' complements Tina with a more thoughtful, strategic approach, representing the mental preparation, tactical thinking, and technical precision essential to winter sports competition.<ref name="milo-character">{{cite web|url=https://www.olympics.com/en/news/milo-mascot-milano-cortina-2026|title=Meet Milo, Milano Cortina 2026 mascot|publisher=International Olympic Committee|date=2023}}</ref> Together, Tina and Milo embody both the physical and mental dimensions of athletic achievement.<ref name="mascots-partnership">{{cite news|url=https://www.theguardian.com/sport/2023/olympic-mascots-embody-athletic-dimensions|title=Olympic mascots embody physical and mental dimensions of sport|publisher=The Guardian|date=2023}}</ref>
The choice of stoats as mascots connects the Games to Italy's Alpine heritage and biodiversity, raising awareness of the natural environment that makes winter sports possible.<ref name="mascots-environment">{{cite news|url=https://www.aljazeera.com/sports/2023/olympic-mascots-connect-alpine-environment|title=Olympic mascots connect to Alpine environment|publisher=Al Jazeera|date=2023}}</ref> The mascots' design incorporates elements of Italian style and contemporary character design, making them appealing to children and families while remaining sophisticated enough for broader audiences.<ref name="mascots-design">{{cite news|url=https://www.nbcsports.com/olympics/news/mascots-italian-design-appeal|title=Mascots combine Italian design with broad appeal|publisher=NBC Sports|date=2023}}</ref>
Since their unveiling, Tina and Milo have appeared at promotional events, schools, and sporting competitions throughout Italy and internationally, serving as ambassadors for the Games and helping to build excitement, particularly among younger audiences.<ref name="mascots-appearances">{{cite news|url=https://www.reuters.com/sports/olympics/tina-milo-promote-2026-games-worldwide-2024|title=Tina and Milo promote 2026 Games worldwide|publisher=Reuters|date=2024}}</ref> The mascots feature prominently in merchandise, educational programs, digital content, and social media campaigns, establishing a friendly, accessible face for Milano Cortina 2026.<ref name="mascots-marketing">{{cite news|url=https://www.espn.com/olympics/story/_/id/41700000/mascots-featured-olympic-marketing-campaigns|title=Mascots featured in Olympic marketing campaigns|publisher=ESPN|date=2024}}</ref>
Public reception to Tina and Milo has been generally positive, with observers praising the choice of a native Alpine animal and the mascots' appealing designs that balance cuteness with athletic credibility.<ref name="mascots-reception">{{cite news|url=https://www.theguardian.com/sport/2023/positive-reception-olympic-mascots|title=Positive reception for Olympic mascots|publisher=The Guardian|date=2023}}</ref> The mascots continue the Olympic tradition of creating memorable characters that help personify the spirit and values of each Games while providing entertainment and engagement opportunities for diverse audiences.<ref name="mascots-tradition">{{cite web|url=https://www.olympics.com/ioc/olympic-mascots-tradition|title=Olympic Mascots Tradition|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref>
== Broadcasting and media ==
Broadcasting rights for the 2026 Winter Olympics have been distributed to media organizations worldwide through agreements negotiated by the [[International Olympic Committee]], which manages Olympic broadcasting rights on behalf of the Olympic Movement.<ref name="broadcasting-rights">{{cite web|url=https://www.olympics.com/ioc/broadcasting|title=Olympic Broadcasting|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> The IOC's long-term broadcast partnerships ensure stable financial support for the Olympic Games while maximizing global reach and audience engagement.<ref name="broadcast-partnerships">{{cite news|url=https://www.reuters.com/sports/olympics/ioc-broadcast-partnerships-global-reach-2024|title=IOC broadcast partnerships ensure global reach|publisher=Reuters|date=2024}}</ref>
In the [[United States]], [[NBCUniversal]] holds the exclusive broadcasting rights through its long-term agreement with the IOC that extends through 2032.<ref name="nbc-rights">{{cite news|url=https://www.nbcsports.com/olympics/news/nbc-broadcast-rights-through-2032|title=NBC holds broadcast rights through 2032|publisher=NBC Sports|date=2024}}</ref> NBC's coverage will span multiple platforms including the NBC broadcast network, cable channels such as [[USA Network]] and [[CNBC]], and the [[Peacock (streaming service)|Peacock]] streaming platform, providing comprehensive access to all events, ceremonies, and Olympic programming.<ref name="nbc-platforms">{{cite news|url=https://www.espn.com/olympics/story/_/id/41800000/nbc-multi-platform-olympic-coverage|title=NBC's multi-platform Olympic coverage plans|publisher=ESPN|date=2024}}</ref> NBCUniversal's digital streaming strategy reflects the evolving media landscape, with increased emphasis on live streaming, on-demand content, and personalized viewing experiences that allow audiences to follow specific sports or athletes.<ref name="digital-strategy">{{cite news|url=https://www.reuters.com/sports/olympics/nbc-digital-streaming-strategy-2026-2024|title=NBC's digital streaming strategy for 2026|publisher=Reuters|date=2024}}</ref>
In [[Europe]], broadcast rights are held by various organizations through agreements with the [[European Broadcasting Union]] (EBU) and individual national broadcasters.<ref name="europe-broadcasting">{{cite news|url=https://www.theguardian.com/sport/2024/european-olympic-broadcasting-rights|title=European Olympic broadcasting rights distributed|publisher=The Guardian|date=2024}}</ref> Host broadcaster [[RAI]] (Radiotelevisione Italiana) will provide extensive coverage throughout Italy, with special programming celebrating the Italian hosting experience and showcasing national athletes.<ref name="rai-coverage">{{cite news|url=https://www.reuters.com/sports/olympics/rai-extensive-coverage-home-games-2024|title=RAI plans extensive coverage of home Games|publisher=Reuters|date=2024}}</ref> Other major European broadcasters including [[BBC]] (United Kingdom), [[ARD]] and [[ZDF]] (Germany), [[France Télévisions]] (France), and others will provide coverage tailored to their national audiences.<ref name="european-broadcasters">{{cite news|url=https://www.aljazeera.com/sports/2024/european-broadcasters-olympic-coverage|title=European broadcasters prepare Olympic coverage|publisher=Al Jazeera|date=2024}}</ref>
In [[Asia]], broadcasting rights are held by various national and regional partners. [[Japan Broadcasting Corporation|NHK]] will broadcast the Games in Japan, [[China Central Television|CCTV]] holds rights in China, and [[Korean Broadcasting System|KBS]] and [[Seoul Broadcasting System|SBS]] share coverage in South Korea.<ref name="asia-broadcasting">{{cite news|url=https://www.espn.com/olympics/story/_/id/41900000/asian-broadcasters-olympic-rights|title=Asian broadcasters hold Olympic rights|publisher=ESPN|date=2024}}</ref> These broadcasters are expected to provide comprehensive coverage with particular emphasis on winter sports where Asian athletes have achieved success, including figure skating, short track speed skating, and ski jumping.<ref name="asia-focus">{{cite news|url=https://www.nbcsports.com/olympics/news/asian-broadcast-coverage-focus-areas|title=Asian broadcast coverage focus areas|publisher=NBC Sports|date=2024}}</ref>
[[Olympic Broadcasting Services]] (OBS), the permanent host broadcaster created by the IOC, will produce the international television and radio signals from all venues, providing the foundation feed that rights-holding broadcasters can supplement with their own commentary, analysis, and additional coverage.<ref name="obs-production">{{cite web|url=https://www.olympics.com/ioc/olympic-broadcasting-services|title=Olympic Broadcasting Services|publisher=International Olympic Committee|access-date=2024|date=Unknown date}}</ref> OBS will deploy state-of-the-art broadcast technology including [[4K resolution]] and [[High-dynamic-range video|HDR]] (high dynamic range) cameras, advanced slow-motion systems, innovative camera placements providing unique perspectives, and comprehensive coverage of all sports and events.<ref name="broadcast-technology">{{cite news|url=https://www.reuters.com/sports/olympics/advanced-broadcast-technology-2026-games-2024|title=Advanced broadcast technology for 2026 Games|publisher=Reuters|date=2024}}</ref>
Digital and social media will play an increasingly prominent role in the Milano Cortina 2026 Games, building on trends from recent Olympics.<ref name="digital-media">{{cite news|url=https://www.theguardian.com/sport/2024/digital-social-media-olympic-coverage|title=Digital and social media expand Olympic coverage|publisher=The Guardian|date=2024}}</ref> The official Milano Cortina 2026 digital platforms, including the website and mobile applications, will provide schedules, results, athlete profiles, news, and video highlights, serving as comprehensive information hubs for global audiences.<ref name="official-platforms">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-digital-platforms|title=Milano Cortina 2026 Digital Platforms|publisher=International Olympic Committee|date=2024}}</ref> Social media channels across platforms including [[Instagram]], [[TikTok]], [[Twitter/X]], [[Facebook]], and [[YouTube]] will share behind-the-scenes content, athlete stories, highlights, and real-time updates, engaging younger audiences and creating shareable moments that extend the Olympic conversation beyond traditional broadcast media.<ref name="social-media-strategy">{{cite news|url=https://www.espn.com/olympics/story/_/id/42000000/social-media-strategy-2026-olympics|title=Social media strategy for 2026 Olympics|publisher=ESPN|date=2024}}</ref>
Virtual reality (VR) and augmented reality (AR) technologies may be deployed to create immersive viewing experiences, allowing audiences to feel closer to the action and explore Olympic venues virtually.<ref name="vr-ar-technology">{{cite news|url=https://www.reuters.com/sports/olympics/vr-ar-technology-immersive-olympic-experience-2024|title=VR and AR technology for immersive Olympic experience|publisher=Reuters|date=2024}}</ref> These innovations reflect the organizing committee's "IT's Your Vibe" slogan and commitment to leveraging technology to enhance the Olympic experience.<ref name="technology-commitment">{{cite news|url=https://www.aljazeera.com/sports/2024/technology-enhances-olympic-experience|title=Technology commitment enhances Olympic experience|publisher=Al Jazeera|date=2024}}</ref>
The Milano Cortina 2026 Games are expected to reach a cumulative global audience of several billion viewers across all platforms, continuing the Olympic tradition as one of the world's most-watched sporting events.<ref name="global-audience">{{cite news|url=https://www.nbcsports.com/olympics/news/billions-expected-watch-2026-games|title=Billions expected to watch 2026 Games|publisher=NBC Sports|date=2024}}</ref> The combination of traditional television broadcasting, digital streaming, social media engagement, and emerging technologies aims to make Milano Cortina 2026 accessible to the broadest possible global audience while providing personalized, engaging experiences for diverse viewing preferences.<ref name="audience-accessibility">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-broadcasting-accessibility-engagement|title=Olympic broadcasting balances accessibility and engagement|publisher=The Guardian|date=2024}}</ref>
== Concerns and controversies ==
=== Climate change and snow reliability ===
The Milano Cortina 2026 Winter Olympics face scrutiny regarding [[climate change]] impacts on winter sports and the long-term viability of hosting Winter Olympics in a warming world.<ref name="climate-concerns">{{cite news|url=https://www.theguardian.com/sport/2024/climate-change-threatens-winter-olympics|title=Climate change concerns for 2026 Winter Olympics|publisher=The Guardian|date=2024}}</ref> Scientific studies have documented rising temperatures in Alpine regions, reduced snowfall patterns, and shortened winter seasons, raising questions about the reliability of natural snow conditions for Olympic competition.<ref name="alpine-warming">{{cite news|url=https://www.reuters.com/sports/olympics/alpine-warming-impacts-winter-sports-2024|title=Alpine warming impacts winter sports venues|publisher=Reuters|date=2024}}</ref>
Environmental organizations and climate scientists have highlighted that many traditional winter sports venues may become unsuitable for reliable snow conditions by mid-century, potentially limiting the number of cities capable of hosting future Winter Olympics.<ref name="future-viability">{{cite news|url=https://www.bloomberg.com/news/articles/2024-climate-change-winter-olympics-future|title=Climate change threatens future of Winter Olympics|publisher=Bloomberg|date=2024}}</ref> A 2024 study published in a scientific journal found that of the 21 cities that have previously hosted Winter Olympics, only a small number would be able to provide reliable snow conditions by 2050 under current climate trajectories.<ref name="scientific-study">{{cite news|url=https://www.theguardian.com/sport/2024/study-future-olympic-host-cities-climate|title=Study: Few past Olympic host cities viable under future climate|publisher=The Guardian|date=2024}}</ref>
In response to these concerns, Milano Cortina 2026 organizers have emphasized their sustainability commitments and the selection of high-altitude venues with historically reliable snow conditions.<ref name="organizer-response">{{cite news|url=https://www.espn.com/olympics/story/_/id/42100000/organizers-address-climate-snow-concerns|title=Organizers address climate and snow reliability concerns|publisher=ESPN|date=2024}}</ref> Most mountain venues for the 2026 Games are located at elevations above {{convert|1500|m|ft|abbr=on}}, where natural snowfall remains more reliable and temperatures stay lower compared to valley locations.<ref name="high-altitude-venues">{{cite news|url=https://www.reuters.com/sports/olympics/high-altitude-venues-address-climate-risks-2024|title=High-altitude venues address climate risks|publisher=Reuters|date=2024}}</ref> Additionally, snowmaking infrastructure has been enhanced at key venues using energy-efficient systems and sustainable water management practices to ensure adequate conditions regardless of natural snowfall variations.<ref name="snowmaking-backup">{{cite news|url=https://www.aljazeera.com/sports/2024/snowmaking-ensures-olympic-conditions|title=Snowmaking infrastructure ensures Olympic conditions|publisher=Al Jazeera|date=2024}}</ref>
Critics argue that increased reliance on artificial snow, while necessary, creates its own environmental concerns including energy consumption, water usage, and the carbon footprint associated with snowmaking operations.<ref name="snowmaking-criticism">{{cite news|url=https://www.theguardian.com/sport/2024/artificial-snow-environmental-concerns|title=Environmental concerns over artificial snow dependency|publisher=The Guardian|date=2024}}</ref> The broader debate highlights tensions between the desire to maintain winter sports traditions and the imperative to address climate change, with some voices calling for reforms to the Olympic bidding and hosting process that account for long-term climate sustainability.<ref name="reform-calls">{{cite news|url=https://www.bloomberg.com/news/articles/2024-calls-olympic-climate-reforms|title=Calls for Olympic reforms addressing climate challenges|publisher=Bloomberg|date=2024}}</ref>
=== Sliding center reconstruction ===
The decision to reconstruct the Cortina Sliding Centre for bobsled, luge, and skeleton events has generated significant controversy, particularly regarding environmental impacts and cost considerations.<ref name="sliding-controversy">{{cite news|url=https://www.theguardian.com/sport/2023/cortina-sliding-center-controversy|title=Controversy over Cortina sliding center reconstruction|publisher=The Guardian|date=2023}}</ref> Environmental groups raised concerns about the construction's impact on the [[Dolomites|Dolomite]] mountain ecosystem, including forest clearing, habitat disruption, and the carbon footprint of building new infrastructure.<ref name="environmental-opposition">{{cite news|url=https://www.aljazeera.com/sports/2023/environmental-groups-oppose-sliding-track|title=Environmental groups oppose sliding track construction|publisher=Al Jazeera|date=2023}}</ref>
Critics questioned whether the facility was necessary given the existence of other sliding tracks in Europe, suggesting that events could have been held at existing venues in nearby countries to avoid construction impacts.<ref name="alternative-venues">{{cite news|url=https://www.reuters.com/sports/olympics/critics-suggest-alternative-sliding-venues-2023|title=Critics suggest using alternative sliding venues|publisher=Reuters|date=2023}}</ref> Proposals to use tracks in Austria, Switzerland, or Germany were discussed but ultimately rejected by organizers who emphasized the importance of hosting all events within Italy and creating a legacy facility for Italian sliding sports athletes.<ref name="italy-based-events">{{cite news|url=https://www.espn.com/olympics/story/_/id/38200000/italy-insists-hosting-all-events-domestically|title=Italy insists on hosting all events domestically|publisher=ESPN|date=2023}}</ref>
Project costs also sparked debate, with initial estimates around €60 million facing scrutiny as potentially escalating beyond budget.<ref name="cost-concerns">{{cite news|url=https://www.bloomberg.com/news/articles/2023-sliding-track-cost-concerns|title=Sliding track costs raise concerns|publisher=Bloomberg|date=2023}}</ref> Organizers defended the investment by emphasizing the track's legacy value as a training facility for future Italian athletes and its role in maintaining sliding sports expertise in Italy following the sport's absence since the dismantling of the original 1956 track.<ref name="legacy-defense">{{cite news|url=https://www.reuters.com/sports/olympics/organizers-defend-sliding-track-legacy-value-2023|title=Organizers defend sliding track's legacy value|publisher=Reuters|date=2023}}</ref>
Construction proceeded despite protests, with organizers implementing additional environmental mitigation measures including habitat restoration, careful forest management, and commitments to minimize construction impacts.<ref name="mitigation-measures">{{cite news|url=https://www.theguardian.com/sport/2024/sliding-track-environmental-mitigation|title=Environmental mitigation measures for sliding track|publisher=The Guardian|date=2024}}</ref> The controversy highlighted ongoing tensions between Olympic legacy aspirations, sustainability commitments, and environmental protection in Alpine regions.<ref name="tensions-highlighted">{{cite news|url=https://www.aljazeera.com/sports/2024/olympic-development-environmental-tensions|title=Olympic development highlights environmental tensions|publisher=Al Jazeera|date=2024}}</ref>
=== Budget and cost management ===
Financial management and cost control have been areas of ongoing attention for Milano Cortina 2026, particularly given the history of Olympic cost overruns and the organizing committee's promises of a fiscally responsible, sustainable Games.<ref name="budget-attention">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-budget-scrutiny-2024|title=Milan-Cortina budget under continued scrutiny|publisher=Reuters|date=2024}}</ref> The initial bid budget of approximately €1.35 billion was positioned as significantly lower than many previous Winter Olympics, aligning with IOC reform initiatives encouraging cost-effective hosting.<ref name="initial-budget">{{cite news|url=https://www.espn.com/olympics/story/_/id/27000000/milan-cortina-low-cost-bid-approach|title=Milan-Cortina promotes low-cost bid approach|publisher=ESPN|date=2019}}</ref>
However, as planning progressed, some cost estimates increased due to inflation, construction material prices, labor costs, and evolving requirements, raising questions about whether the final budget would remain within initial projections.<ref name="cost-increases">{{cite news|url=https://www.bloomberg.com/news/articles/2024-olympic-costs-exceed-initial-estimates|title=Olympic costs exceed some initial estimates|publisher=Bloomberg|date=2024}}</ref> The Italian government's financial guarantees and public funding commitments faced scrutiny from fiscal watchdogs and opposition politicians who questioned the value of Olympic expenditures during times of economic challenges and competing public priorities.<ref name="public-funding-debate">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-public-funding-debated|title=Olympic public funding debated in Italy|publisher=The Guardian|date=2024}}</ref>
Organizers have maintained transparency regarding budget updates and emphasized that the Games remain on track to be among the most cost-effective Winter Olympics in recent history, particularly due to the extensive use of existing venues and temporary facilities.<ref name="budget-transparency">{{cite news|url=https://www.reuters.com/sports/olympics/organizers-maintain-budget-transparency-2024|title=Organizers maintain budget transparency|publisher=Reuters|date=2024}}</ref> Independent audits and oversight mechanisms have been implemented to ensure fiscal responsibility and accountability, with regular reports provided to Italian authorities and the IOC.<ref name="oversight-mechanisms">{{cite news|url=https://www.espn.com/olympics/story/_/id/42200000/oversight-ensures-olympic-fiscal-responsibility|title=Oversight mechanisms ensure fiscal responsibility|publisher=ESPN|date=2024}}</ref>
The financial debate reflects broader questions about Olympic hosting economics and whether host cities ultimately benefit from the investment or face long-term financial burdens.<ref name="hosting-economics">{{cite news|url=https://www.bloomberg.com/news/articles/2024-olympic-hosting-economics-debated|title=Olympic hosting economics continue to be debated|publisher=Bloomberg|date=2024}}</ref> Milano Cortina organizers have argued that their sustainable, legacy-focused approach represents a new model for Olympic hosting that delivers benefits without creating "white elephant" infrastructure or excessive debt.<ref name="new-model">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-new-olympic-hosting-model-2024|title=Milan-Cortina promotes new Olympic hosting model|publisher=Reuters|date=2024}}</ref>
== Legacy and impact ==
The Milano Cortina 2026 Winter Olympics have been planned with substantial emphasis on creating positive, sustainable legacies that will benefit Italy's winter sports community, tourism industry, and broader society long after the closing ceremony concludes.<ref name="legacy-overview">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-2026-legacy-strategy|title=Milano Cortina 2026 Legacy Strategy|publisher=International Olympic Committee|date=2023}}</ref> The organizing committee's legacy vision focuses on infrastructure improvements, sports development, environmental sustainability, and economic opportunities that extend far beyond the 17 days of competition.<ref name="legacy-vision">{{cite news|url=https://www.reuters.com/sports/olympics/milan-cortina-comprehensive-legacy-vision-2024|title=Milan-Cortina presents comprehensive legacy vision|publisher=Reuters|date=2024}}</ref>
=== Sports infrastructure legacy ===
The decision to use 13 existing venues and construct only one new permanent facility—the PalaItalia arena in Milan—represents a core component of the Games' sustainable legacy approach.<ref name="infrastructure-sustainability">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-infrastructure-sustainable-approach|title=Olympic infrastructure takes sustainable approach|publisher=The Guardian|date=2024}}</ref> The PalaItalia will serve as a major indoor sports and entertainment venue for Milan after the Olympics, hosting ice hockey, concerts, and other events, filling a gap in the city's large-capacity venue offerings.<ref name="palaitalia-post-games">{{cite news|url=https://www.espn.com/olympics/story/_/id/42300000/palaitalia-post-olympic-uses-planned|title=PalaItalia post-Olympic uses planned|publisher=ESPN|date=2024}}</ref>
The renovations and improvements made to existing venues across northern Italy will enhance their functionality for years to come, benefiting local communities, elite athlete training, and future international competitions.<ref name="venue-improvements">{{cite news|url=https://www.reuters.com/sports/olympics/venue-improvements-benefit-future-competitions-2024|title=Venue improvements to benefit future competitions|publisher=Reuters|date=2024}}</ref> The reconstructed Cortina Sliding Centre will provide Italian bobsled, luge, and skeleton athletes with a domestic training facility, reducing the need for expensive travel abroad and supporting the development of these sports in Italy.<ref name="sliding-centre-legacy">{{cite news|url=https://www.espn.com/olympics/story/_/id/42400000/sliding-centre-legacy-italian-athletes|title=Sliding centre legacy for Italian athletes|publisher=ESPN|date=2024}}</ref>
The Milan Olympic Village's planned conversion to affordable housing and student accommodation addresses pressing urban needs while avoiding the "white elephant" fate of some previous Olympic villages.<ref name="village-housing">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-village-becomes-affordable-housing|title=Olympic village to become affordable housing|publisher=The Guardian|date=2024}}</ref> Similarly, the Cortina village structures will transition to tourist accommodation, supporting the resort town's hospitality industry.<ref name="cortina-village-tourism">{{cite news|url=https://www.aljazeera.com/sports/2024/cortina-village-supports-tourism|title=Cortina village to support tourism industry|publisher=Al Jazeera|date=2024}}</ref>
=== Transportation infrastructure ===
Significant investments in transportation infrastructure connecting Olympic venues will provide lasting benefits for northern Italian communities and tourism.<ref name="transportation-investments">{{cite news|url=https://www.reuters.com/sports/olympics/transportation-investments-lasting-benefits-2024|title=Transportation investments provide lasting benefits|publisher=Reuters|date=2024}}</ref> Improvements to rail connections between Milan and mountain regions, enhanced road infrastructure, and upgraded public transportation systems will facilitate easier access to Alpine areas for residents and tourists long after the Games conclude.<ref name="rail-improvements">{{cite news|url=https://www.espn.com/olympics/story/_/id/42500000/rail-improvements-enhance-alpine-access|title=Rail improvements enhance Alpine access|publisher=ESPN|date=2024}}</ref>
These transportation enhancements are expected to reduce travel times, increase connectivity between urban and mountain areas, and support sustainable tourism by making public transit a more viable alternative to private car travel in environmentally sensitive Alpine regions.<ref name="sustainable-transportation">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-transportation-sustainable-tourism|title=Olympic transportation improvements support sustainable tourism|publisher=The Guardian|date=2024}}</ref>
=== Economic impact ===
The economic impact of hosting the Milano Cortina 2026 Olympics extends across multiple sectors including construction, hospitality, tourism, and services.<ref name="economic-impact">{{cite news|url=https://www.bloomberg.com/news/articles/2024-olympic-economic-impact-analysis|title=Analysis: Olympic economic impact across sectors|publisher=Bloomberg|date=2024}}</ref> Independent economic studies estimate that the Games will generate several billion euros in economic activity throughout the preparation and hosting phases, creating thousands of temporary and permanent jobs across northern Italy.<ref name="job-creation">{{cite news|url=https://www.reuters.com/sports/olympics/olympics-create-thousands-jobs-italy-2024|title=Olympics to create thousands of jobs in Italy|publisher=Reuters|date=2024}}</ref>
The global media exposure from hosting the Olympics is expected to significantly boost Italy's tourism profile, particularly for winter sports destinations in the Alpine regions.<ref name="tourism-boost">{{cite news|url=https://www.espn.com/olympics/story/_/id/42600000/olympics-boost-italian-winter-tourism|title=Olympics expected to boost Italian winter tourism|publisher=ESPN|date=2024}}</ref> Marketing studies suggest that Olympic host cities and regions experience sustained increases in tourism visits in subsequent years, as the global audience exposure creates awareness and interest in visiting the locations they watched during the Games.<ref name="tourism-studies">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-tourism-legacy-research|title=Research shows Olympic tourism legacy effects|publisher=The Guardian|date=2024}}</ref>
Local businesses in host communities, particularly in hospitality, retail, and services sectors, anticipate increased activity during the Games and sustained benefits from improved infrastructure and enhanced international visibility.<ref name="business-benefits">{{cite news|url=https://www.aljazeera.com/sports/2024/local-businesses-anticipate-olympic-benefits|title=Local businesses anticipate Olympic benefits|publisher=Al Jazeera|date=2024}}</ref> The organizing committee has emphasized procurement from Italian suppliers where possible, ensuring that economic benefits circulate within the national economy.<ref name="italian-procurement">{{cite news|url=https://www.reuters.com/sports/olympics/italian-procurement-maximizes-economic-benefits-2024|title=Italian procurement maximizes economic benefits|publisher=Reuters|date=2024}}</ref>
=== Youth sports development ===
The Milano Cortina 2026 organizing committee has implemented educational and youth sports development programs aimed at inspiring the next generation of athletes and promoting active, healthy lifestyles.<ref name="youth-programs">{{cite web|url=https://www.olympics.com/en/news/milano-cortina-youth-programs|title=Milano Cortina 2026 Youth Development Programs|publisher=International Olympic Committee|date=2024}}</ref> School outreach programs have brought Olympic athletes to classrooms across Italy, sharing their stories and encouraging young people to pursue sports.<ref name="school-outreach">{{cite news|url=https://www.espn.com/olympics/story/_/id/42700000/olympic-athletes-inspire-italian-students|title=Olympic athletes inspire Italian students|publisher=ESPN|date=2024}}</ref>
Winter sports participation programs have aimed to introduce children from diverse backgrounds, including those in non-mountain regions, to winter sports through subsidized access to facilities, equipment loans, and instructional programs.<ref name="participation-programs">{{cite news|url=https://www.reuters.com/sports/olympics/programs-introduce-youth-winter-sports-2024|title=Programs introduce Italian youth to winter sports|publisher=Reuters|date=2024}}</ref> These initiatives seek to broaden the base of winter sports participation in Italy beyond traditional Alpine regions, identifying and nurturing future Olympic talent.<ref name="talent-development">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-programs-develop-future-talent|title=Olympic programs aim to develop future talent|publisher=The Guardian|date=2024}}</ref>
=== Environmental and sustainability legacy ===
The emphasis on environmental sustainability throughout the Milano Cortina 2026 planning and execution is intended to create a legacy of responsible environmental stewardship in major event management.<ref name="environmental-legacy">{{cite news|url=https://www.reuters.com/sports/olympics/environmental-sustainability-legacy-focus-2024|title=Environmental sustainability a key legacy focus|publisher=Reuters|date=2024}}</ref> The Games are positioned as a demonstration that large-scale international events can be delivered with minimal environmental impact through careful planning, use of existing infrastructure, renewable energy, sustainable transportation, and waste reduction.<ref name="sustainable-demonstration">{{cite news|url=https://www.theguardian.com/sport/2024/games-demonstrate-sustainable-event-management|title=Games demonstrate sustainable event management|publisher=The Guardian|date=2024}}</ref>
Organizers hope that the Milano Cortina 2026 model will influence future Olympic hosts and other major sporting events to prioritize sustainability, contributing to broader efforts to address climate change and environmental protection.<ref name="influence-future-games">{{cite news|url=https://www.aljazeera.com/sports/2024/milan-cortina-model-influence-future-olympics|title=Milan-Cortina model may influence future Olympics|publisher=Al Jazeera|date=2024}}</ref> The organizing committee has committed to measuring and publicly reporting the environmental impact of the Games, providing transparency and accountability that can inform best practices for future events.<ref name="impact-measurement">{{cite web|url=https://www.olympics.com/en/news/environmental-impact-measurement-2026|title=Environmental Impact Measurement for Milano Cortina 2026|publisher=International Olympic Committee|date=2024}}</ref>
Environmental restoration and protection measures implemented as part of Olympic preparations, including habitat conservation around venues, reforestation projects, and water management improvements, will provide lasting ecological benefits to Alpine regions.<ref name="environmental-restoration">{{cite news|url=https://www.reuters.com/sports/olympics/environmental-restoration-olympic-preparations-2024|title=Environmental restoration part of Olympic preparations|publisher=Reuters|date=2024}}</ref>
=== Cultural and social impact ===
Hosting the Olympics provides Italy with an opportunity to showcase its rich cultural heritage, contemporary creativity, and diverse regional identities to a global audience.<ref name="cultural-showcase">{{cite news|url=https://www.espn.com/olympics/story/_/id/42800000/olympics-showcase-italian-culture-globally|title=Olympics showcase Italian culture globally|publisher=ESPN|date=2024}}</ref> The cultural programming accompanying the Games, including exhibitions, performances, and artistic installations, celebrates Italian contributions to art, music, design, cuisine, and innovation, reinforcing Italy's position as a global cultural leader.<ref name="cultural-programming">{{cite news|url=https://www.theguardian.com/sport/2024/olympic-cultural-programming-celebrates-italy|title=Olympic cultural programming celebrates Italy|publisher=The Guardian|date=2024}}</ref>
The volunteer program for Milano Cortina 2026, which will engage thousands of Italians in supporting the Games, is expected to foster civic pride, international understanding, and lasting connections among participants.<ref name="volunteer-program">{{cite news|url=https://www.reuters.com/sports/olympics/volunteer-program-fosters-civic-engagement-2024|title=Volunteer program fosters civic engagement|publisher=Reuters|date=2024}}</ref> Many Olympic volunteers report that their experiences inspire continued involvement in community service and international exchange long after the Games conclude.<ref name="volunteer-legacy">{{cite news|url=https://www.aljazeera.com/sports/2024/olympic-volunteers-lasting-impact|title=Olympic volunteers experience lasting impact|publisher=Al Jazeera|date=2024}}</ref>
The successful delivery of the Milano Cortina 2026 Olympics is expected to strengthen Italy's reputation as a capable, innovative host of major international events, potentially leading to opportunities to host future sporting, cultural, and political gatherings.<ref name="hosting-reputation">{{cite news|url=https://www.espn.com/olympics/story/_/id/42900000/successful-games-strengthen-hosting-reputation|title=Successful Games strengthen Italy's hosting reputation|publisher=ESPN|date=2024}}</ref> The experience and expertise developed through organizing these Games will benefit Italian sports administrators, event managers, and organizations for years to come.<ref name="organizational-expertise">{{cite news|url=https://www.reuters.com/sports/olympics/organizational-expertise-lasting-benefit-2024|title=Organizational expertise provides lasting benefit|publisher=Reuters|date=2024}}</ref>
== See also ==
* [[Winter Olympic Games]]
* [[2026 Winter Paralympics]]
* [[List of Olympic Games host cities]]
* [[Italy at the Olympics]]
== References ==
{{Reflist}}
== External links ==
* [https://www.olympics.com/en/olympic-games/milano-cortina-2026 Milano Cortina 2026] at Olympics.com
* [https://www.milanocortina2026.olympics.com/ Official website]
[[Category:2026 Winter Olympics| Winter Olympics 2026]]
[[Category:Winter Olympics by year|2026]]
[[Category:2026 in multi-sport events]]
[[Category:2026 in Italian sport]]
[[Category:Multi-sport events in Italy]]
[[Category:Sport in Milan]]
[[Category:Sport in Cortina d'Ampezzo]]
[[Category:February 2026 sports events in Italy]]
[[Category:Winter Olympics 2026]]
1xv0rq5cdi7nlfa0ufocv7uhjalaaqm
Testing BDP F
0
172243
750423
732740
2026-07-07T17:47:38Z
Enbi
72574
Blanked the page
750423
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
750424
750423
2026-07-07T17:48:07Z
Enbi
72574
750424
wikitext
text/x-wiki
test
jrwjerxiekdtj9k82lg930wpkr6tq6r
750425
750424
2026-07-07T17:48:21Z
Enbi
72574
750425
wikitext
text/x-wiki
test
test
5nqoj84v2w4p4nsakd1nx8u65eow280
750426
750425
2026-07-07T17:49:27Z
Enbi
72574
750426
wikitext
text/x-wiki
test
test
test
jlzzy4jjego0zw069mfg6ax5duxopht
750427
750426
2026-07-07T17:55:29Z
Enbi
72574
750427
wikitext
text/x-wiki
test
test
test
test
iv07a42popd6tkkg69in7xefekshfqw
750428
750427
2026-07-07T17:58:14Z
Enbi
72574
750428
wikitext
text/x-wiki
test
test
test
test
test
d7r8mwzp103ciqtnkdtad71yjr2nkcm
750432
750428
2026-07-07T19:01:04Z
Enbi
72574
750432
wikitext
text/x-wiki
test
test
test
test
test
.
11sxt8btyq213niqt7yrr0kjxibgcar
750433
750432
2026-07-07T19:01:12Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750438
750433
2026-07-07T19:36:01Z
Enbi
72574
Blanked the page
750438
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
750439
750438
2026-07-07T19:36:41Z
Enbi
72574
750439
wikitext
text/x-wiki
.
6t9fg2gmch401ldtk8m7pyzz632ixbb
750440
750439
2026-07-07T19:37:35Z
Enbi
72574
750440
wikitext
text/x-wiki
.
.
p3zsz52vehdi0bvi0eh703xddcmpgyp
750441
750440
2026-07-07T19:38:04Z
Enbi
72574
750441
wikitext
text/x-wiki
.
.
.
q11ra9ufppw5u5pjuubni1upjnpwt4o
750442
750441
2026-07-07T19:38:10Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750443
750442
2026-07-07T19:40:47Z
Enbi
72574
750443
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
/
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
1b126pfc49rud7dzmx6n8ynj2efta1n
750444
750443
2026-07-07T19:40:54Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750447
750444
2026-07-07T19:43:32Z
Enbi
72574
750447
wikitext
text/x-wiki
{{Semi-protect.ion longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
mz80elynupef6lra77ssyvaszcw55ph
750448
750447
2026-07-07T19:43:41Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750449
750448
2026-07-07T19:45:52Z
Enbi
72574
750449
wikitext
text/x-wiki
{{Semi-protection longue}}.
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
43hnqg2jd9m6acr78zgm1trpbs86n5v
750450
750449
2026-07-07T19:46:00Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750451
750450
2026-07-07T19:46:48Z
Enbi
72574
750451
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalè.s''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
fj8c87h4fg1vq159c1n2x4nr474l9hq
750452
750451
2026-07-07T19:47:06Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750453
750452
2026-07-07T19:47:28Z
Enbi
72574
750453
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Th.éorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
r55923z7wd01km0edmi2ltarkx54u3d
750454
750453
2026-07-07T19:47:43Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750455
750454
2026-07-07T19:48:05Z
Enbi
72574
750455
wikitext
text/x-wiki
{{Semi-protection longue}}..
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
c9u1re10cmy0xrqu9y69nyexz9lslrd
750456
750455
2026-07-07T19:48:10Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
750457
750456
2026-07-07T19:48:28Z
Enbi
72574
750457
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|.Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
oufqzlh521ddh1hgt9ht7bgj82e8yvq
750458
750457
2026-07-07T19:48:43Z
Enbi
72574
test rollback
732740
wikitext
text/x-wiki
{{Semi-protection longue}}
{{voir homonyme|Théorème de Thalès (cercle)}}
[[Image:Thales theorem 1.svg|vignette|Configuration possible du théorème de Thalès : les droites (BC) et (DE) sont parallèles donc les triangles ADE et ABC sont [[triangles semblables|semblables]] et les longueurs AD, DE, EA sont proportionnelles aux longueurs AB, BC et CA.]]
[[Image:Thales.jpg|vignette|Le théorème de l'article doit son nom en France à [[Thalès|Thalès de Milet]], une attribution qui n'est pourtant pas retenue par les historiens.]]
Le '''théorème de Thalès''' est un [[théorème]] de [[géométrie]] [[Plan (mathématiques)|plane]], qui affirme qu'une [[Droites parallèles|droite parallèle]] à l'un des côtés d'un [[triangle]] définit, avec les droites des deux autres côtés, un nouveau triangle dont les côtés sont proportionnels à ceux du premier (voir énoncé précis [[#Énoncés et enseignement|ci-dessous]]). En [[anglais]], il est souvent appelé ''{{Langue|en|intercept theorem}}'' (soit « théorème d'interception »), et en [[allemand]] ''{{Langue|de|Strahlensatz}}'' (« théorème des demi-droites ») ou ''Vierstreckensatz'', (« théorème des quatre segments »).
L'attribution du théorème à [[Thalès]], [[philosophe]] et [[mathématicien]] grec du {{-s-|vi}}, n'est pas retenue par les historiens. Elle s'explique probablement par une légende rapportée par [[Plutarque]] selon laquelle Thalès aurait calculé la hauteur d'une [[pyramide]] par proportionnalité, en mesurant la longueur de son ombre au sol et la longueur de l'ombre d'un bâton de hauteur connue.
La démonstration écrite la plus ancienne connue de ce théorème apparait vers 300 {{av JC}} dans les [[Éléments (Euclide)|''Éléments'' d'Euclide]] ({{nobr|proposition 2}} du [[Livre VI des Éléments d'Euclide|livre VI]]). Elle utilise la [[proportionnalité]] d'[[Aire (géométrie)|aire]]s de triangles de hauteur égale (voir ci-dessous le détail de la preuve).
Le théorème de Thalès permet de calculer des longueurs en [[trigonométrie]], à condition de disposer de deux droites parallèles. Cette propriété est utilisée dans des [[Instrument de calcul|instruments de calcul]] de longueurs.
Plus abstraitement le théorème de Thalès est essentiellement un résultat de [[géométrie affine]], où il correspond à la conservation par [[projection affine|projection]] des [[mesure algébrique|rapports de mesures algébriques]] entre points alignés. Il se généralise en [[Espace affine#Définitions et premières propriétés|dimension]] supérieure. En [[géométrie projective]] il se généralise à la conservation du [[birapport]] par [[projection centrale|projection conique]].
En allemand, et souvent en anglais, le théorème de Thalès désigne un autre théorème de géométrie qui affirme qu'un triangle inscrit dans un [[cercle]], et dont un côté est un [[diamètre]], est un [[triangle rectangle]] ; ce dernier, cas particulier du [[Théorème de l'angle inscrit et de l'angle au centre|théorème de l'angle inscrit]], est parfois appelé en France [[Angle inscrit dans un demi-cercle|théorème de l'angle inscrit dans un demi-cercle]].
== Énoncés et enseignement ==
En pratique, le théorème de Thalès permet de calculer des rapports de longueur et de mettre en évidence des relations de [[proportionnalité]] en présence de [[parallélisme (géométrie)|parallélisme]].
{{théorème|Théorème de Thalès|Soit un triangle ''ABC'', et deux points ''D'' et ''E'', ''D'' sur la droite (''AB'') et ''E'' sur la droite (''AC''), de sorte que la droite (''DE'') soit parallèle à la droite (''BC'') (comme indiqué sur les illustrations ci-dessous). Alors :
<center><math>\dfrac{AD}{AB}=\dfrac{AE}{AC}=\dfrac{DE}{BC}</math>.</center>
}}
Pour la première égalité il est possible de changer l'ordre des trois points sur chaque droite (de façon cohérente), mais la deuxième égalité n'est correcte que pour le rapport indiqué, celui où l'on part du point ''A '' commun aux deux droites, par exemple :
: <math>\dfrac{DA}{DB}=\dfrac{EA}{EC}</math>, mais <math>\dfrac{DA}{DB}\neq\dfrac{DE}{BC}</math> (et <math>\dfrac{DA}{DB}\neq\dfrac{BC}{DE}</math>).
D'autres égalités se déduisent par échange des termes dans les égalités de rapport précédentes, ainsi :
: <math>\dfrac{AB}{AC}=\dfrac{AD}{AE}=\dfrac{DB}{EC}</math>.
'''Deux configurations possibles du théorème de Thalès''' :
<gallery>
Thales theorem 1.svg
Thales theorem 2.svg
</gallery>
Ce théorème démontre que les triangles ''ABC ''et ''ADE ''sont homothétiques : il existe une [[homothétie]] de centre ''A'' envoyant ''B'' sur ''D'' et ''C'' sur ''E''. L'un des rapports donnés ci-dessus est, au signe près, le rapport de l'homothétie. Plus précisément, le rapport de l'homothétie est <math>+\frac{AD}{AB}</math> dans la première configuration et <math>-\frac{AD}{AB}</math> dans la seconde. Le théorème de Thalès est parfois énoncé en affirmant qu'une droite parallèle à un des côtés du triangle coupe ce triangle en un [[Triangles semblables|triangle semblable]].
Il peut être mis en œuvre dans différentes [[construction à la règle et au compas|constructions géométriques à la règle et au compas]]. Par exemple, il peut justifier une construction permettant de diviser un segment en un nombre donné de parts égales.
Rigoureusement, l'énoncé ci-dessus donné nécessite l'utilisation d'une [[distance euclidienne]] pour donner un sens aux longueurs mentionnées (''AB'', ''BC''…). Un énoncé plus précis utilise la notion de [[mesure algébrique]] plutôt que de longueur, et se généralise à la [[géométrie affine]] (où le rapport de mesures algébriques a un sens).
=== Théorème réciproque ===
Le théorème de Thalès (en dimension 2), dans son sens direct, permet de déduire certaines proportions dès que l'on connaît un certain parallélisme. Le sens direct (et non la réciproque) permet également par [[contraposée]], de démontrer que les droites (ou segments) concernés ne sont pas parallèles quand il n'y a pas l'égalité de certains rapports<ref>{{Note autre projet|Wikiversité|Triangles et parallèles/Théorème de Thalès#Contraposée du théorème de Thalès|« Contraposée du théorème de Thalès »|début=Voir}}</ref>. Sa [[Implication réciproque|réciproque]] permet de déduire un parallélisme dès que l'on connaît l'égalité de certains rapports.
{{théorème|Réciproque du théorème de Thalès|Dans un triangle ''ABC'', supposons donnés des points ''D ''et ''E ''appartenant respectivement aux segments [''AB''] et [''AC'']. Si les rapports <math>\frac{AD}{AB}</math> et <math>\frac{AE}{AC}</math> sont égaux, alors les droites (''DE'') et (''BC'') sont parallèles.}}
La démonstration de cette réciproque se déduit du théorème. En effet, considérons un point ''E' ''du segment [''AC''] tel que (''DE{{'}}'') soit parallèle à (''BC''). Alors les points ''A'', ''E' ''et ''C ''sont alignés dans cet ordre et <math>\frac{AE'}{AC} = \frac{AD}{AB} = \frac{AE}{AC} </math> donc <math>AE' = AE</math>. Or il n'existe qu'un seul point situé entre ''A ''et ''C ''vérifiant cette propriété donc ''E' = E''. Par conséquent, (''DE'') = (''DE{{'}}'') est parallèle à (''BC'').
=== Théorème de la droite des milieux ===
[[Image:Theoreme des milieux-1.png|thumb|right|upright=1.8]]
{{Article détaillé|Théorème des milieux}}
Le [[théorème des milieux]] et sa réciproque sont une spécialisation de la réciproque du théorème de Thalès et du théorème lui-même, pour laquelle les points ''D'' et ''E'' correspondent aux milieux des segments [''AB''] et [''AC'']. Si une droite passe par les milieux de deux côtés d'un triangle, elle est parallèle à la droite qui supporte le troisième côté ; et la longueur joignant les milieux des deux côtés est égale à la moitié de la longueur du troisième côté :
{{théorème|titre=Théorème de la droite des milieux|1=Soit un triangle ''ABC'', et nommons ''D'' et ''E'' les milieux respectifs de [''AB''] et [''AC'']. Alors les droites (''DE'') et (''BC'') sont parallèles et l'on a : 2''DE = BC''.}}
La réciproque du théorème de Thalès garantit que les deux droites sont parallèles ; de plus, le théorème de Thalès s'applique et il vient :
<center><math>\dfrac{DE}{BC}=\dfrac{AD}{AB}=\dfrac12</math>.</center>
=== Enseignement et appellations ===
Ce théorème est connu aujourd'hui sous le nom de théorème de Thalès dans l'[[enseignement des mathématiques]] en France<ref>Par exemple à l'époque où [[Jean-Pierre Kahane]] établit son rapport {{Ouvrage |auteur1=Jean-Pierre Kahane |titre=L'enseignement des sciences mathématiques |éditeur=[[Éditions Odile Jacob|Odile Jacob]] |année=2002 |isbn= |présentation en ligne=https://www.eyrolles.com/Sciences/Livre/l-enseignement-des-sciences-mathematiques-9782738111388/}}, le résultat dans la première configuration et le théorème de la droite des milieux sont enseignés dès la [[classe de quatrième française]] et le « théorème de Thalès » à proprement parler et sa réciproque dans la [[classe de troisième française]]{{harv|Kahane|2002|page=113 et 163}}<!-- Page à vérifier -->.</ref> et dans d'autres pays. Aucune source ancienne ne permet cependant de l'attribuer à Thalès<ref name="VitracVolIIp161">Vitrac, note 17 dans {{harvsp|Euclide|1994|p=161}}.</ref>. Très vraisemblablement cette attribution repose-t-elle sur une mauvaise interprétation de quelques témoignages anciens, et eux-mêmes contestables, à propos d'une supposée mesure par celui-ci de la hauteur des pyramides<ref name="VitracVolIIp161" />{{,}}<ref>Voir la partie [[#Le calcul de la hauteur d'une pyramide, une légende]] pour des précisions.</ref>.
Les anciens n'attribuaient pas de nom propre à leurs théorèmes<ref name="Herreman2017OrigineAppelation">{{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>. Plusieurs auteurs du {{s-|XIX}} appellent théorème de Thalès la propriété (plus générale) que « dans les triangles l'égalité des angles entraîne la proportionnalité des côtés et réciproquement » (voir [[Triangles semblables]])<ref>{{ouvrage|auteur1=[[Eugène Rouché]]|auteur2=[[Charles de Comberousse]]|titre=Traité de géométrie élémentaire|année=1868|numéro édition=2|éditeur=Gauthier-Villars|url=https://gallica.bnf.fr/ark:/12148/bpt6k1187122q}} p. 136 pour cette citation précise et l'attribution à Thalès, p. 229 pour la dénomination « théorème de Thalès », dénomination que l'on retrouve déjà, associée au même théorème dans la première édition de 1864, p. 229, mais aussi chez d'autres auteurs, {{ouvrage|titre=De l'origine et des limites de la correspondance entre l'algèbre et la géométrie|auteur=[[Antoine-Augustin Cournot]]|année=1847|éditeur=L. Hachette|lieu=Paris}}, [[Auguste Comte]] en 1853. Toutes ces citations sont reprises de {{harvsp|Herreman|2017}}, [https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html#origineAppelation Sur l'origine de l'appellation « théorème de Thalès »].</ref>{{,}}<ref name="Herreman2017OrigineAppelation"/>. Deux manuels d'enseignement de la fin du {{s-|XIX}} appellent théorème de Thalès un théorème dans le triangle proche de celui du présent article<ref name="Plane">{{harvsp|Plane|1995|p=79}}.</ref>.
Cependant, la référence à Thalès n'a alors rien d'universelle<ref name="Plane"/>. L'historien des mathématiques [[Paul Tannery]] réfute l'attribution de tels théorèmes à Thalès dans un ouvrage paru en 1887<ref>{{ouvrage|auteur=[[Paul Tannery]]|titre=La géométrie grecque|année=1887|éditeur=Gauthiers-Villars |passage=91-92}}.</ref>. Plusieurs traités de géométrie élémentaire de la fin du {{s-|XIX}} ou de la première moitié du {{s-|XX}} ne mentionnent pas Thalès pour ces résultats. C'est le cas par exemple du manuel de [[Jacques Hadamard]] paru en 1898 et de nombreuses fois réédité ensuite<ref>{{harvsp|Bkouche|1995|p=9}}.</ref>, où la propriété que « deux sécantes quelconques sont coupées en parties proportionnelles par des droites parallèles » est le « théorème fondamental » du chapitre premier du livre III, intitulé « lignes proportionnelles »<ref>{{ouvrage|auteur=[[Jacques Hadamard]]|titre=Leçons de géométrie élementaire|sous-titre=géométrie plane|année=1898|éditeur=Armand Colin|passage=108}} ; elle est utilisée pour démontrer p. 109 puis p. 131 que {{citation|toute parallèle à l'un des côtés d'un triangle forme avec les deux autres triangles un triangle semblable au premier}}.</ref>.
Le « théorème de Thalès » finit par s'imposer en France, au cours du {{s-|XX}}, où il est utilisé soit pour le théorème sur le triangle et la parallèle à l'un des côtés, soit pour celui sur les deux sécantes découpées par des droites parallèles<ref>{{harvsp|Plane|1995|p=80-81}}.</ref>{{,}}<ref>Le théorème de Thalès, celui dans le triangle ou celui sur les deux sécantes découpés par des parallèles, est cité sous ce nom dans les programmes de la seconde moitié du {{s-|XX}} selon {{harvsp|Plane|1995|p=80-81}}. On le trouve déjà par exemple dans le programme du diplôme d'aptitude de l'enseignement secondaire de jeune fille de 1911 ([https://gallica.bnf.fr/ark:/12148/bpt6k6417025f/f6.item.r=%22Théorème%20de%20Thalès%22 Journal officiel 10 septembre 1011, p. 7390]), dans le programme de troisième de 1941 ([https://gallica.bnf.fr/ark:/12148/bpt6k96153961/f13.item.r=%22Théorème%20de%20Thalès%22 Journal officiel, 21 septembre 1941, p. 4121])…</ref>.
La situation est similaire en [[Italie]], où le théorème de Thalès apparaît aussi sous ce nom également dans des manuels d'enseignement de la fin du {{s-|XIX}}{{sfn|Patsopoulos|Patronis|2006|p=61}}. Elle est très différente en [[Allemagne]], où le « théorème de Thalès » apparaît à la même époque mais pour désigner un tout autre théorème, la [[angle inscrit dans un demi-cercle|propriété selon laquelle tout angle inscrit dans un demi-cercle est droit]]{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>En Allemagne, notre théorème de Thalès est appelé {{lang|de|''Strahlensatz''}}, théorème des rayons, {{harvsp|Plane|1995|p=82}}.</ref>. Toujours à la même époque, les [[États-Unis]] et l'[[Angleterre]] ne connaissent pas de théorème de Thalès{{sfn|Patsopoulos|Patronis|2006|p=61}}{{,}}<ref>Dans les pays de langue anglaise, notre théorème de Thalès est souvent appelé {{lang|en|''intercept theorem''}}, théorème d'interception, {{harvsp|Plane|1995|p=82}}.</ref>. L'une ou l'autre appellation se propage dans d'autres pays européens, soit sous l'influence des manuels français et italiens, soit sous celle des manuels allemands{{sfn|Patsopoulos|Patronis|2006|p=61}}.
Le théorème de Thalès désigne deux énoncés très différents qui sont associés à deux traditions différentes de l'enseignement de la géométrie, plus fidèle à l'ordre d'exposition euclidien en Allemagne, où le nom de Thalès est associé à un théorème à propos du triangle rectangle, plus sensible en France à l'apparition de la [[géométrie projective]] et de la [[géométrie affine]]{{sfn|Patsopoulos|Patronis|2006|p=61-62}}. Dans un cas comme dans l'autre, l'histoire est instrumentalisée au service d'un choix didactique : il s'agit de mettre un théorème en avant, en lui attribuant le nom d'un mathématicien célèbre, d'où des choix différents dans des traditions d'enseignement différentes<ref>Selon {{harvsp|Patsopoulos|Patronis|2006|p=63-64}}.</ref>.
== Histoire ==
=== Mathématiques babyloniennes et égyptiennes ===
{{Article détaillé|Mathématiques mésopotamiennes|Mathématiques dans l'Égypte antique}}
Les mathématiques babyloniennes et égyptiennes nous sont connues principalement par des tables numériques et des énoncés de problèmes. Dans ce dernier groupe, on peut détecter quelques problèmes dont l'illustration présente des triangles qui semblent être en situation de Thalès. Pour Marianne Michel, docteure en égyptologie, le théorème dit « de Thalès » a été attribué à ce mathématicien uniquement par des sources tardives ({{-s-|iv}}) et était connu des Babyloniens et des Égyptiens<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', éd. Safran, 2023, p. 300</ref>. Cependant, comme le souligne le conférencier en [[épistémologie]] et [[histoire des sciences]] Alain Herreman<ref name="Herreman2018">{{harvsp|Herreman|2018}}.</ref>, il ne suffit pas de soupçonner une configuration de Thalès, encore faut-il que la présence du théorème soit corroborée par les nombres figurant sur la figure et par une procédure l'utilisant explicitement. Le risque est grand, autrement, de surinterpréter les textes, influencé par les connaissances actuelles et la tentation d'y retrouver ce qu'on s'attend à trouver<ref> Herreman signale que ce même article de Wikipedia, dans sa version de 2018, cédait à cette tentation (voir {{harvsp|Herreman|2018}}).</ref>.
==== Tablette MLC 1950 ====
[[image:Teorema de tales na Babilónia Tabua MLC 1950.png|vignette|Tablette MLC 1950 et l'illustration, très dégradée, d'un trapèze découpé dans un triangle|upright=1.5]]
La [[Tablette d'argile|tablette]] MLC 1950 datant de la [[période paléo-babylonienne]]<ref>{{article |auteur=Mar Moyon |titre=Mathématiques et interculturalité : l'exemple des la division des figures planes dans l'histoire des pratiques mathématiques |périodique=Repères <!--|édition=IREM--> |année=2016 |numéro=103 |pages=5-21 |lire en ligne=https://publimath.univ-irem.fr/numerisation/WR/IWR16007/IWR16007.pdf}}, p.7</ref> ({{2e}} millénaire avant notre ère) décrit un exercice dans lequel le scribe cherche à calculer les longueurs des bases d'un [[trapèze]] découpé dans un triangle, à partir d'informations sur son [[Trapèze#Aire du trapèze|aire ''S'']], sa hauteur h et la hauteur h' du triangle complétant le trapèze. La procédure consiste à calculer la demi-somme et la demi-différence des bases pour obtenir ensuite la valeur des bases par somme et différence
* la [[Moyenne arithmétique|demi-somme]] des longueurs des bases, s'obtient comme le rapport de l'aire du trapèze par sa hauteur (d'autres tablettes confirment que la formule donnant l'aire du trapèze était connue<ref>Par exemple, la tablette YBC 7290.</ref>) ;
* la demi-différence, s'obtient par application d'une formule non expliquée, consistant à diviser l'aire du trapèze par {{formule|2''h{{'}}+h''}}<ref name="NeugebauerSachs">{{article |lang=en |auteur1=[[Otto Eduard Neugebauer|Otto Neugebauer]] |auteur2=[[Abraham Sachs]] |titre=Mathematical Cuneiform Texts |périodique=American Oriental Series |volume=29 |lieu=New Haven |éditeur=[[American Oriental Society]] |année=1945 |pages=48-49 |lire en ligne=https://openlibrary.org/books/OL6495966M/Mathematical_cuneiform_texts}}</ref>.
La tablette ne donne aucune explication de cette dernière formule. Neugebauer et Sachs en donnent une justification par les « triangles semblables »<ref name="NeugebauerSachs"/> (il s'agit en l'occurrence du cas particulier correspondant à notre « théorème de Thalès »).
De nombreux problèmes de ce genre où un triangle est découpé par une ou plusieurs lignes parallèles à un côté et où certaines quantités sont fournies (aire et dimensions) tandis que d'autres sont demandées existent dans les mathématiques de cette époque<ref>Notamment dans la tablette de Strasbourg 363 - Voir {{chapitre|langue=en|auteur=[[Eleanor Robson]]|titre chapitre=Mesopotamian Mathematics|pages=57-186|auteur ouvrage=[[Victor J. Katz]]|titre ouvrage=The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A Sourcebook|éditeur=[[Princeton University Press]] année=2007}}, pp.110-113</ref> mais sans toujours fournir de procédure de résolution.
==== Papyrus Rhind ====
[[Fichier:Rhind.png|vignette|droite|Le problème 53 du [[papyrus Rhind]] (figure du bas) fait penser à une configuration de Thalès, mais ne peut correspondre au théorème quand on examine les nombres associés<ref name="Herreman2018"/>.]]
On trouve également de telles illustrations dans le [[papyrus Rhind]], avant −1550. Le problème 53, par exemple, représente un triangle découpé par plusieurs segments qui semblent parallèles à la base. Sur cette figure sont notées des valeurs numériques. Cependant, l’absence d’énoncé et les calculs exprimés rendent l’analyse de ce problème particulièrement difficile<ref>Marianne Michel, ''Les mathématiques de l’Égypte ancienne'', 2023, p. 304</ref>. Les interprétations varient suivant les égyptologues<ref name="Herreman2018"/> et on ne peut l’attribuer explicitement à l’utilisation du théorème de Thalès ; Eisenlohr qualifie la transcription du scribe comme imparfaite et entachée d’erreurs<ref>Eisenlohr, ''Mathematisches Handbuch'', p. 130</ref> et Peet va jusqu’à dire qu’il n’est guère utile de passer beaucoup de temps sur un problème qui est clairement incomplet et incorrect<ref>Peet, ''Rhind Papyrus'', p. 95</ref>.
=== Grèce antique ===
==== Le livre VI des ''Éléments'' ====
[[Image:EuclideLivreVIProp2Ratdolt1482ed.jpg|thumb|left|La proposition 2 du [[livre VI des Éléments d'Euclide|livre VI des ''Éléments'' d'Euclide]], dans sa première édition imprimée, en 1482 à Venise, une traduction de l'arabe en latin par [[Campanus de Novare]]. Le premier schéma illustre la proposition 1 sur la proportionnalité entre bases et aires de triangles de même hauteur, le second la proposition 2 et sa démonstration et le troisième la proposition 3 (une conséquence du « théorème de Thalès »).]]
Le « théorème de Thalès » (tel que nous l'appelons aujourd'hui) apparaît dans les ''Éléments'' d'Euclide<ref name="Vitrac1994p161">Vitrac dans {{harvsp|Euclide|1994|p=161}}.</ref>, un édifice axiomatique rigoureusement ordonné{{sfn|Caveing|1990|p=88}} que l'on peut supposer écrit vers -290{{sfn|Caveing|1990|p=108}}. Plus précisément, le théorème est énoncé, accompagné de sa réciproque, à la proposition 2 du livre VI<ref name="Vitrac1994p161"/>{{,}}<ref>Pour l'énoncé (et sa démonstration) : {{harvsp|Euclide|1994|p=159}}, {{Ouvrage|titre=Les œuvres d'Euclide, en grec, en latin et en français, d'après un manuscrit très-ancien qui était resté inconnu jusq'à nos jours|auteur=Euclide|traducteur=François Peyrard|date=1814|volume=1|éditeur=M. Patris|lieu=Paris|url=https://archive.org/details/lesoeuvresdeucli01eucl/page/292/mode/2up}} p. 293, ou le {{en}} [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].</ref>.
[[Image:EuclidelivreVIprop2.svg|thumb|right|Résumé de la démonstration du sens direct de la proposition 2 (théorème de Thalès) par Euclide. Les triangles BDE et CDE, de même base DE, et de sommets portés par une parallèle BC à DE sont égaux par I.38. Donc le triangle BDE est relativement au triangle ADE comme le triangle CDE relativement au triangle ADE (V.7). Le triangle BDE est relativement au triangle ADE comme BD relativement à DA, ces deux triangles ayant même hauteur issue de E (VI.1). De même le triangle CDE est relativement au triangle ADE comme CE relativement à EA, et on conclut que BD est relativement à DA comme CE à EA (V.11).]]
Le livre VI, consacré à l'étude des [[Similitude (géométrie)|figures semblables]], nécessite la théorie des proportions exposée au [[livre V des Éléments d'Euclide|livre V]] qui permet de traiter les grandeurs [[commensurabilité (mathématiques)|incommensurables]]<ref>Vitrac dans {{harvsp|Euclide|1994|p=143}} et {{harvsp|Euclide|1994|p=14}}.</ref>. Cette théorie des proportions doit beaucoup à [[Eudoxe de Cnide|Eudoxe]] {{sfn|Caveing|1990|p=110}}, qui aurait pu l'introduire vers -350{{sfn|Caveing|1990|p=108}}, et le contenu du livre VI aurait ainsi été élaboré entre Eudoxe et Euclide{{sfn|Caveing|1990|p=111}}.
L'énoncé de la proposition 2 est le suivant :
'''Proposition 2. —''' Si l'on mène une droite parallèle à un des côtés d'un triangle, cette droite coupera proportionnellement les côtés de ce triangle ; et si les côtés d'un triangle sont coupés proportionnellement, la droite qui joindra les sections<ref>Section au sens de point d'intersection, {{harv|Euclide|1994|p=159}}.</ref> sera parallèle au côté restant du triangle<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=293}}.</ref>.
Pour la proportionnalité des troisièmes côtés des deux triangles, qui sont « équiangles » (angles égaux deux à deux) d'après le livre I<ref>Proposition 29 du livre I {{harv|Euclide|1990|p=251}}, était numérotée 30 dans la traduction Peyrard {{harv|Euclide|1814|p=51}}.</ref>, il est possible de conclure à l'aide la proposition 4 du livre VI :
'''Proposition 4. —''' Dans les triangles équiangles, les côtés autour des angles égaux sont proportionnels ; et les côtés qui sous-tendent les angles égaux, sont homologues<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=298}}.</ref>.
Mais la proposition 2 est exposée dans un contexte mathématique qui n'est pas le nôtre et ne correspond en fait qu'imparfaitement à notre théorème. Par exemple, les droites d'Euclide sont « limitées » (ce sont des segments de droite), mais elles sont toujours « prolongeables »<ref>Vitrac dans {{harvsp|Euclide|1990|p=169}}.</ref>. Dans les [[données (Euclide)|''Données'']], la proposition 2 n'est utilisée que dans la première configuration du paragraphe [[#Énoncés et enseignement]], quand le sommet ''A'' commun aux deux triangles est situé du même côté des deux parallèles<ref name="Vitrac1994p161"/>, alors que dans la seconde configuration, celle où le sommet commun ''A'' est entre les deux parallèles, c'est la proposition 4 qui est invoquée, ce qui laisse penser que la proposition 2 est restreinte à la première configuration<ref name="Vitrac1994p161"/>.
En plus de la théorie des proportions exposée au livre V, le livre VI utilise essentiellement des résultats du livre I<ref>Vitrac dans {{harvsp|Euclide|1994|p=154}}.</ref>. Si on prend le sens direct de la proposition 2 (correspondant à notre théorème de Thalès), sa démonstration s'appuie sur{{sfn|Euclide|1994|p=159-160}} :
* la proposition 38 du livre I : « Des triangles, construits sur des bases égales et entre les mêmes parallèles, sont égaux entre eux »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=63}}, la proposition 38 du livre I {{harv|Euclide|1990|p=264}} était numérotée 39 dans la traduction de Peyrard.</ref> ;
* deux propositions élémentaires du livre V sur la théorie des proportions (7 et 11) ;
* la proposition 1 du livre VI : « Les triangles et les parallélogrammes qui ont la même hauteur sont entre eux comme leurs bases »<ref>Traduction Peyrard 1814 {{harv|Euclide|1814|p=290}}.</ref>.
Un résumé en est donné ci-contre.
Ici, quand Euclide parle de triangles égaux, cela correspond à l'égalité entre leurs aires<ref>Il peut l'utiliser en un autre sens ailleurs).</ref>. De même à la proposition 1 c'est bien de proportionnalité entre les aires qu'il s'agit. Cependant la notion d'aire n'est pas définie directement par Euclide, et il n'y a pas de calcul d'aires dans les ''Éléments''<ref>Vitrac dans {{harvsp|Euclide|1990|p=266}}.</ref>.
Pour établir la proposition 1, Euclide utilise la proposition 38 du livre I (qui donne le cas particulier de la proposition VI.1 où les triangles ont même base, et suffirait pour l'établir pour des rapports entiers) et la définition 5 du livre V :
* la définition 5 du livre V : « Des grandeurs sont dites ''être dans le même rapport'', une première relativement à une deuxième et une troisième relativement à une quatrième quand des équimultiples de la première et de la troisième ou simultanément dépassent, ou sont simultanément égaux ou simultanément inférieurs à des équimultiples de la deuxième et de la quatrième, selon n’importe quelle multiplication, chacun à chacun, [et] pris de manière correspondante »<ref>Traduction Vitrac {{harvsp|Euclide|1994|p=41}}, voir aussi {{harvsp|Euclide|1814|p=236}}, où Peyrard traduit par « raison » le terme ''λόγος'' que Vitrac traduit par « rapport » {{harv|Euclide|1994|p=36}}.</ref>.
Euclide a besoin de cette définition pour passer des rapports entiers (les équimultiples) à des rapports quelconques.
==== Le calcul de la hauteur d'une pyramide, une légende ====
[[Image:Thales theorem 6.png|thumb|upright=1.8|left|La mesure de la hauteur d'une pyramide par Thalès selon Plutarque.]]
Certains textes de l'Antiquité grecque font référence aux travaux de [[Thalès|Thalès de Milet]] au {{s-|VI}} av. J.-C., dont aucun écrit ne nous est parvenu. Cependant, aucun texte ancien n'attribue la découverte du théorème de Thalès à celui-ci<ref name="VitracVolIIp161" />.
L'attribution en France du théorème à Thalès semble associée à la mesure de la hauteur d'une pyramide égyptienne que celui-ci aurait effectuée<ref>{{harvsp|Patsopoulos|Patronis|2006|page=59-60}}.</ref>{{,}}<ref name="VitracVolIIp161" />.
Dans son commentaire sur les ''Éléments'' d'Euclide, [[Proclus]] affirme que la [[géométrie]] avait été découverte en [[Égypte]], et transportée en [[Grèce]] par Thalès après son voyage dans cette contrée<ref>{{harvsp|Proclus|1948}}, 65, 3-11, d'après {{harvsp|Caveing|1997|p=33}}</ref>. Selon une anecdote rapportée par [[Pline l'Ancien]], [[Plutarque]] et [[Diogène Laërce]], lors de ce voyage Thalès aurait obtenu la hauteur d'une des pyramides en mesurant l'ombre de celle-ci<ref name="Caveing61">{{harvsp|Caveing|1997|p=61}}.</ref>. Pour Pline de même que pour Diogène Laërce (qui se réfère à [[Hiéronymos de Rhodes|Hiéronymus de Rhodes]], un auteur actif au {{-s-|III}}, ce qui est déjà autour de trois siècles après Thalès), Thalès attend que son ombre soit égale à sa taille pour mesurer l'ombre de la pyramide dont il déduit alors la hauteur<ref name="Caveing61"/>.
{{Citation bloc| [[Hieronymus de Rhodes|Hiéronyme]] dit que Thalès mesura les pyramides d'après leur ombre, ayant observé le temps où notre propre ombre égale notre hauteur<ref>[[Diogène Laërce]], ''[[Vies, doctrines et sentences des philosophes illustres]]'', Thalès, I, 27.</ref>.}}
La version que donne [[Plutarque]] dans ''Le Banquet des Sept Sages'' (147a)<ref name="Caveing62">{{harvsp|Caveing|1997|p=62}}.</ref> est clairement romancée :
{{citation bloc|Ainsi, vous, Thalès, le roi d'Égypte vous admire beaucoup, et, entre autres choses, il a été, au-delà de ce qu'on peut dire, ravi de la manière dont vous avez mesuré la pyramide sans le moindre embarras et sans avoir eu besoin d'aucun instrument. Après avoir dressé votre bâton à l'extrémité de l'ombre que projetait la pyramide, vous construisîtes deux triangles par la tangence d'un rayon, et vous démontrâtes qu'il y avait la même proportion entre la hauteur du bâton et la hauteur de la pyramide qu'entre la longueur des deux ombres<ref>[[Plutarque]], ''Le Banquet des Sept Sages'', §2, traduction Victor Bétolaud 1870 [http://remacle.org/bloodwolf/historiens/Plutarque/banquet.htm lire en ligne sur remacle.org]. Il s'agit du pharaon [[Amasis]] que Plutarque a cité auparavant.</ref>.}}
La version de Plutarque fait intervenir des rapports de proportionnalité<ref name="Caveing62"/>, et donc peut renvoyer au théorème de Thalès. Ce n'est pas vraiment le cas de la version plus élémentaire rapportée par Pline et Diogène Laërce, qui correspond très probablement à la version originale de Hieronymus<ref name="Caveing62"/>. De toute façon, comme le remarque [[Maurice Caveing]], {{citation|il est peu vraisemblable que le souverain d'un pays qui, plus de {{nombre|1000|ans}} avant Thalès, connaissait le calcul du [[seqed]], ait ignoré comment mesurer la hauteur des pyramides}}<ref name="Caveing61"/>.
==== L'''Optique'' ====
Le procédé pour mesurer une hauteur inaccessible par la mesure de son ombre et la proportionnalité avec l'ombre d'un objet de hauteur connue, que Plutarque attribue à Thalès, est présenté dans l'''Optique'', un autre ouvrage d'Euclide<ref>{{harvsp|Tannery|1887|p=92}}, note 2.</ref>{{,}}, à la proposition 18<ref>{{article|lang=en |titre=The optics of Euclid |auteur=Euclide |traducteur=Harry Edwin Burton |date= mai 1945 |journal=Journal of the optical society of America |volume=35 |numéro=5 |passage=360}}. Tannery renvoie à la proposition 19. L'''Optique'' d'Euclide est connue sous au moins deux formes, l'une qui serait celle originale d'Euclide, du moins selon Burton ({{harvsp|Euclide|1945|p=357}} note 1) et d'autres auteurs, l'autre une révision due à [[Théon d'Alexandrie|Théon]].</ref>. Plusieurs propositions donnent des moyens de mesurer des hauteurs (18, 19), profondeur (20) et distance (21) utilisant des triangles semblables<ref>{{harvsp|Euclide|1945|p=360-361}}</ref>. Dans le cas des propositions 18, 20 et 21, il s'agit du cas particulier du « théorème de Thalès ».
== Démonstrations ==
=== Preuve par les aires ===
[[Image:Thales theorem 4.svg|thumb|right|Disposition des points.]]
Les données de ce théorème sont :
* un triangle, par définition délimité par trois lignes droites (segments) ''AB'', ''BC'', et ''CA'' ;
* une ligne droite ''DE'' parallèle à la ligne droite ''BC'' intersectant ''AB'' en ''D'' et ''AC'' en ''E''.
La conclusion donnée est :
{{Citation bloc|''AD'' fera à ''DB'' ce que ''AE'' est à ''EC''.}}
Autrement dit, en écriture mathématique actuelle :
<center><math>\dfrac{BD}{DA}=\dfrac{CE}{EA}</math>.</center>
Cette démonstration se fonde sur le fait que l'[[aire d'un triangle]] est égale à la moitié de la longueur de sa hauteur, par rapport à une base (ou côté) quelconque, multipliée par la longueur de la base en question. Les hauteurs des triangles ''DEB'' et ''DEC'' par rapport à leur base commune ''DE'' ont la même longueur, du fait que ''BC'' est parallèle à ''DE''. Ces deux triangles ont par conséquent la même aire. Ils ont donc le même ''ratio'' (d'aires) avec n'importe quelle aire non nulle, et en particulier celle du triangle ''DEA''. Comme les hauteurs des triangles ''DEB'' et ''DEA'' par rapport, respectivement, aux bases ''BD'' et ''DA'', sont confondues (''h'' dans la figure ci-contre), le ratio de ''DEB'' par ''DEA'' est le même que le ratio de ''BD'' par ''DA''. De même, le ''ratio'' de ''DEC'' par ''DEA'' est identique au ratio de ''CE'' par ''EA''. Donc le ratio de ''BD'' par ''DA'' est le même que le ratio de ''CE'' par ''EA''.
On peut traduire ce raisonnement par les égalités suivantes :
<center><math>\dfrac{BD}{DA}=\dfrac{\text{Aire}(DEB)}{\text{Aire}(DEA)}=\dfrac{\text{Aire}(DEC)}{\text{Aire}(DEA)}=\dfrac{CE}{EA}</math>.</center>
Les égalités s'appuient sur les constatations suivantes :
* les triangles ''DEB'' et ''DEA'' ont une hauteur commune ''h'' issue de E. Donc, leur aire est respectivement ½''BD''×''h'' et ½''DA''×''h'' ;
* les triangles ''DEB'' et ''DEC'' ont une base commune ''DE'', et les sommets opposés ''B'' et ''C'' sont par hypothèses sur une droite parallèle à (''DE'') ;
* enfin, les triangles ''DEC'' et ''DEA'' ont une hauteur commune ''h{{'}}'' issue de ''D''. Donc, leur aire est respectivement ½''CE''×''h{{'}}'' et ½''EA''×''h{{'}}''.
{{clr}}
=== Preuve purement vectorielle ===
Il faut se poser la question de la validité d'une démonstration vectorielle du théorème de Thalès. En effet, la [[Calcul vectoriel en géométrie euclidienne|géométrie vectorielle]] s'appuie souvent sur une définition géométrique des vecteurs, définition dans laquelle le théorème de Thalès joue un rôle prépondérant quand il s'agit d'affirmer que <math>k(\vec{u} + \vec{v}) = k\vec{u} + k\vec{v}</math>.
Mais on peut toutefois s'intéresser à une écriture possible du théorème de Thalès et sa justification grâce aux opérations vectorielles, ce qui permet de le généraliser à tout [[espace affine]] (associé à un [[espace vectoriel]]).
Dire que ''D ''est sur (''AB'') c'est écrire qu'il existe un réel {{mvar|x}} tel que <math>\overrightarrow{AD}=x~\overrightarrow{AB}</math>.
De même, dire que ''E ''est sur (''AC''), c'est écrire qu'il existe un réel {{mvar|y}} tel que <math>\overrightarrow{AE}=y~\overrightarrow{AC}</math>.
Enfin, dire que les droites (''ED'') et (''BC'') sont parallèles, c'est écrire qu'il existe un réel {{mvar|t}} tel que <math>\overrightarrow{DE}=t~\overrightarrow{BC}</math>.
Les égalités précédentes et la [[relation de Chasles]] permettent d'écrire que :
{{Retrait|<math>\begin{align}
x~\overrightarrow{AB}+t~\overrightarrow{BC}
&=\overrightarrow{AD}+\overrightarrow{DE}\\
&=\overrightarrow{AE}\\
&=y~\overrightarrow{AC}\\
&=y~\overrightarrow{AB}+y~\overrightarrow{BC}.
\end{align}</math>}}
L'écriture suivant les vecteurs <math>\overrightarrow{AB}</math> et <math>\overrightarrow{BC}</math> se doit d'être unique car ces vecteurs ne sont pas [[base (algèbre linéaire)|colinéaires]]. Donc ''{{formule|1=x = y}}'' et ''{{formule|1=t = y}}''.
On obtient donc les trois égalités :
<center><math>\overrightarrow{AD}=y~\overrightarrow{AB},~\overrightarrow{AE}=y~\overrightarrow{AC}\text{ et }\overrightarrow{DE}=y~\overrightarrow{BC}</math>.</center>
L'autre avantage de cet énoncé et de cette démonstration est que cela traite en même temps la seconde configuration illustrée [[#Énoncés et enseignement|plus haut]].
== Généralisations du théorème de Thalès ==
=== Cas de trois droites parallèles ===
[[Image:Thales theorem 3.svg|right|thumb|Disposition des points et des droites.]]
Il s'agit d'une généralisation du théorème précédent dont la première égalité apparait comme le cas particulier où ''A = A{{'}}''. Par contre, dans le théorème généralisé, aucune égalité n'est possible entre les rapports des longueurs des segments portés par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les rapports des longueurs des segments portés par les droites (''AC'') et (''A'C{{'}}''). Le théorème est également généralisé en utilisant des [[mesure algébrique|mesures algébriques]], ce qui permet de le faire apparaitre comme un théorème de [[géométrie affine]], le rapport de 2 mesures algébriques sur une même droite étant une notion purement affine.
{{théorème|nom=Théorème de Thalès<ref name=Germoni/>{{,}}<ref>{{Ouvrage|prénom1=Michèle|nom1=Audin|lien auteur1=Michèle Audin|titre=Géométrie|éditeur=[[EDP Sciences]]|année=2006|numéro d'édition=3|pages totales=428|passage=26|isbn=978-2-7598-0180-0|lire en ligne=https://books.google.fr/books?id=n1EdG4fcor0C&pg=PA196}}.</ref>|énoncé=Soient (d) et (d') deux droites d'un même [[plan affine]].
:'''Énoncé direct''' : s'il existe trois droites parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>
:Dans un plan, des droites parallèles déterminent sur deux droites quelconques qu'elles rencontrent des segments correspondants proportionnels
:ou
:si une projection d'une droite sur une autre est une projection parallèle et qu'elle projette repère sur repère, alors les abscisses des points sont conservées.
::Cette conclusion équivaut à l'une des deux égalités suivantes :
<center><math>\dfrac{\overline{AB}}{\overline{BC}}=\dfrac{\overline{A'B'}}{\overline{B'C'}},\quad\text{ou}\quad\dfrac{\overline{BC}}{\overline{AC}}=\dfrac{\overline{B'C'}}{\overline{A'C'}},</math></center>
::ou encore à :
<center><math>\dfrac{\overline{A'B'}}{\overline{AB}}=\dfrac{\overline{B'C'}}{\overline{BC}}=\dfrac{\overline{A'C'}}{\overline{AC}}</math>.</center>
::'''« Réciproque »''' : si, pour trois points ''A, B, C'' de (d) et trois points ''A', B', C' '' de (d'), la première égalité ci-dessus est vérifiée (avec ''A ≠ C'' et ''A{{'}} ≠ C{{'}}''), ''et s'il existe deux droites parallèles contenant A et A{{'}} pour la première et C et C{{'}} pour la seconde'', alors il existe une troisième droite parallèle aux deux précédentes et contenant ''B'' et ''B{{'}}''.
}}
Si l'on néglige les mesures algébriques, le [[#Énoncés et enseignement|premier énoncé donné]] du théorème de Thalès est la spécialisation du présent second énoncé au cas où deux points sont confondus (par exemple <math>A</math> et <math>A'</math>). En considérant la parallèle à (d{{'}}) passant par ''A'', le second énoncé se déduit du premier.
On peut démontrer ce théorème à partir de l'axiomatique du [[plan affine arguésien|plan arguésien]] dégagée au {{s-|XX}}<ref>On pourra en lire une preuve {{p.|16}} de {{de}} W. Börner, ''[http://www.minet.uni-jena.de/www/fakultaet/hertel/skripten/boerner/geol0102/gfl.pdf Geometrie für Lehrer]'' sur le site de l'[[université d'Iéna]].</ref>.
La « réciproque » se déduit de l'énoncé direct en considérant la droite passant par ''B'' et parallèle aux deux premières parallèles. Elle coupe (d{{'}}) en un certain point ''B{{'}}{{'}}'' qui, d'après l'énoncé direct, vérifie
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B''}\over\overline{A'C'}}</math>.</center>
Comme la même égalité est vérifiée par hypothèse pour ''B{{'}}'', les deux points ''B{{'}} '' et ''B{{'}}{{'}}'' coïncident, donc la troisième parallèle contient bien ''B'' et ''B{{'}}''.
{{énoncé|titre=Relation entre les longueurs des segments par les droites parallèles (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') et les longueurs des segments portés par les droites (''AC'') :|1=La relation n'est pas une relation de rapport mais fait intervenir les 5 longueurs :<math>({\overline{AB} + \overline{BC}})\cdot\overline{BB'}={\overline{AB}\cdot\overline{CC'}}+{\overline{BC}\cdot\overline{AA'}}.</math>}}
=== En dimension supérieure ===
Souvent énoncé comme un théorème de géométrie plane, le théorème de Thalès se généralise sans difficulté en [[dimension]] supérieure, notamment en dimension 3. L'utilisation de droites parallèles est remplacée par des hyperplans parallèles ; les droites (d) et (d') n'ont pas à être supposées coplanaires.
{{théorème|nom=Théorème de Thalès|énoncé=Soient (d) et (d') deux droites d'un même [[espace affine]].
:'''Énoncé direct'''<ref>Cf. par exemple {{Ouvrage | prénom1 = Marcel | nom1 = Berger | titre = Géométrie | éditeur = | année = 1979 | volume = 1 | passage = 73 | référence = Référence:Géométrie (Berger) }}, énoncé 2.5.1.</ref> : s'il existe trois [[hyperplan]]s [[parallélisme (géométrie)|parallèles]] intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B{{'}}''et en ''C'' et ''C{{'}}'', alors :
<center><math>{\overline{AB}\over\overline{AC}}={\overline{A'B'}\over\overline{A'C'}}</math>.</center>Dans un espace à trois dimensions, des plans parallèles déterminent sur des droites quelconques les traversant des segments correspondants proportionnels.
:'''« Réciproque<ref name=Germoni>Voir par exemple : Jérôme Germoni, « [http://math.univ-lyon1.fr/capes/IMG/pdf/thales.pdf Théorème de Thalès, etc.] » (préparation au [[Certificat d'aptitude au professorat de l'enseignement du second degré|CAPES]] de l'[[université Lyon 1]]).</ref> »''' : si (d) et (d') sont non coplanaires et si trois points ''A'', ''B'', ''C'' de (d) et trois points ''A{{'}}'', ''B{{'}}'', ''C' ''de (d') (avec ''A ≠ C'' et ''A' ≠ C{{'}}'') vérifient l'égalité ci-dessus, alors il existe trois ''[[Plan (mathématiques)|plan]]s'' parallèles intersectant (d) et (d') respectivement en ''A'' et ''A{{'}}'', en ''B'' et ''B' ''et en ''C'' et ''C{{'}}''.
}}
L'énoncé direct dans le cas général où (d) et (d') ne sont pas nécessairement coplanaires peut se déduire du [[#Cas de trois droites parallèles|théorème de Thalès dans le plan]] en faisant intervenir une troisième droite, coplanaire à chacune des deux.
La « réciproque » se déduit de l'énoncé direct en se plaçant dans le sous-espace de dimension 3 engendré par (d) et (d') et en prenant deux plans parallèles dont l'un contient ''A'' et ''A' '' et l'autre ''C'' et ''C{{'}}'', puis en raisonnant comme en dimension 2 ci-dessus, mais en remplaçant « droites parallèles » par « plans parallèles ».
==== Preuve de l'énoncé direct utilisant une projection affine ====
On peut démontrer directement cet énoncé en dimension quelconque<ref>Pour une démonstration dans le même esprit, cf. Claude Tisseron, ''Géométries affine, projective et euclidienne'', Hermann, {{p.|56-57}}. Une version algébrique plus abstraite est proposée dans {{harvsp|Berger|1979}}, proposition 2.5.1.</ref> à l'aide des notions modernes d'[[espace affine|espaces affine]] et [[espace vectoriel|vectoriel]] et d'[[application affine]]. Soient {{formule|''p''}} la projection affine sur (d') parallèlement aux trois hyperplans, qui envoie {{formule|''A''}}, {{formule|''B''}}, {{formule|''C''}} respectivement sur {{formule|''A{{'}}''}}, {{formule|''B{{'}}''}}, {{formule|''C{{'}}''}}, et <math>\vec p</math> la [[Projecteur (mathématiques)|projection vectorielle]] associée. Si l'on note {{formule|1=''x'' = {{surligner|''AB''}}/{{surligner|''AC''}}}} et {{formule|1=''y'' = {{surligner|''A{{'}}B{{'}}''}}/{{surligner|''A{{'}}C{{'}}''}}}}, alors
:<math>\vec p(\overrightarrow{AB})=\begin{cases}\vec p(x~\overrightarrow{AC})=x~\vec p(\overrightarrow{AC})=x~\overrightarrow{p(A)p(C)}=x~\overrightarrow{A'C'}\\\overrightarrow{p(A)p(B)}=\overrightarrow{A'B'}=y~\overrightarrow{A'C'}\end{cases}\quad\text{donc}\quad x=y</math>.
==== Conservation des birapports par les projections ====
Le [[birapport]] est un invariant projectif associé à quatre points. Le [[Birapport#Rapport_anharmonique_de_quatre_droites_concourantes|théorème de conservation des birapports par projection]] est lié de près au théorème de Thalès, l'un pouvant se déduire de l'autre<ref>Ainsi {{harvsp|Berger|1979|p=163}}, énoncé 6.5.5 explique comment déduire Thalès de cette propriété projective et constitue d'ailleurs la source de ce paragraphe. On trouvera dans l'autre sens des éléments de démonstration du théorème projectif à partir de Thalès à l'article [[Birapport de droites]].</ref>.
De même que les trois droites parallèles du théorème de Thalès peuvent être remplacées par des hyperplans parallèles dans un espace affine de dimension supérieure à 2, les quatre [[droites concourantes]] de ce théorème de conservation des birapports peuvent être remplacées par des hyperplans appartenant à un même [[faisceau de droites|faisceau]] en dimension supérieure.
L'intérêt de ce point de vue est de souligner l'analogie du « rapport » <math>{\overline{AB}}\over{\overline{AC}}</math> intervenant dans le théorème de Thalès avec le birapport utilisé en géométrie projective : le premier est laissé invariant par une transformation affine d'une droite affine vers une autre exactement comme le second est laissé invariant par une transformation projective d'une droite projective vers une autre.
== Applications ==
=== Algèbre géométrique ===
{{section à sourcer|date=février 2023}}
Le théorème de Thalès offre des égalités entre diverses [[fraction (mathématiques)|fractions]]. Si les segments et les triangles appartiennent à la branche mathématique appelée [[géométrie]], les fractions font partie de l'[[algèbre]]. Le fait que le théorème offre des égalités sur les fractions en fait une méthode de démonstration qui s'applique à l'algèbre. Il est possible d'établir toutes les lois régissant le comportement des fractions et, par là, les mécanismes qui permettent de résoudre toutes les [[équation du premier degré|équations du premier degré]]. Cette démarche est décrite dans l'article [[Algèbre géométrique]].
=== Résultats de géométrie projective et rapport avec les homothéties ===
En [[géométrie]], le théorème de Thalès ou sa réciproque peuvent être utilisés pour établir des conditions d'alignement ou de parallélisme. Sans faire appel aux notions de droite projective, ils permettent d'obtenir des versions satisfaisantes des résultats relevant en réalité de la [[géométrie projective]]. Le théorème de Thalès peut être utilisé comme substitut des [[homothétie]]s dans les démonstrations.
* [[Théorème de Ménélaüs]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les points ''A{{'}}'', ''B' ''et ''C' ''sont alignés [[équivalence logique|si et seulement si]] :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=1</math>.</center>
* [[Théorème de Ceva]] : Étant donnés un triangle ''ABC ''et trois points ''A{{'}}'', ''B' ''et ''C' ''appartenant respectivement aux droites (''BC''), (''AC'') et (''AB'') ; les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont concourantes ou parallèles si et seulement si :<center><math>\dfrac{\overline{A'C}}{\overline{A'B}}\cdot\dfrac{\overline{B'A}}{\overline{B'C}}\cdot\dfrac{\overline{C'B}}{\overline{C'A}}=-1</math>.</center>
* [[Théorème de Pappus]] : Soient deux droites ''d'' et ''d{{'}}'' ; trois points ''A'', ''B'' et ''C'' de ''d'' ; trois points ''A{{'}}'', ''B{{'}}'', et ''C{{'}}'' de ''d{{'}}''. On note ''P'', ''Q'' et ''R'' les intersections respectives de (''AB{{'}}'') et (''A{{'}}B''), de (''B{{'}}C'') et (''BC{{'}}''), et de (''AC{{'}}'') et (''A{{'}}C''). Alors les points ''P'', ''Q'' et ''R'' sont alignés.
* [[Théorème de Desargues]] : Soient deux triangles ''ABC'' et ''A{{'}}B{{'}}C{{'}}'' tels que les droites (''AB'') et (''A{{'}}B{{'}}'') sont parallèles, de même pour (''BC'') et (''B{{'}}C{{'}}'') et pour (''AC'') et (''A{{'}}C{{'}}''). Alors les droites (''AA{{'}}''), (''BB{{'}}'') et (''CC{{'}}'') sont parallèles ou concourantes.
=== Nombres constructibles ===
[[Image:Produit constructible.png|thumb|upright=1.5|Construction géométrique du produit.]]
{{Article détaillé|Nombre constructible}}
Une question soulevée durant l'Antiquité, et notamment sous la forme du problème de la [[quadrature du cercle]], est la possibilité de construire une figure à l'aide de la règle (non graduée) et du compas :
* la règle est un instrument idéalisé permettant de considérer une droite passant par deux points déjà tracés ;
* le compas est un instrument idéalisé permettant de considérer un cercle ayant pour centre un point déjà construit et pour rayon le report d'une distance réalisée entre deux points déjà construits.
Un point du plan euclidien est dit [[Construction à la règle et au compas|constructible à la règle et au compas]] s'il peut être obtenu par un nombre fini d'étapes à partir des points de coordonnées (0,0) et (0,1). {{référence nécessaire|À la suite des travaux de Georg Cantor, il peut être affirmé que tous les points constructibles à la règle et au compas sont en nombre [[Ensemble dénombrable|dénombrable]].}}
Un [[nombre constructible]] est un nombre réel qui peut être obtenu comme coordonnée d'un point constructible. L'ensemble des nombres constructibles est stable par somme, produit et inverse, et forme donc un [[sous-corps]] des nombres réels. Le théorème de Thalès montre que le produit de deux nombres constructibles est un nombre constructible. En effet, pour deux réels non nuls constructibles ''{{formule|x}} ''et ''{{formule|y}}'', un calcul donne la justification de la construction ci-contre :
<center>
<math>\dfrac{xy}{x}=\dfrac{y}{1}</math>
</center>
=== Prévision des collisions en navigation ===
[[Fichier:Thales collision navires droit.svg|vignette|upright=2|Si la ligne de vue entre deux navires (N<sub>1</sub>N<sub>2</sub>) est d'orientation constante, la situation mène à une collision.]]
Considérons deux navires voguant à vitesse constante et en ligne droite, par exemple un voilier naviguant à {{unité|5|[[nœud (unité)|nœud]]s}} et un [[porte-conteneurs]] naviguant à {{unité|20|nœuds}}. Le voilier surveille le porte-conteneurs : s'il l'observe toujours dans la même direction, et qu'il le voit se rapprocher, alors la collision est certaine.
En effet, comme le voilier voit le porte-conteneur se rapprocher, les deux trajectoires sont des droites sécantes. Soit C leur point d'intersection. Le voilier a une vitesse ''v''<sub>1</sub> et se situe au temps ''t'' dans la position N<sub>1</sub>(''t''), le porte-conteneur a une vitesse ''v''<sub>2</sub> et se situe au temps ''t'' dans la position N<sub>2</sub>(''t''). Le voilier observe toujours le porte-conteneur dans la même direction signifie que les droites (N<sub>1</sub>(''t'')N<sub>2</sub>(''t'')) sont toutes parallèles entre elles. La distance parcourue entre deux temps ''t'' et ''t''', ''t'' < ''t{{'}}'' est N(''t{{'}}'')N(''t'') = ''v''× (t'−t), et donc
N<sub>2</sub>(''t'')N<sub>2</sub>(''t''{{'}})/N<sub>1</sub>(''t'')N<sub>1</sub>(''t''') = ''v''<sub>2</sub>/''v''<sub>1</sub> = ''k'' (''k'' = 4 pour l'exemple choisi). D'après le théorème de Thalès, N<sub>2</sub>(''t'')C/N<sub>1</sub>(''t'')C = ''k''. Les deux navires atteignent donc en même temps le point C, d'où la collision.
Ainsi, si un navigateur voit un navire toujours dans la même direction, il sait qu'il doit entreprendre une manœuvre d'évitement. Si en revanche il voit l'autre navire se décaler vers la gauche ou vers la droite par rapport à sa ligne de visée, il sait qu'il est en sécurité.
On peut également voir le problème sous l'angle de la [[cinématique]] : si le navire N<sub>2</sub> est toujours observé de N<sub>1</sub> dans la même direction, cela signifie que sa [[relativité galiléenne|vitesse relative]] est un [[vecteur vitesse|vecteur]] dont le support est la droite (N<sub>1</sub>N<sub>2</sub>). Dans le [[référentiel (physique)|référentiel]] lié à N<sub>1</sub>, le navire N<sub>2</sub> a un [[mouvement rectiligne uniforme]] passant par N<sub>1</sub>, d'où la collision.
Ces notions sont appliquées dans les [[Aide de pointage de radar automatique#Fonctionnement|radars arpa]]{{référence souhaitée}}.
{{clr}}
=== La croix du bûcheron ===
À l'aide de deux petits bâtons de même longueur il est possible d'estimer la hauteur d'un arbre en appliquant le théorème de Thalès<ref>{{Lien web |titre=La croix du bûcheron |url=https://www.arbres.org/croix-du-bucheron.htm}}</ref>. Le bâton horizontal est positionné entre les deux yeux en visant la base de l'arbre à hauteur d'homme et le bâton vertical est placé au bout de ce bâton. Le grand triangle est celui formé par nos yeux, la cime de l'arbre et la base du tronc. Le petit triangle est celui formé par nos yeux et les deux extrémités du bâton vertical. Si on se place à une distance telle que le bâton vertical recouvre toute la hauteur de l'arbre dans notre champ de vision alors les deux côtés non verticaux du petit triangle se trouvent alignés avec ceux du grand triangle. Par conséquent on reproduit la figure d'un triangle contenant une parallèle à un côté, cette parallèle étant matérialisée par le bâton vertical. Comme les deux bâtons sont de longueurs égales, la distance qui nous sépare de l'arbre est approximativement égale à un demi mètre près peut-être à celle de la hauteur de l'arbre. Il suffit alors de compter le nombre de pas jusqu'à la base de l'arbre ou de mesurer la distance avec un mètre ruban.
Une autre méthode consiste par temps ensoleillé et sur terrain plat à se placer dans l'ombre de l'arbre de telle manière que le bout de notre ombre se confonde avec celui de l'arbre. Alors il suffit de mesurer la longueur de notre ombre et de celle de l'arbre et d'appliquer la formule de Thalès : le rapport de notre hauteur par notre ombre est égal au rapport de la hauteur de l'arbre par son ombre<ref>{{Lien web |titre=L'ombre de l'arbre pour connaître sa taille |url=https://ad89.occe.coop/uploads/64_3F31A/Ressources/D%C3%A9fi%20coops/Astuces%20-%202%20m%C3%A9thodes%20pour%20mesurer.pdf}}</ref>.
== Notes et références ==
{{Références}}
== Bibliographie ==
* {{chapitre|prénom1=Rudolf|nom1=Bkouche|lien auteur1=Rudolf Bkouche|titre= Autour du théorème de Thalès : variations sur les liens entre le géométrique et le numérique |titre ouvrage=Autour de Thalès |collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://publimath.univ-irem.fr/numerisation/WU/IWU95003/IWU95003.pdf}}
* {{Chapitre|titre chapitre=La percée des Ioniens|auteurs ouvrage=[[Maurice Caveing]] |titre ouvrage=La Figure et le nombre : recherches sur les premières mathématiques des Grecs|collection=Histoire des sciences|éditeur=[[Presses universitaires du Septentrion]] |année=1997|volume=2|pages totales=424|isbn=978-2-859-39494-3 |titre=La percée des Ioniens|auteur=Maurice Caveing|url=https://www.google.fr/books/edition/_/T6CSoU9bMF8C}}
* {{ouvrage |éditeur=PUF |titre=Les Éléments |auteur=Euclide |trad= Bernard Vitrac |volume=1 |titre volume= Livres I à IV. Introduction par Maurice Caveing, notes et commentaires par Bernard Vitrac |année=1990 |lieu=Paris |isbn=2-13-043240-9}}
** {{chapitre|auteur1=[[Maurice Caveing]]|titre=Introduction générale|titre ouvrage=Euclide, Les Éléments, Volume 1|éditeur=PUF|lieu=Paris|année=1990|pages totales=531|passage=13-148|isbn=2-13-043240-9}}
* {{Chapitre |titre=Livre VI : traduction et commentaires |auteur=Euclide |trad= Bernard Vitrac |titre ouvrage= Livres V à IX. Notes et commentaires par Bernard Vitrac |année=1994 |éditeur=PUF |lieu=Paris |passage=143-244 |isbn=2-13-045568-9}}
* {{ouvrage|auteur=[[Euclide]]|titre=L'Optique et la Catoptrique |trad=[[Paul Ver Eecke]] |année=1959 |origyear=1938 |éditeur=Blanchard}}
* {{lien web|auteur=Alain Herreman |année=2017 |titre=Aux sources du « théorème de Thalès ». Sur la condescendance et la recherche de l’origine |url=https://thamous.univ-rennes1.fr/forums/forums/42/exportIrem/etudeThales.html |éditeur=Irem de Rennes}}
* {{article|auteur=Alain Herreman |titre=Aux sources du « théorème du perroquet »| année= 2018 |éditeur=CNRS |revue=Images des Mathématiques|lire en ligne=http://images.math.cnrs.fr/Aux-sources-du-theoreme-du-perroquet.html}} (résumé de l'article précédent)
* {{article|langue=en|prénom2=Tasos|nom2=Patronis|prénom1=Dimitris|nom1=Patsopoulos|journal=The International Journal for the History of Mathematics Education |url=https://silo.tips/download/the-theorem-of-thales-a-study-of-the-naming-of-theorems-in-school-geometry-textb | titre = The Theorem of Thales: A Study of the naming of theorems in school Geometry textbooks|année=2006|volume=1|numéro=1 | lang=en| pages=57-68}}
* {{chapitre|auteur=Henry Plane |titre= Une invention française du {{s-|XX}} : le théorème de Thalès|titre ouvrage=Autour de Thalès|collection=Bulletin Inter-IREM |année=1995 |passage=68-86 |url=https://www.univ-irem.fr/IMG/pdf/03_letheoremedethalesuneinventionfrancaiseduxxsiecle.pdf}}
* {{Ouvrage|auteur1=Proclus|lien auteur1=Proclus|année=1948|titre=Les Commentaires sur le premier livre des ''Éléments'' d'Euclide|traducteur=Paul Ver Eecke|éditeur=Albert Blanchard|lieu=Paris|pages totales=xxiv + 372 p.}}
== Liens externes ==
* {{en}} [[Livre VI des Éléments d'Euclide|Livre VI des ''Éléments'' d'Euclide]], proposition 2, sur le [http://aleph0.clarku.edu/~djoyce/java/elements/bookVI/propVI2.html site de David E. Joyce].
{{Autres projets
|wiktionary =théorème de Thalès
|wikiversity=Triangles et parallèles
}}
{{Portail|géométrie|Grèce antique}}
[[Catégorie:Ligne droite]]
[[Catégorie:Théorème de géométrie|Thalès]]
[[Catégorie:Géométrie du triangle]]
[[Catégorie:Mathématiques élémentaires]]
248oeornmm3c1h6aco7ygljv1tiild2
User:ToluAyod/Main Page
2
174233
750405
750274
2026-07-07T14:28:57Z
ToluAyod
69650
Updated Main Page via StarterKit tool
750405
wikitext
text/x-wiki
{{User:ToluAyod/Starter kit/Welcome banner}}
{{User:ToluAyod/Starter kit/Content categories}}
<div style="display: flex; gap: 4px; align-items: stretch;"><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:ToluAyod/Starter kit/Featured article}}</div><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:ToluAyod/Starter kit/In the news}}</div></div>
{{User:ToluAyod/Starter kit/Did you know}}
<div style="display: flow-root; margin-top: 10px;">{{User:ToluAyod/Starter kit/Featured picture}}</div>
<div style="display: flex; gap: 4px; align-items: stretch; margin-top: 10px;"><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:ToluAyod/Starter kit/Community resources}}</div><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:ToluAyod/Starter kit/Translation resources}}</div></div>
<div style="display: flow-root; margin-top: 10px;">{{User:ToluAyod/Starter kit/Wikipedia's sister projects}}</div>
<div style="display: flow-root; margin-top: 10px;">{{User:ToluAyod/Starter kit/Wikipedia languages}}</div>
__NOTOC__
ey4jiqe78qet067m1mpxoa4xdr2fqpf
User:ToluAyod/Starter kit/Featured article
2
174269
750429
734249
2026-07-07T18:40:20Z
ToluAyod
69650
750429
wikitext
text/x-wiki
<div style="border:1px solid #cef2e0;border-radius:4px;padding:8px;background:#f5fffa;margin-bottom:2px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #a3bfb1;border-radius:4px;background:#cef2e0;">'''Featured article'''</div>
<!-- Add a short excerpt from any well-written article on your wiki.
No need to update daily — refresh when a new article is ready.
To add an image: [[File:Filename.jpg|112px|left|alt=description]] -->
Add article title here – Add a short excerpt here (2–3 sentences). Introduce the topic clearly so readers want to learn more.
<!-- Replace "Full article..." below with: [[Article name|Full article...]] -->
<small>A̱marun ba yet Á̱nietafi̱rika bya mi̱ tsung-a̱byin A̱merika ji ma̱ng bibyin a̱ka̱wa̱tyia̱ a̱sa̱khwot A̱gba̱ndang Kyai A̱sa̱khwot Ndya wu ba̱ ku shot khwo a̱ni, di̱n vak tyong ku shyiat sa̱t, a̱wot ba̱ si̱ ta̱bat swan da̱ a̱ka̱vwuo na̱ yong ma̱ sa̱t a̱ni. Di̱n Shong, á̱ ngyei mba maroons a̱wot mi̱ A̱merika Si̱pen, á̱ ngyei mba cimarrones. Á̱niet ba̱ byia̱ a̱ca̱cet a̱ka̱vwuokhap ba ku shuut A̱marun ba ba̱t. Ba̱ si̱ ta̱bat ya̱khwi da̱ a̱ka̱vwuo ma̱ a̱di̱di̱t nang a̱yin si̱ mi̱n ndyen a̱ni bah, a̱ ma̱ a̱yit mbeang nkuu, da̱nian á̱nietba̱ngyok ta̱wap-a̱byin ba ku kwan tyak ma̱ng a̱mba. A̱marun ba ku kwan zwang ya̱khwi ja mat ba̱ ka cok a̱ka̱vwuonswat mba na. Si̱ huni si̱ tsa jhya̱ ma̱ a̱di̱di̱t ma̱ng á̱nietba̱ngtyok ba, nang A̱marun ba na kin mun-a̱pyia̱ di̱n jen jhyang ma̱ng á̱na̱nvan ba̱ nwuo ma̱ á̱nieta̱wap-a̱byin ba ba̱ byian nkyang. Jen jhyang, A̱marun ba na yet á̱kpa̱ndang-a̱bwuanng bya ma̱ng á̱nietnswat ba ku a̱tsak á̱niet-a̱byin wu.
(A̱jhyem ati̱kut...)</small>
</div>
[[Category:Starter Kit templates]][[Category:Main page templates]]
6uws9si1jmo534ax50flavrl9jrfhb7
User:ToluAyod/Starter kit/In the news
2
174270
750430
734250
2026-07-07T18:44:15Z
ToluAyod
69650
750430
wikitext
text/x-wiki
<div style="border:1px solid #cedff2;border-radius:4px;padding:8px;background:#f5faff;margin-bottom:2px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #a3b0bf;border-radius:4px;background:#cedff2;">'''In the news'''</div>
<!-- Add recent events or news relevant to your community or topic area.
No need to update daily — refresh when something noteworthy happens.
To add an image: [[File:Filename.jpg|64px|right|alt=description]] -->
* Mi̱ di̱ Zwat Tswuon 2026, bibyin A̱fi̱ganisi̱tan ma̱ng Paki̱si̱tan shyia̱ di̱ tang a̱ghyang a̱ka̱ndong mi̱ Zook A̱fi̱ganisi̱tan–Paki̱si̱tan ji.
* Mi̱ da̱ a̱tuk mam 5 Zwat Sweang 2025, á̱niet milyon 12 bya ku tyong Zwang á̱niet-a̱byin Sudan ji swan a̱suswak-ya̱khwi. Á̱niet milyon 3.5 bu shyia̱ a̱byin ka bah. Ba̱ tyong.
* Mi̱ da̱ a̱tuk mam 7 Zwat Tswuon 2026, bibyin A̱BA̱ ma̱ng Iran shyia̱ di̱ kwan Zwang Iran ji a̱mgba̱m ma̱ng shim fwung zwang nhu hu.
</div>
[[Category:Starter Kit templates]][[Category:Main page templates]]
tnapz8nqj2fo4zdeghja2xn2s5v7hy3
User:ToluAyod/Starter kit/Did you know
2
174271
750431
734251
2026-07-07T18:45:00Z
ToluAyod
69650
750431
wikitext
text/x-wiki
<div style="border:1px solid #cef2e0;border-radius:4px;padding:8px;background:#f5fffa;margin-bottom:2px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #a3bfb1;border-radius:4px;background:#cef2e0;">'''Did you know ...'''</div>
<!-- Update with 3–5 interesting facts from recently created or expanded articles.
No need to update daily — refresh when new articles are added.
To add an image: [[File:Filename.jpg|80px|left|alt=description]] -->
* ... nyia̱ ma̱ a̱lyia̱ 1964, Ba̱la A̱de Da̱uke ku cat cuk A̱li Á̱ghyi Fam A̱za ji mi̱ Ka̱duna, mat a̱ yong da̱ a̱kwonu Zangon Katab, mi̱ a̱ si̱ nwai mat A̱tyotyap a̱ghyang, Sheka̱ra̱u Ka̱u Laya a?
* ... nyia̱ mi̱ da̱ a̱lyia̱ 2025, A̱tak Ka̱duna kya yet feang hu mi̱ Swanta hu a̱mgba̱m di̱ kap shita-a̱byin a?
* ... nyia̱ A̱licok A̱jure nang á̱ ku nok tsi̱tsak a̱lyia̱ 1981 ma̱ng 1989 a̱ni, kikya yet mi̱ a̱licok A̱shong ka̱ shyia̱ ma̱ a̱byin Naijeriya a?
</div>
[[Category:Starter Kit templates]][[Category:Main page templates]]
n92rg2qtdmefsce74vlv1sve1gnvh6n
User:Iiirxs/Main Page
2
175955
750395
750380
2026-07-07T12:00:57Z
Iiirxs
49827
Updated Main Page via StarterKit tool
750395
wikitext
text/x-wiki
{{User:Iiirxs/Starter kit/W1}}
{{User:Iiirxs/Starter kit/C1}}
<div style="display: flex; gap: 4px; align-items: stretch;"><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:Iiirxs/Starter kit/F1}}</div><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:Iiirxs/Starter kit/I1}}</div></div>
<div style="display: flex; gap: 4px; align-items: stretch;"><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:Iiirxs/Starter kit/D1}}</div><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:Iiirxs/Starter kit/O1}}</div></div>
<div style="display: flow-root; margin-top: 10px;">{{User:Iiirxs/Starter kit/Fp2}}</div>
<div style="display: flex; gap: 4px; align-items: stretch; margin-top: 10px;"><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:Iiirxs/Starter kit/Cs1}}</div><div style="flex: 1; min-width: 0; display: flex; flex-direction: column;">{{User:Iiirxs/Starter kit/Tr1}}</div></div>
<div style="display: flow-root; margin-top: 10px;">{{User:Iiirxs/Starter kit/Ws2}}</div>
<div style="display: flow-root; margin-top: 10px;">{{User:Iiirxs/Starter kit/Wl2}}</div>
__NOTOC__
p30fy41lxah6sxw5a5ajmotq3hihudq
750467
750395
2026-07-08T07:42:09Z
Iiirxs
49827
Blanked the page
750467
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
750484
750467
2026-07-08T09:45:44Z
Iiirxs
49827
Updated Main Page via StarterKit tool
750484
wikitext
text/x-wiki
{{User:Iiirxs/Starter kit/wb873}}
{{User:Iiirxs/Starter kit/cc873}}
<div style="display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; align-items: stretch;">{{User:Iiirxs/Starter kit/fa873}}{{User:Iiirxs/Starter kit/itn873}}</div>
<div style="display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; align-items: stretch;">{{User:Iiirxs/Starter kit/dyk873}}{{User:Iiirxs/Starter kit/otd873}}</div>
<div style="display: flow-root; margin-top: 10px;">{{User:Iiirxs/Starter kit/fp873}}</div>
<div style="display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; align-items: stretch; margin-top: 10px;">{{User:Iiirxs/Starter kit/cr873}}{{User:Iiirxs/Starter kit/tr873}}</div>
<div style="display: flow-root; margin-top: 10px;">{{User:Iiirxs/Starter kit/wsp873}}</div>
<div style="display: flow-root; margin-top: 10px;">{{User:Iiirxs/Starter kit/wl873}}</div>
__NOTOC__
6kbd99zf1yjng63ocfnshfbdjk079ib
Big Duck
0
176861
750396
750280
2026-07-07T12:07:15Z
RoySmith
37545
/* Background */ rm extra braces
750396
wikitext
text/x-wiki
{{Short description|Historic commercial building in New York}}
{{Featured article}}
{{Use American English|date=September 2025}}
{{Use mdy dates|date=September 2024}}
{{Infobox NRHP
| name = The Big Duck
| image = Big Duck 2018 05.jpg
| caption =
| location = [[Flanders, New York]]
| nearest_city =
| coordinates = {{Coord|40|54|25.9|N|72|37|20.6|W|type:landmark_region:US-NY|display=inline,title}}
| mapframe = yes
| mapframe-marker = building
| mapframe-zoom = 8
| mapframe-caption = Interactive map showing the Big Duck’s location
| built = 1931
| website = {{URL|bigduck.org}}
| architecture = Novelty architecture
| added = April 28, 1997
| refnum = 97000164
| alt = A building which looks like a large white duck with an orange beak. The duck appears to be sitting on the ground. There is a doorway in the front, below the head.
| designated_other1_name = New York State Register
| designated_other1 = New York State
| designated_other1_abbr = NYSRHP
| designated_other1_date = January 17, 1997
}}
'''Note: this is here on testwiki so people can explore sub-referencing. If you want to try something out, go ahead and play.'''
The '''Big Duck''' is a {{convert|20|ft|m|adj=on}} tall [[ferrocement]] building in the shape of a duck: a canonical example of [[novelty architecture]]. Built in 1931 in [[Riverhead, New York]], United States, it was moved several times to various locations on eastern [[Long Island]], ending up in [[Flanders, New York|Flanders]] in 2007. Well-known for its distinctive appearance, this structure inspired the word ''duck'' as a common term in academic literature used to refer to buildings shaped like everyday objects or describe excessive ornamentation used in graphical presentations of data.
The Big Duck was built in 1931 by duck farmer Martin Maurer for use as a shop to sell ducks and duck eggs. This was during a period when duck farming was a growing industry on eastern Long Island and novelty architecture was on the rise due to the increasing popularity of automobiles. The building attracted both widespread academic criticism and public acclaim. It was added to both the [[National Register of Historic Places listings in Suffolk County, New York|National Register of Historic Places]] and the [[New York State Register of Historic Places]] in 1997 and is a principal building on the [[Big Duck Ranch]], which was listed on both registers in 2008.
==Background==
The Big Duck is a duck-shaped building in [[Flanders, New York]], {{Convert|15 by 30|ft}} in [[Multiview orthographic projection#Plan|plan]] and {{convert|20|ft|m}} tall to the top of the head, enclosing {{Convert|11 by 15|ft}} of interior space.<ref name=":8" details="page 2" /> An example of [[novelty architecture]] (also known as mimetic architecture),<ref name=":8" details="page 1">{{Cite web |date=April 28, 1997 |title=Big Duck, The (Section 8: Statement of Significance) |url=https://catalog.archives.gov/id/75322039 |website=[[National Register of Historic Places]] |access-date=June 26, 2024 |archive-date=July 4, 2024 |archive-url=https://web.archive.org/web/20240704165838/https://npgallery.nps.gov/NRHP/AssetDetail/b3b6da4c-0c8a-4569-b612-ef361de621ab |url-status=live |last=Auwaerter|first=John}}</ref> it was designed in 1931 by duck farmer Martin Maurer for use as a farm shop as well as for publicity.<ref name=":2">{{Cite news |last=Ketcham |first=Diane |date=July 30, 1995 |title=About Long Island; A Cherished Roadside Symbol of the Region |url=https://www.nytimes.com/1995/07/30/nyregion/about-long-island-a-cherished-roadside-symbol-of-the-region.html |work=[[The New York Times]] |page=LI-2}}</ref><ref name=":1" /> The use of mimetic architecture for roadside buildings was a growing trend in the United States by the late 1920s, with buildings having been constructed in the shape of a giant milk bottle, a tea kettle, a dog, and a [[tepee]]. The increasing popularity of the automobile meant that people were driving past roadside stores at high speed, necessitating large displays (described by landscape preservationist John Auwaerter as being of "bizarre scale"<ref name=":8" details="page 2" />) to attract the attention of passing motorists.<ref>{{Cite news |last=Gutis |first=Phillip S. |date=August 26, 1987 |title=Suffolk Plans to Preserve 'Icon' of Roadside Eating |url=https://www.nytimes.com/1987/08/26/nyregion/suffolk-plans-to-preserve-icon-of-roadside-eating.html |work=[[The New York Times]] |pages=B1–B2}}</ref>
Duck farming on the east end of [[Long Island]] started as a means for farmers to earn additional income, possibly in the early 19th century. The regional industry expanded when the [[American Pekin]] breed was introduced to the area in 1873; by 1915 it included nearly a dozen farms with a combined annual production of one million ducks.<ref name=":7" details="pages 76-77">{{Cite book
|last=Weigold
|first=Marilyn E.
|title=Peconic Bay: Four Centuries of History on Long Island's North and South Forks
|publisher=[[Syracuse University Press]] |year=2015
|isbn=978-0-8156-1045-8
|edition=1st
|location=Syracuse, New York
|id={{project muse|40139|type=book}}}}
</ref> In 1939, approximately 90 farms in [[Suffolk County, New York|Suffolk County]] were producing an aggregate of three million ducks annually; many of these were out of business by the 1980s due to changing environmental regulations and increased real-estate prices.<ref name=":8" details="page 1" />}} By 2015, only the Crescent Duck Farm, which had opened in 1908 in [[Aquebogue]], remained.<ref>{{Cite news |last=Feiden |first=Douglas |date=June 8, 2015 |title=Corwin Family Operates What Is Now the Last Duck Farm Left on Long Island |url=http://www.wsj.com/articles/corwin-family-operates-what-is-now-the-last-duck-farm-left-on-long-island-1433725226 |work=[[Wall Street Journal]]}}</ref>
Maurer was inspired by a building he had seen during a 1931 trip to California. He had stopped at the [[Ben-Hur Coffee Shop]] on [[Wilshire Boulevard]] in [[Los Angeles]] which was topped by a 15-foot tall [[stucco]] coffee pot. Reportedly, Maurer started planning the Big Duck while eating lunch that day,<ref name=":0">{{Cite web |last=Upton |first=Cody |date=October 4, 2012 |title=The Flanders Duck |url=https://www.theparisreview.org/blog/2012/10/04/the-flanders-duck/ |access-date=April 20, 2026|website=[[The Paris Review]]}}</ref> sketching the design on a napkin.<ref name=":1" />
== Construction ==
[[File:The Big Duck Trademark Registration Certificate (cropped and rotated).jpg|alt=Refer to caption|thumb|US Trademark 296,767: The Big Duck Ranch]]After returning home from his California trip, Maurer talked to local contractors about building the duck-shaped shop, but could not find any who wanted the job. He ended up hiring carpenter George Reeve, along with William and Samuel Collins, brothers who worked in New York theatres as set and prop designers.<ref name=":3">{{Cite web |title=The Big Duck |url=https://www.suffolkcountyny.gov/Departments/Parks/Historic-Sites/The-Big-Duck/Big-Duck-History |access-date=June 25, 2024 |website=Suffolk County Government: Parks |archive-date=June 25, 2024 |archive-url=https://web.archive.org/web/20240625151424/https://www.suffolkcountyny.gov/Departments/Parks/Historic-Sites/The-Big-Duck/Big-Duck-History |url-status=live}}</ref><ref name=":10" />{{rp|page=4}} A live duck was used as a model, and a cooked chicken carcass was examined to ensure an anatomically accurate structure.<ref name=":3" /> After the wooden framework was complete, wire mesh was added and a masonry subcontractor, Smith & Yeager, was brought in to finish the job with four coats of [[Atlas Portland Cement Company|Atlas Cement]],<ref name=":10" /> a building method known as [[ferrocement]].<ref>{{Cite web |date=March 17, 2023 |title=This Old Place: The Big Duck is a symbol of Long Island's duck farming past |url=https://northforker.com/2023/03/this-old-place-the-big-duck-is-a-symbol-of-long-islands-duck-farming-past/ |access-date=July 1, 2024 |website=Northforker |language=en-US |archive-date=July 4, 2024 |archive-gurl=https://web.archive.org/web/20240704165837/https://northforker.com/2023/03/this-old-place-the-big-duck-is-a-symbol-of-long-islands-duck-farming-past/ |url-status=live }}</ref> Construction costs totaled $3,800 ({{Inflation|index=US-GDP|value=3800|start_year=1931|r=-2|fmt=eq}}).<ref name=":10" /> The eyes, made from the tail lights of a [[Ford Model T]], glowed red at night.<ref name=":)" />
The Big Duck opened for business in June 1931, selling ducks and duck eggs.<ref name=":4" /> In August, Maurer applied for a trademark for "The Big Duck Ranch"; it was granted a year later, renewed in 1972, and expired in 1993.<ref>{{US trademark|71318066}}</ref> The building was featured on the Atlas Cement Company's 1931 promotional calendar<ref name=":4">{{Cite report |url=https://www.suffolkcountyny.gov/Portals/0/formsdocs/planning/EnvPlanning/LIDuckHistory/AppA.pdf |title=Long Island Duck Farm History and Ecosystem Restoration Opportunities Suffolk County, Long Island, New York: A Brief History of the Eastern Long Island Duck Farm Industry |date=February 2009 |publisher=US Army Corps of Engineers New York District and Suffolk County, NY |pages=3–4 |archive-date=August 13, 2022 |archive-url=https://web.archive.org/web/20220813013219/https://www.suffolkcountyny.gov/Portals/0/formsdocs/planning/EnvPlanning/LIDuckHistory/AppA.pdf |url-status=live |last=Verbarg|first=Ronald}}</ref> and the November 1932 issue of ''[[Popular Mechanics]]'' covered it briefly, noting that it contained a salesroom and an office and sat on a foundation of concrete blocks.<ref>{{Cite magazine |date=November 1932 |title=Concrete Bird Draws Attention to Duck Farm |url=https://books.google.com/books?id=i-IDAAAAMBAJ&dq=Concrete+Bird+Draws+Attention+to+Duck+Farm.&pg=PA703 |magazine=[[Popular Mechanics]] |page=703 |volume=58 |issue=5 |archive-date=June 25, 2024 |archive-url=https://web.archive.org/web/20240625174143/https://books.google.com/books?id=i-IDAAAAMBAJ&pg=PA703&dq=Concrete+Bird+Draws+Attention+to+Duck+Farm.&hl=en&sa=X&ved=2ahUKEwjyiofEpPeGAxULFFkFHT5sDt0Q6AF6BAgFEAI#v=onepage&q=Concrete%20Bird%20Draws%20Attention%20to%20Duck%20Farm.&f=false |url-status=live }}</ref> A miniature version was installed at the [[1939 World's Fair]] by the [[Drake's Cakes|Drake Baking Company]], with the condition that it be destroyed once the fair was over.<ref name=":10">{{Cite journal |last=Mansfield |first=Howard |author-link=Howard Mansfield |year=1984 |title=The Big Duck |url=https://www.usmodernist.org/SITES/SITES-7.pdf |journal=Sites |volume=12 |pages=2–9}}</ref>
=== Relocations ===
{{maplink
|display = inline
|frame = yes
|frame-align = right
|frame-width = 250 <!-- to match the default image thumbnails -->
|frame-coordinates={{Coord|40.91|-72.62}}
|zoom = 10
|text=Big Duck locations: (1) Riverhead, (2) Flanders, (3) Sears Bellows Park
|type = point
|marker = -number
|description = Riverhead
|coord = {{Coord|40.915762|-72.683876}}
|type2 = point
|marker2 = -number
|description2 = Flanders
|coord2 = {{Coord|40.907424|-72.622158}}
|type3 = point
|marker3 = -number
|description3 = Sears Bellows Park
|coord3 = {{Coord|40.8792|-72.5536}}
}}
[[File:Moving the Big Duck -- 1988 (49882934283).jpg|alt=The duck on top of a multi-wheeled building moving rig.|thumb|Moving the Big Duck]]
The building was originally constructed in 1931 on West Main Street ([[New York State Route 25]]) in the Upper Mills section of [[Riverhead (CDP), New York|Riverhead]].<ref>{{Cite news |last=Civiletti |first=Denise |date=November 23, 2020 |title=Memorializing the Big Duck's original roost in Riverhead |url=https://riverheadlocal.com/2020/11/23/memorializing-the-big-ducks-original-roost-in-riverhead/ |work=Riverhead Local }}</ref><ref>{{Cite web |date=2020-06-03 |title=Early Duck Farm |url=https://www.wgpfoundation.org/historic-markers/early-duck-farm/ |access-date=2026-05-09 |website=William G. Pomeroy Foundation |language=en-US}}</ref> In 1937, Maurer had the building [[House raising|lifted from its foundation]] and [[Structure relocation|relocated]] to his new duck ranch in Flanders, {{convert|4|mi|km|spell=in}} away.<ref name=":8" details="page 3" />
The Big Duck closed as a store in 1984. Four years later, the Suffolk County Department of Parks and Recreation acquired the building, moved it to Sears Bellows County Park between Flanders and [[Hampton Bays]], and repurposed it as a gift shop operated by the Friends for Long Island Heritage.<ref name=":8" details="page 4" /><ref>{{Cite web |last=Pierpont |first=Ruth L. |date=September 13, 2007 |title=Letter to Alexis Abernathy |url=https://catalog.archives.gov/id/75322039 |website=[[National Register of Historic Places]] |at=PDF sheet 57 |access-date=November 27, 2025 |archive-date=July 4, 2024 |archive-url=https://web.archive.org/web/20240704165838/https://npgallery.nps.gov/NRHP/AssetDetail/b3b6da4c-0c8a-4569-b612-ef361de621ab |url-status=live }}</ref> The Department of Parks publicized the move with a "Lost My Nest" sign soliciting donations; keeping with the mimetic theme, it was shaped like a giant suitcase with a handle on top.<ref>{{Cite news |last=Freedman |first=Mitchell |date=1991-11-20 |title=Old Nest for Big Duck |url=https://www.newspapers.com/article/newsday-suffolk-edition-old-nest-for-b/196933394/ |access-date=2026-05-05 |work=[[Newsday|Newsday (Suffolk Edition)]] |page=NS-33}}</ref>
In 2004, a proposal was made to move the Big Duck to [[Long Island MacArthur Airport]] in [[Ronkonkoma, New York|Ronkonkoma]], with the move estimated to cost at least $60,000 ({{Inflation|index=US-GDP|value=60000|start_year=2004|r=-3|fmt=eq}}). Proponents suggested this would increase the number of visitors and help publicize the airport's new terminal building<ref>{{cite web |url=https://www.nytimes.com/2004/08/29/opinion/make-way-for-the-big-duck.html |title=Make Way for The Big Duck |last=McShane |first=William |date=August 29, 2004 |work=[[The New York Times]] |quote= |archive-date=May 28, 2015 |archive-url=https://web.archive.org/web/20150528062222/http://www.nytimes.com/2004/08/29/opinion/make-way-for-the-big-duck.html |url-status=live }}</ref> but the move never happened and the building was returned to its 1937 Flanders location on October 6, 2007. Local house moving contractor Guy Davis donated the cost of the four-mile move and the [[Southampton, New York|Town of Southampton]] picked up the $50,000 in costs ({{Inflation|index=US-GDP|value=50000|start_year=2007|r=-3|fmt=eq}}) to prepare the route.<ref name=":1">{{Cite news |last=Finn |first=Robin |date=October 14, 2007 |title=Big Duck Is Back at Hamptons' Gateway |url=https://www.nytimes.com/2007/10/14/nyregion/nyregionspecial2/14colli.html |work=[[The New York Times]] |archive-date=June 29, 2024 |archive-url=https://web.archive.org/web/20240629021608/https://www.nytimes.com/2007/10/14/nyregion/nyregionspecial2/14colli.html |url-status=live }}</ref> The current location of the building is accessible from the [[Long Island Rail Road]] via the [[Riverhead station]].<ref name=":9">{{Cite web |last=DiGioia |first=Paula |date=August 9, 2022 |title=NY's Cherished Roadside Attraction, Long Island's Big Duck, is a Train Ride Away |url=https://away.mta.info/articles/long-islands-big-duck-new-york-roadside-attraction/ |access-date=April 20, 2026 |website=[[Metropolitan Transportation Authority]]}}</ref>
== Popular reaction ==
[[Image:The Big Duck on NY 24.jpg|thumb|Historic site marker on [[New York State Route 24]] before the Duck|alt=Roadside sign reading "The Big Duck" and below that, "Historic Site", with an arrow pointing to the right.]]
Buildings such as the Big Duck are classified as novelty or mimetic architecture, with the term ''duck'' used more specifically to describe buildings that are in the shape of an everyday object to which they relate. In 1997, the Big Duck was listed on the [[National Register of Historic Places]] and also on the [[New York State Register of Historic Places]].<ref name=":8" /> The [[Big Duck Ranch]], where the Big Duck is located, was individually added to the National Register in 2008.<ref>{{Cite web |date=September 12, 2008 |title=Big Duck Ranch |url=https://npgallery.nps.gov/NRHP/AssetDetail/0e9d3367-2649-46be-875c-54151955edee |website=National Register of Historic Places |access-date=June 26, 2024 |archive-date=July 4, 2024 |archive-url=https://web.archive.org/web/20240704165838/https://npgallery.nps.gov/NRHP/AssetDetail/0e9d3367-2649-46be-875c-54151955edee |url-status=live }}</ref>
A drawing of the building by [[Saul Steinberg]] was featured on the May 11, 1987, cover of ''[[The New Yorker]]''.<ref>{{Cite magazine |last=Steinberg |first=Saul |date=May 11, 1987 |title=front cover |url=https://www.newyorker.com/magazine/1987/05/11 |access-date=May 5, 2026 |magazine=[[The New Yorker]]}}</ref> In her 2015 book, historian Marilyn Weigold called the building an "impressive piece of folk art".<ref name=":7" /> In a tradition dating to 1988, the Big Duck is lit up for Christmas each year, with local residents attending the ceremony. Joshua Needelman of ''[[Newsday]]'' compared the event to the [[Rockefeller Center Christmas Tree|annual lighting of the tree]] at [[Rockefeller Center]] in [[Midtown Manhattan]], noting that the latter tradition began in 1931, the year of the Big Duck's construction.<ref>{{Cite news |last=Needelman |first=Joshua |date=December 1, 2025 |title=Rockefeller Tree, Big Duck to be Lit |work=[[Newsday]] |page=10 |id={{ProQuest|3276800154}}}}</ref>
An attempt was made in 1997 to turn the structure into a museum consisting of fifteen buildings typical of an early 20th-century Long Island roadside. The project had been proposed by the Suffolk County Department of Parks with support from the [[New York State Council on the Arts|New York Council on the Arts]] but was unable to make any progress due to insufficient funding and legal obstacles. The latter included [[Land-use planning|land-use regulations]] protecting the surrounding [[Pine barrens|pine barren]] and a lawsuit which prevented a planned donation of a [[diner]] from being completed.<ref>{{Cite book |last1=Sculle |first1=Keith A. |title=Remembering Roadside America |last2=Jakle |first2=John A. |publisher=[[The University of Tennessee Press]] |year=2011 |isbn=978-1-57233-833-3 |edition=1st |location=Knoxville, Tennessee |pages=206 |id={{project muse|13562|type=book}}}}</ref>
== Academic commentary ==
=== Architecture ===
{{Multiple image
| align = right
| direction = vertical
| footer_align = left
| image1 = The lake at Greenbelt, Maryland, Marion Post Wolcott.tif
| caption1 = Taken by Marion Post Wolcott, 1938
| alt1 = Two women and two small children at the edge of a lake. Nearby in the water are a flock of ducks and other waterfowl swimming.
| image2 = Small family feeding ducks in park on Saturday afternoon, Minneapolis, Minnesota, John Vachon.tif
| caption2 = Taken by John Vachon, 1939
| alt2 = Family at the end of a pond. A man and woman are sitting on a park bench. A toddler is on the ground in front of them, being approached by a flock of ducks walking out of the water.
| header = Images from ''God's Own Junkyard''
}}
Peter Blake, the managing editor of ''[[Architectural Forum]]'', was one of the first architects to criticize the Big Duck, offering a pessimistic view of the building and the [[commercialism]] it represented in his 1964 book ''God's Own Junkyard.''<ref name=":8" details="page 3" /> In the preface, he wrote that his book was "a deliberate attack upon all those who have already befouled a large portion of this country for private gain"<ref name=":5">{{Cite book |last=Blake |first=Peter |url=http://archive.org/details/godsownjunkyardp0000blak_p6d1 |url-access=registration |title=God's own junkyard : the planned deterioration of America's landscape |publisher=[[Holt McDougal#History|Rinehart and Winston]] |year=1964 |isbn=978-0-03-043885-1 |location=New York |pages=7, photos 101–103}}</ref> and [[Ada Louise Huxtable]] wrote in her ''[[The New York Times|New York Times]]'' book review that it decried the "babel of billboards" and automobile-focused [[Googie architecture]].<ref>{{Cite news |last=Huxtable |first=Ada Louise |author-link=Ada Louise Huxtable |date=January 12, 1964 |title=America the Beautiful, Defaced, Mutilated |url=https://www.nytimes.com/1964/01/12/archives/gods-own-junkyard-the-planned-deterioration-of-americas-landscape.html |work=[[The New York Times]]|page=BR-7}}</ref> Blake was familiar with the building from summers he had spent in the nearby [[The Hamptons|Hamptons]];<ref name=":11">{{Cite book |last=Esperdy |first=Gabrielle |title=American Autopia |publisher=[[University of Virginia Press]] |year=2019 |isbn=978-0-8139-4295-7 |page=170 |id={{project muse|68360|type=book}}}}</ref> he presented his own photo of it opposite those by [[Marion Post Wolcott]] and [[John Vachon]] showing idyllic scenes of families with small children playing among ducks at the edge of a pond.<ref name=":5" />
Architects [[Robert Venturi]] and [[Denise Scott Brown]] wrote about ''ducks'' in a 1971 ''Architectural Forum'' article without explicitly defining what they meant by the term as they would in later publications. The two stated that modernist architects had ceased to apply ornamentation to their designs and were instead making the buildings themselves the ornamentation: "In promoting Space and Articulation over symbolism and ornament they distorted the whole building into a ''duck''." They concluded the article by urging their peers to heed the advice of 19th-century architect [[Augustus Pugin]] that it was "all right to decorate construction but never to construct decoration".<ref>{{Cite journal |last=Venturi |first=Robert |author-link=Robert Venturi |last2=Scott Brown |first2=Denise |author-link2=Denise Scott Brown |date=December 1971 |title=Ugly and Ordinary Architecture or the Decorated Shed |url=https://www.usmodernist.org/AF/AF-1971-12.pdf |journal=[[Architectural Forum]] |volume=135 |issue=5 |pages=48-53}}</ref>
More famously, Venturi and Scott Brown wrote about the disparity between highway signs that advertise businesses and the buildings that house those businesses in their 1977 book, ''Learning from Las Vegas.'' Using [[U.S. Route 66]] as an example, they observed that the signs are large, vulgar, and consume a disparate portion of the business's budget. The buildings on the other hand are smaller, more modest, and cheap. They contrasted this with the Big Duck{{Snd}}which they referred to as "The Long Island Duckling"{{Snd}}calling it a "sculptural symbol and architectural shelter", noting that "Sometimes the building is the sign."<ref name=":6">{{cite book |last1=Venturi |first1=Robert |url=https://archive.org/details/learningfromlasv0000vent//www.amst.umd.edu/Research/cultland/annotations/Venturi1.html |url-access=registration |title=Learning from Las Vegas: The Forgotten Symbolism of Architectural Form |last2=Scott Brown |first2=Denise |last3=Izenour |first3=Steven |publisher=[[MIT Press]] |year=1977 |isbn=0-262-72006-X |location=Cambridge, Massachusetts }}</ref>{{Rp|page=13}} They used the term ''duck'' to refer to "a special building that ''is'' a symbol", as differentiated from a "conventional shelter that ''applies'' symbols", which they called a "decorated shed".<ref name=":6" />{{Rp|pages=87-89}} Seven years after ''Las Vegas'', [[Howard Mansfield]] wrote that the book had resulted in the ''duck'' becoming a "popular character actor", working its way into the academic vernacular and appearing frequently in journals such as ''Architectural Forum.'' Huxtable referred to ''ducks'' often in her reviews, to describe "buildings straining after symbolism when there is nothing to symbolize."<ref name=":10" />
By 1972, [[James Wines]], writing in ''Architectural Forum'', observed that the Big Duck was often used as a negative example by architects and critics writing in academic publications, tracing this back to Blake. Wines called the building "an extraordinary example of indigenous American roadway architecture" although he described the scale of the building as "absurd", saying that it was "too small for a store and too big for a duck". He said the Big Duck ignores the [[Modern architecture|modernist]] axiom that [[form follows function]] and posited the alternative Duck Design Theory, that "form follows fantasy".<ref>{{Cite journal |last=Malpass |first=Matt |date=Spring 2015 |title=Criticism and Function in Critical Design Practice |journal=[[Design Issues]] |volume=31 |issue=2 |pages=59-71 |jstor=43829380}}</ref><ref>{{Cite journal |last=Wines |first=James |author-link=James Wines |date=April 1972 |title=The Case for the Big Duck |url=https://www.usmodernist.org/AF/AF-1972-04.pdf |journal=[[The Architectural Forum]] |volume=136 |issue=3 |pages=60–61, 72}}</ref>
[[File:Long Island duck, Long Island, New York LCCN2017708800 (cropped).jpg|alt=Photo of The Big Duck with trees in the background|thumb|Photographed by John Margolies, between 1972 and 2008]]
Architectural historian Gabrielle Esperdy argued in ''American Autopia'' that the Big Duck's immortality came not from Blake's original inclusion as one photo out of more than a hundred, but from Venturi and Scott Brown's "appropriation" of the building in their own book. She credited ''Learning from Las Vegas'' with inspiring roadside photographer [[John Margolies]] to make his own image of the building and leading to its inclusion on the National Register.<ref name=":11" /> In another historical treatment, Luis Miguel Lus Arana and Gabriele Neri also ascribed the Big Duck's fame to Venturi, adding that the building possesses a "proud obliviousness to its own tackiness".<ref>{{Cite journal |last1=Arana |first1=Luis Miguel Lus |last2=Neri |first2=Gabriele |title=Just for Laughs. Breve Introduccion alas Muchas y Multifacéticas Interacciones Entre Arquitectura y Humor |trans-title=Just for laughs. an Introduction to the Many, Multi-faceted Interactions Between Architecture and Humour |journal=Revista de Arquitectura |volume=27 |pages=7–27 |id={{ProQuest|3278665966}}}}</ref> Journalist [[Phil Patton]] presented a different view in ''The All-American Roadside.'' He argued that the Big Duck's path to notoriety had to do not so much with its form, but rather with an accident of its location that exposed it to New York's architectural and artistic circles. In addition to being near Peter Blake's summer home, it was not far from the house of well-known artist [[Jackson Pollock]].<ref>{{Cite web |title=Pollock-Krasner House and Study Center |url=https://savingplaces.org/distinctive-destinations/pollock-kranser-house-and-study-center |access-date=2026-05-06 |website=[[National Trust for Historic Preservation]]}}</ref><ref>{{Cite book |last=Patton |first=Phil |url=http://archive.org/details/openroadcelebrat00patt |title=Open Road: a Celebration of the American Highway |publisher=[[Simon and Schuster]] |year=1986 |isbn=978-0-671-53021-1 |location=New York |page=220}}</ref>
Architecture professor [[Caroline O'Donnell]] used the Big Duck as an example of [[architecture parlante]] in her 2015 book ''Niche Topics.'' She defined the term, coined in 1852, as "an expression of programmatic meaning through form in a humorous and sometimes provocative way". The fact that the building looked funny was a key differentiator between being merely a ''decorated shed'' and being a ''duck''.<ref>{{Cite book |last=O'Donnell |first=Caroline |title=Niche Tactics: Generative Relationships Between Architecture and Site |publisher=[[Routledge]] |year=2015 |isbn=978-1-138-79312-5 |pages=160-162|location=New York and Abingdon, Oxfordshire}}</ref> Humanities professor Margaret Grubiak examined the [[Ark Encounter]] Christian theme park in her 2020 treatment of [[religious architecture]], ''Monumental Jesus.'' She described the park's full-scale recreation of [[Noah's Ark]] as "an architectural paradox of sculpture and building" and compared it to the Big Duck for the literalist advertising function they both perform.<ref>{{Cite book |last=Grubiak |first=Margaret M. |title=Monumental Jesus |publisher=[[University of Virginia Press]] |year=2020 |isbn=978-0-8139-4374-9 |location=Charlottesville, Virginia |page=130 |id={{project muse|71994|type=book}}}}</ref>
=== Information design ===
The information scientist and statistician [[Edward Tufte]]'s ''The Visual Display of Quantitative Information'' uses the term ''duck'' in a different context, saying it is explicitly named after the Big Duck to describe irrelevant decorative elements in [[information design]]:<ref>{{Cite book |last=Tufte |first=Edward R. |author-link=Edward Tufte |title=The Visual Display of Quantitative Information |publisher=Graphics Press |year=2001 |edition=2nd |location=Cheshire, Connecticut |pages=116 |isbn=978-0-9613921-4-7}}</ref>
{{Blockquote|text=When a graphic is taken over by decorative forms or computer debris, when the data measures and structures become Design Elements, when the overall design purveys Graphical Style rather than quantitative information, then the graphic may be called a ''duck'' in honor of the duck-form store, "Big Duck." For this building the whole structure is itself decoration, just as in the duck data graphic.}}Tufte describes ''ducks'' as "flamboyant" and "marginally useful", lumping them into the larger category of "[[chartjunk]]".<ref>{{Cite journal |last=Monmonier |first=Mark |date=December 1985 |title=Reviewed Work(s): Semiology of Graphics: Diagrams, Networks, Maps by Jacques Bertin and William J. Berg; The Visual Display of Quantitative Information by Edward R. Tufte |journal=[[Annals of the Association of American Geographers]] |volume=75 |issue=4 |pages=605-609 |jstor=2563117}}</ref>
== References ==
{{Sister project auto}}
{{Reflist}}
{{National Register of Historic Places in New York|state=collapsed}}
[[Category:Commercial buildings on the National Register of Historic Places in New York (state)]]
[[Category:Ducks in popular culture]]
[[Category:New York State Register of Historic Places in Suffolk County]]
[[Category:National Register of Historic Places in Southampton (town), New York]]
[[Category:Novelty buildings in New York (state)]]
[[Category:Roadside attractions in New York (state)]]
[[Category:Sculptures of birds in New York (state)]]
[[Category:Tourist attractions on Long Island]]
[[Category:Commercial buildings completed in 1931]]
[[Category:1931 establishments in New York (state)]]
3hs38xh0ouj4r75us8u3gbigz02519t
750397
750396
2026-07-07T12:09:06Z
RoySmith
37545
again
750397
wikitext
text/x-wiki
{{Short description|Historic commercial building in New York}}
{{Featured article}}
{{Use American English|date=September 2025}}
{{Use mdy dates|date=September 2024}}
{{Infobox NRHP
| name = The Big Duck
| image = Big Duck 2018 05.jpg
| caption =
| location = [[Flanders, New York]]
| nearest_city =
| coordinates = {{Coord|40|54|25.9|N|72|37|20.6|W|type:landmark_region:US-NY|display=inline,title}}
| mapframe = yes
| mapframe-marker = building
| mapframe-zoom = 8
| mapframe-caption = Interactive map showing the Big Duck’s location
| built = 1931
| website = {{URL|bigduck.org}}
| architecture = Novelty architecture
| added = April 28, 1997
| refnum = 97000164
| alt = A building which looks like a large white duck with an orange beak. The duck appears to be sitting on the ground. There is a doorway in the front, below the head.
| designated_other1_name = New York State Register
| designated_other1 = New York State
| designated_other1_abbr = NYSRHP
| designated_other1_date = January 17, 1997
}}
'''Note: this is here on testwiki so people can explore sub-referencing. If you want to try something out, go ahead and play.'''
The '''Big Duck''' is a {{convert|20|ft|m|adj=on}} tall [[ferrocement]] building in the shape of a duck: a canonical example of [[novelty architecture]]. Built in 1931 in [[Riverhead, New York]], United States, it was moved several times to various locations on eastern [[Long Island]], ending up in [[Flanders, New York|Flanders]] in 2007. Well-known for its distinctive appearance, this structure inspired the word ''duck'' as a common term in academic literature used to refer to buildings shaped like everyday objects or describe excessive ornamentation used in graphical presentations of data.
The Big Duck was built in 1931 by duck farmer Martin Maurer for use as a shop to sell ducks and duck eggs. This was during a period when duck farming was a growing industry on eastern Long Island and novelty architecture was on the rise due to the increasing popularity of automobiles. The building attracted both widespread academic criticism and public acclaim. It was added to both the [[National Register of Historic Places listings in Suffolk County, New York|National Register of Historic Places]] and the [[New York State Register of Historic Places]] in 1997 and is a principal building on the [[Big Duck Ranch]], which was listed on both registers in 2008.
==Background==
The Big Duck is a duck-shaped building in [[Flanders, New York]], {{Convert|15 by 30|ft}} in [[Multiview orthographic projection#Plan|plan]] and {{convert|20|ft|m}} tall to the top of the head, enclosing {{Convert|11 by 15|ft}} of interior space.<ref name=":8" details="page 2" /> An example of [[novelty architecture]] (also known as mimetic architecture),<ref name=":8" details="page 1">{{Cite web |date=April 28, 1997 |title=Big Duck, The (Section 8: Statement of Significance) |url=https://catalog.archives.gov/id/75322039 |website=[[National Register of Historic Places]] |access-date=June 26, 2024 |archive-date=July 4, 2024 |archive-url=https://web.archive.org/web/20240704165838/https://npgallery.nps.gov/NRHP/AssetDetail/b3b6da4c-0c8a-4569-b612-ef361de621ab |url-status=live |last=Auwaerter|first=John}}</ref> it was designed in 1931 by duck farmer Martin Maurer for use as a farm shop as well as for publicity.<ref name=":2">{{Cite news |last=Ketcham |first=Diane |date=July 30, 1995 |title=About Long Island; A Cherished Roadside Symbol of the Region |url=https://www.nytimes.com/1995/07/30/nyregion/about-long-island-a-cherished-roadside-symbol-of-the-region.html |work=[[The New York Times]] |page=LI-2}}</ref><ref name=":1" /> The use of mimetic architecture for roadside buildings was a growing trend in the United States by the late 1920s, with buildings having been constructed in the shape of a giant milk bottle, a tea kettle, a dog, and a [[tepee]]. The increasing popularity of the automobile meant that people were driving past roadside stores at high speed, necessitating large displays (described by landscape preservationist John Auwaerter as being of "bizarre scale"<ref name=":8" details="page 2" />) to attract the attention of passing motorists.<ref>{{Cite news |last=Gutis |first=Phillip S. |date=August 26, 1987 |title=Suffolk Plans to Preserve 'Icon' of Roadside Eating |url=https://www.nytimes.com/1987/08/26/nyregion/suffolk-plans-to-preserve-icon-of-roadside-eating.html |work=[[The New York Times]] |pages=B1–B2}}</ref>
Duck farming on the east end of [[Long Island]] started as a means for farmers to earn additional income, possibly in the early 19th century. The regional industry expanded when the [[American Pekin]] breed was introduced to the area in 1873; by 1915 it included nearly a dozen farms with a combined annual production of one million ducks.<ref name=":7" details="pages 76-77">{{Cite book
|last=Weigold
|first=Marilyn E.
|title=Peconic Bay: Four Centuries of History on Long Island's North and South Forks
|publisher=[[Syracuse University Press]] |year=2015
|isbn=978-0-8156-1045-8
|edition=1st
|location=Syracuse, New York
|id={{project muse|40139|type=book}}}}
</ref> In 1939, approximately 90 farms in [[Suffolk County, New York|Suffolk County]] were producing an aggregate of three million ducks annually; many of these were out of business by the 1980s due to changing environmental regulations and increased real-estate prices.<ref name=":8" details="page 1" /> By 2015, only the Crescent Duck Farm, which had opened in 1908 in [[Aquebogue]], remained.<ref>{{Cite news |last=Feiden |first=Douglas |date=June 8, 2015 |title=Corwin Family Operates What Is Now the Last Duck Farm Left on Long Island |url=http://www.wsj.com/articles/corwin-family-operates-what-is-now-the-last-duck-farm-left-on-long-island-1433725226 |work=[[Wall Street Journal]]}}</ref>
Maurer was inspired by a building he had seen during a 1931 trip to California. He had stopped at the [[Ben-Hur Coffee Shop]] on [[Wilshire Boulevard]] in [[Los Angeles]] which was topped by a 15-foot tall [[stucco]] coffee pot. Reportedly, Maurer started planning the Big Duck while eating lunch that day,<ref name=":0">{{Cite web |last=Upton |first=Cody |date=October 4, 2012 |title=The Flanders Duck |url=https://www.theparisreview.org/blog/2012/10/04/the-flanders-duck/ |access-date=April 20, 2026|website=[[The Paris Review]]}}</ref> sketching the design on a napkin.<ref name=":1" />
== Construction ==
[[File:The Big Duck Trademark Registration Certificate (cropped and rotated).jpg|alt=Refer to caption|thumb|US Trademark 296,767: The Big Duck Ranch]]After returning home from his California trip, Maurer talked to local contractors about building the duck-shaped shop, but could not find any who wanted the job. He ended up hiring carpenter George Reeve, along with William and Samuel Collins, brothers who worked in New York theatres as set and prop designers.<ref name=":3">{{Cite web |title=The Big Duck |url=https://www.suffolkcountyny.gov/Departments/Parks/Historic-Sites/The-Big-Duck/Big-Duck-History |access-date=June 25, 2024 |website=Suffolk County Government: Parks |archive-date=June 25, 2024 |archive-url=https://web.archive.org/web/20240625151424/https://www.suffolkcountyny.gov/Departments/Parks/Historic-Sites/The-Big-Duck/Big-Duck-History |url-status=live}}</ref><ref name=":10" />{{rp|page=4}} A live duck was used as a model, and a cooked chicken carcass was examined to ensure an anatomically accurate structure.<ref name=":3" /> After the wooden framework was complete, wire mesh was added and a masonry subcontractor, Smith & Yeager, was brought in to finish the job with four coats of [[Atlas Portland Cement Company|Atlas Cement]],<ref name=":10" /> a building method known as [[ferrocement]].<ref>{{Cite web |date=March 17, 2023 |title=This Old Place: The Big Duck is a symbol of Long Island's duck farming past |url=https://northforker.com/2023/03/this-old-place-the-big-duck-is-a-symbol-of-long-islands-duck-farming-past/ |access-date=July 1, 2024 |website=Northforker |language=en-US |archive-date=July 4, 2024 |archive-gurl=https://web.archive.org/web/20240704165837/https://northforker.com/2023/03/this-old-place-the-big-duck-is-a-symbol-of-long-islands-duck-farming-past/ |url-status=live }}</ref> Construction costs totaled $3,800 ({{Inflation|index=US-GDP|value=3800|start_year=1931|r=-2|fmt=eq}}).<ref name=":10" /> The eyes, made from the tail lights of a [[Ford Model T]], glowed red at night.<ref name=":)" />
The Big Duck opened for business in June 1931, selling ducks and duck eggs.<ref name=":4" /> In August, Maurer applied for a trademark for "The Big Duck Ranch"; it was granted a year later, renewed in 1972, and expired in 1993.<ref>{{US trademark|71318066}}</ref> The building was featured on the Atlas Cement Company's 1931 promotional calendar<ref name=":4">{{Cite report |url=https://www.suffolkcountyny.gov/Portals/0/formsdocs/planning/EnvPlanning/LIDuckHistory/AppA.pdf |title=Long Island Duck Farm History and Ecosystem Restoration Opportunities Suffolk County, Long Island, New York: A Brief History of the Eastern Long Island Duck Farm Industry |date=February 2009 |publisher=US Army Corps of Engineers New York District and Suffolk County, NY |pages=3–4 |archive-date=August 13, 2022 |archive-url=https://web.archive.org/web/20220813013219/https://www.suffolkcountyny.gov/Portals/0/formsdocs/planning/EnvPlanning/LIDuckHistory/AppA.pdf |url-status=live |last=Verbarg|first=Ronald}}</ref> and the November 1932 issue of ''[[Popular Mechanics]]'' covered it briefly, noting that it contained a salesroom and an office and sat on a foundation of concrete blocks.<ref>{{Cite magazine |date=November 1932 |title=Concrete Bird Draws Attention to Duck Farm |url=https://books.google.com/books?id=i-IDAAAAMBAJ&dq=Concrete+Bird+Draws+Attention+to+Duck+Farm.&pg=PA703 |magazine=[[Popular Mechanics]] |page=703 |volume=58 |issue=5 |archive-date=June 25, 2024 |archive-url=https://web.archive.org/web/20240625174143/https://books.google.com/books?id=i-IDAAAAMBAJ&pg=PA703&dq=Concrete+Bird+Draws+Attention+to+Duck+Farm.&hl=en&sa=X&ved=2ahUKEwjyiofEpPeGAxULFFkFHT5sDt0Q6AF6BAgFEAI#v=onepage&q=Concrete%20Bird%20Draws%20Attention%20to%20Duck%20Farm.&f=false |url-status=live }}</ref> A miniature version was installed at the [[1939 World's Fair]] by the [[Drake's Cakes|Drake Baking Company]], with the condition that it be destroyed once the fair was over.<ref name=":10">{{Cite journal |last=Mansfield |first=Howard |author-link=Howard Mansfield |year=1984 |title=The Big Duck |url=https://www.usmodernist.org/SITES/SITES-7.pdf |journal=Sites |volume=12 |pages=2–9}}</ref>
=== Relocations ===
{{maplink
|display = inline
|frame = yes
|frame-align = right
|frame-width = 250 <!-- to match the default image thumbnails -->
|frame-coordinates={{Coord|40.91|-72.62}}
|zoom = 10
|text=Big Duck locations: (1) Riverhead, (2) Flanders, (3) Sears Bellows Park
|type = point
|marker = -number
|description = Riverhead
|coord = {{Coord|40.915762|-72.683876}}
|type2 = point
|marker2 = -number
|description2 = Flanders
|coord2 = {{Coord|40.907424|-72.622158}}
|type3 = point
|marker3 = -number
|description3 = Sears Bellows Park
|coord3 = {{Coord|40.8792|-72.5536}}
}}
[[File:Moving the Big Duck -- 1988 (49882934283).jpg|alt=The duck on top of a multi-wheeled building moving rig.|thumb|Moving the Big Duck]]
The building was originally constructed in 1931 on West Main Street ([[New York State Route 25]]) in the Upper Mills section of [[Riverhead (CDP), New York|Riverhead]].<ref>{{Cite news |last=Civiletti |first=Denise |date=November 23, 2020 |title=Memorializing the Big Duck's original roost in Riverhead |url=https://riverheadlocal.com/2020/11/23/memorializing-the-big-ducks-original-roost-in-riverhead/ |work=Riverhead Local }}</ref><ref>{{Cite web |date=2020-06-03 |title=Early Duck Farm |url=https://www.wgpfoundation.org/historic-markers/early-duck-farm/ |access-date=2026-05-09 |website=William G. Pomeroy Foundation |language=en-US}}</ref> In 1937, Maurer had the building [[House raising|lifted from its foundation]] and [[Structure relocation|relocated]] to his new duck ranch in Flanders, {{convert|4|mi|km|spell=in}} away.<ref name=":8" details="page 3" />
The Big Duck closed as a store in 1984. Four years later, the Suffolk County Department of Parks and Recreation acquired the building, moved it to Sears Bellows County Park between Flanders and [[Hampton Bays]], and repurposed it as a gift shop operated by the Friends for Long Island Heritage.<ref name=":8" details="page 4" /><ref>{{Cite web |last=Pierpont |first=Ruth L. |date=September 13, 2007 |title=Letter to Alexis Abernathy |url=https://catalog.archives.gov/id/75322039 |website=[[National Register of Historic Places]] |at=PDF sheet 57 |access-date=November 27, 2025 |archive-date=July 4, 2024 |archive-url=https://web.archive.org/web/20240704165838/https://npgallery.nps.gov/NRHP/AssetDetail/b3b6da4c-0c8a-4569-b612-ef361de621ab |url-status=live }}</ref> The Department of Parks publicized the move with a "Lost My Nest" sign soliciting donations; keeping with the mimetic theme, it was shaped like a giant suitcase with a handle on top.<ref>{{Cite news |last=Freedman |first=Mitchell |date=1991-11-20 |title=Old Nest for Big Duck |url=https://www.newspapers.com/article/newsday-suffolk-edition-old-nest-for-b/196933394/ |access-date=2026-05-05 |work=[[Newsday|Newsday (Suffolk Edition)]] |page=NS-33}}</ref>
In 2004, a proposal was made to move the Big Duck to [[Long Island MacArthur Airport]] in [[Ronkonkoma, New York|Ronkonkoma]], with the move estimated to cost at least $60,000 ({{Inflation|index=US-GDP|value=60000|start_year=2004|r=-3|fmt=eq}}). Proponents suggested this would increase the number of visitors and help publicize the airport's new terminal building<ref>{{cite web |url=https://www.nytimes.com/2004/08/29/opinion/make-way-for-the-big-duck.html |title=Make Way for The Big Duck |last=McShane |first=William |date=August 29, 2004 |work=[[The New York Times]] |quote= |archive-date=May 28, 2015 |archive-url=https://web.archive.org/web/20150528062222/http://www.nytimes.com/2004/08/29/opinion/make-way-for-the-big-duck.html |url-status=live }}</ref> but the move never happened and the building was returned to its 1937 Flanders location on October 6, 2007. Local house moving contractor Guy Davis donated the cost of the four-mile move and the [[Southampton, New York|Town of Southampton]] picked up the $50,000 in costs ({{Inflation|index=US-GDP|value=50000|start_year=2007|r=-3|fmt=eq}}) to prepare the route.<ref name=":1">{{Cite news |last=Finn |first=Robin |date=October 14, 2007 |title=Big Duck Is Back at Hamptons' Gateway |url=https://www.nytimes.com/2007/10/14/nyregion/nyregionspecial2/14colli.html |work=[[The New York Times]] |archive-date=June 29, 2024 |archive-url=https://web.archive.org/web/20240629021608/https://www.nytimes.com/2007/10/14/nyregion/nyregionspecial2/14colli.html |url-status=live }}</ref> The current location of the building is accessible from the [[Long Island Rail Road]] via the [[Riverhead station]].<ref name=":9">{{Cite web |last=DiGioia |first=Paula |date=August 9, 2022 |title=NY's Cherished Roadside Attraction, Long Island's Big Duck, is a Train Ride Away |url=https://away.mta.info/articles/long-islands-big-duck-new-york-roadside-attraction/ |access-date=April 20, 2026 |website=[[Metropolitan Transportation Authority]]}}</ref>
== Popular reaction ==
[[Image:The Big Duck on NY 24.jpg|thumb|Historic site marker on [[New York State Route 24]] before the Duck|alt=Roadside sign reading "The Big Duck" and below that, "Historic Site", with an arrow pointing to the right.]]
Buildings such as the Big Duck are classified as novelty or mimetic architecture, with the term ''duck'' used more specifically to describe buildings that are in the shape of an everyday object to which they relate. In 1997, the Big Duck was listed on the [[National Register of Historic Places]] and also on the [[New York State Register of Historic Places]].<ref name=":8" /> The [[Big Duck Ranch]], where the Big Duck is located, was individually added to the National Register in 2008.<ref>{{Cite web |date=September 12, 2008 |title=Big Duck Ranch |url=https://npgallery.nps.gov/NRHP/AssetDetail/0e9d3367-2649-46be-875c-54151955edee |website=National Register of Historic Places |access-date=June 26, 2024 |archive-date=July 4, 2024 |archive-url=https://web.archive.org/web/20240704165838/https://npgallery.nps.gov/NRHP/AssetDetail/0e9d3367-2649-46be-875c-54151955edee |url-status=live }}</ref>
A drawing of the building by [[Saul Steinberg]] was featured on the May 11, 1987, cover of ''[[The New Yorker]]''.<ref>{{Cite magazine |last=Steinberg |first=Saul |date=May 11, 1987 |title=front cover |url=https://www.newyorker.com/magazine/1987/05/11 |access-date=May 5, 2026 |magazine=[[The New Yorker]]}}</ref> In her 2015 book, historian Marilyn Weigold called the building an "impressive piece of folk art".<ref name=":7" /> In a tradition dating to 1988, the Big Duck is lit up for Christmas each year, with local residents attending the ceremony. Joshua Needelman of ''[[Newsday]]'' compared the event to the [[Rockefeller Center Christmas Tree|annual lighting of the tree]] at [[Rockefeller Center]] in [[Midtown Manhattan]], noting that the latter tradition began in 1931, the year of the Big Duck's construction.<ref>{{Cite news |last=Needelman |first=Joshua |date=December 1, 2025 |title=Rockefeller Tree, Big Duck to be Lit |work=[[Newsday]] |page=10 |id={{ProQuest|3276800154}}}}</ref>
An attempt was made in 1997 to turn the structure into a museum consisting of fifteen buildings typical of an early 20th-century Long Island roadside. The project had been proposed by the Suffolk County Department of Parks with support from the [[New York State Council on the Arts|New York Council on the Arts]] but was unable to make any progress due to insufficient funding and legal obstacles. The latter included [[Land-use planning|land-use regulations]] protecting the surrounding [[Pine barrens|pine barren]] and a lawsuit which prevented a planned donation of a [[diner]] from being completed.<ref>{{Cite book |last1=Sculle |first1=Keith A. |title=Remembering Roadside America |last2=Jakle |first2=John A. |publisher=[[The University of Tennessee Press]] |year=2011 |isbn=978-1-57233-833-3 |edition=1st |location=Knoxville, Tennessee |pages=206 |id={{project muse|13562|type=book}}}}</ref>
== Academic commentary ==
=== Architecture ===
{{Multiple image
| align = right
| direction = vertical
| footer_align = left
| image1 = The lake at Greenbelt, Maryland, Marion Post Wolcott.tif
| caption1 = Taken by Marion Post Wolcott, 1938
| alt1 = Two women and two small children at the edge of a lake. Nearby in the water are a flock of ducks and other waterfowl swimming.
| image2 = Small family feeding ducks in park on Saturday afternoon, Minneapolis, Minnesota, John Vachon.tif
| caption2 = Taken by John Vachon, 1939
| alt2 = Family at the end of a pond. A man and woman are sitting on a park bench. A toddler is on the ground in front of them, being approached by a flock of ducks walking out of the water.
| header = Images from ''God's Own Junkyard''
}}
Peter Blake, the managing editor of ''[[Architectural Forum]]'', was one of the first architects to criticize the Big Duck, offering a pessimistic view of the building and the [[commercialism]] it represented in his 1964 book ''God's Own Junkyard.''<ref name=":8" details="page 3" /> In the preface, he wrote that his book was "a deliberate attack upon all those who have already befouled a large portion of this country for private gain"<ref name=":5">{{Cite book |last=Blake |first=Peter |url=http://archive.org/details/godsownjunkyardp0000blak_p6d1 |url-access=registration |title=God's own junkyard : the planned deterioration of America's landscape |publisher=[[Holt McDougal#History|Rinehart and Winston]] |year=1964 |isbn=978-0-03-043885-1 |location=New York |pages=7, photos 101–103}}</ref> and [[Ada Louise Huxtable]] wrote in her ''[[The New York Times|New York Times]]'' book review that it decried the "babel of billboards" and automobile-focused [[Googie architecture]].<ref>{{Cite news |last=Huxtable |first=Ada Louise |author-link=Ada Louise Huxtable |date=January 12, 1964 |title=America the Beautiful, Defaced, Mutilated |url=https://www.nytimes.com/1964/01/12/archives/gods-own-junkyard-the-planned-deterioration-of-americas-landscape.html |work=[[The New York Times]]|page=BR-7}}</ref> Blake was familiar with the building from summers he had spent in the nearby [[The Hamptons|Hamptons]];<ref name=":11">{{Cite book |last=Esperdy |first=Gabrielle |title=American Autopia |publisher=[[University of Virginia Press]] |year=2019 |isbn=978-0-8139-4295-7 |page=170 |id={{project muse|68360|type=book}}}}</ref> he presented his own photo of it opposite those by [[Marion Post Wolcott]] and [[John Vachon]] showing idyllic scenes of families with small children playing among ducks at the edge of a pond.<ref name=":5" />
Architects [[Robert Venturi]] and [[Denise Scott Brown]] wrote about ''ducks'' in a 1971 ''Architectural Forum'' article without explicitly defining what they meant by the term as they would in later publications. The two stated that modernist architects had ceased to apply ornamentation to their designs and were instead making the buildings themselves the ornamentation: "In promoting Space and Articulation over symbolism and ornament they distorted the whole building into a ''duck''." They concluded the article by urging their peers to heed the advice of 19th-century architect [[Augustus Pugin]] that it was "all right to decorate construction but never to construct decoration".<ref>{{Cite journal |last=Venturi |first=Robert |author-link=Robert Venturi |last2=Scott Brown |first2=Denise |author-link2=Denise Scott Brown |date=December 1971 |title=Ugly and Ordinary Architecture or the Decorated Shed |url=https://www.usmodernist.org/AF/AF-1971-12.pdf |journal=[[Architectural Forum]] |volume=135 |issue=5 |pages=48-53}}</ref>
More famously, Venturi and Scott Brown wrote about the disparity between highway signs that advertise businesses and the buildings that house those businesses in their 1977 book, ''Learning from Las Vegas.'' Using [[U.S. Route 66]] as an example, they observed that the signs are large, vulgar, and consume a disparate portion of the business's budget. The buildings on the other hand are smaller, more modest, and cheap. They contrasted this with the Big Duck{{Snd}}which they referred to as "The Long Island Duckling"{{Snd}}calling it a "sculptural symbol and architectural shelter", noting that "Sometimes the building is the sign."<ref name=":6">{{cite book |last1=Venturi |first1=Robert |url=https://archive.org/details/learningfromlasv0000vent//www.amst.umd.edu/Research/cultland/annotations/Venturi1.html |url-access=registration |title=Learning from Las Vegas: The Forgotten Symbolism of Architectural Form |last2=Scott Brown |first2=Denise |last3=Izenour |first3=Steven |publisher=[[MIT Press]] |year=1977 |isbn=0-262-72006-X |location=Cambridge, Massachusetts }}</ref>{{Rp|page=13}} They used the term ''duck'' to refer to "a special building that ''is'' a symbol", as differentiated from a "conventional shelter that ''applies'' symbols", which they called a "decorated shed".<ref name=":6" />{{Rp|pages=87-89}} Seven years after ''Las Vegas'', [[Howard Mansfield]] wrote that the book had resulted in the ''duck'' becoming a "popular character actor", working its way into the academic vernacular and appearing frequently in journals such as ''Architectural Forum.'' Huxtable referred to ''ducks'' often in her reviews, to describe "buildings straining after symbolism when there is nothing to symbolize."<ref name=":10" />
By 1972, [[James Wines]], writing in ''Architectural Forum'', observed that the Big Duck was often used as a negative example by architects and critics writing in academic publications, tracing this back to Blake. Wines called the building "an extraordinary example of indigenous American roadway architecture" although he described the scale of the building as "absurd", saying that it was "too small for a store and too big for a duck". He said the Big Duck ignores the [[Modern architecture|modernist]] axiom that [[form follows function]] and posited the alternative Duck Design Theory, that "form follows fantasy".<ref>{{Cite journal |last=Malpass |first=Matt |date=Spring 2015 |title=Criticism and Function in Critical Design Practice |journal=[[Design Issues]] |volume=31 |issue=2 |pages=59-71 |jstor=43829380}}</ref><ref>{{Cite journal |last=Wines |first=James |author-link=James Wines |date=April 1972 |title=The Case for the Big Duck |url=https://www.usmodernist.org/AF/AF-1972-04.pdf |journal=[[The Architectural Forum]] |volume=136 |issue=3 |pages=60–61, 72}}</ref>
[[File:Long Island duck, Long Island, New York LCCN2017708800 (cropped).jpg|alt=Photo of The Big Duck with trees in the background|thumb|Photographed by John Margolies, between 1972 and 2008]]
Architectural historian Gabrielle Esperdy argued in ''American Autopia'' that the Big Duck's immortality came not from Blake's original inclusion as one photo out of more than a hundred, but from Venturi and Scott Brown's "appropriation" of the building in their own book. She credited ''Learning from Las Vegas'' with inspiring roadside photographer [[John Margolies]] to make his own image of the building and leading to its inclusion on the National Register.<ref name=":11" /> In another historical treatment, Luis Miguel Lus Arana and Gabriele Neri also ascribed the Big Duck's fame to Venturi, adding that the building possesses a "proud obliviousness to its own tackiness".<ref>{{Cite journal |last1=Arana |first1=Luis Miguel Lus |last2=Neri |first2=Gabriele |title=Just for Laughs. Breve Introduccion alas Muchas y Multifacéticas Interacciones Entre Arquitectura y Humor |trans-title=Just for laughs. an Introduction to the Many, Multi-faceted Interactions Between Architecture and Humour |journal=Revista de Arquitectura |volume=27 |pages=7–27 |id={{ProQuest|3278665966}}}}</ref> Journalist [[Phil Patton]] presented a different view in ''The All-American Roadside.'' He argued that the Big Duck's path to notoriety had to do not so much with its form, but rather with an accident of its location that exposed it to New York's architectural and artistic circles. In addition to being near Peter Blake's summer home, it was not far from the house of well-known artist [[Jackson Pollock]].<ref>{{Cite web |title=Pollock-Krasner House and Study Center |url=https://savingplaces.org/distinctive-destinations/pollock-kranser-house-and-study-center |access-date=2026-05-06 |website=[[National Trust for Historic Preservation]]}}</ref><ref>{{Cite book |last=Patton |first=Phil |url=http://archive.org/details/openroadcelebrat00patt |title=Open Road: a Celebration of the American Highway |publisher=[[Simon and Schuster]] |year=1986 |isbn=978-0-671-53021-1 |location=New York |page=220}}</ref>
Architecture professor [[Caroline O'Donnell]] used the Big Duck as an example of [[architecture parlante]] in her 2015 book ''Niche Topics.'' She defined the term, coined in 1852, as "an expression of programmatic meaning through form in a humorous and sometimes provocative way". The fact that the building looked funny was a key differentiator between being merely a ''decorated shed'' and being a ''duck''.<ref>{{Cite book |last=O'Donnell |first=Caroline |title=Niche Tactics: Generative Relationships Between Architecture and Site |publisher=[[Routledge]] |year=2015 |isbn=978-1-138-79312-5 |pages=160-162|location=New York and Abingdon, Oxfordshire}}</ref> Humanities professor Margaret Grubiak examined the [[Ark Encounter]] Christian theme park in her 2020 treatment of [[religious architecture]], ''Monumental Jesus.'' She described the park's full-scale recreation of [[Noah's Ark]] as "an architectural paradox of sculpture and building" and compared it to the Big Duck for the literalist advertising function they both perform.<ref>{{Cite book |last=Grubiak |first=Margaret M. |title=Monumental Jesus |publisher=[[University of Virginia Press]] |year=2020 |isbn=978-0-8139-4374-9 |location=Charlottesville, Virginia |page=130 |id={{project muse|71994|type=book}}}}</ref>
=== Information design ===
The information scientist and statistician [[Edward Tufte]]'s ''The Visual Display of Quantitative Information'' uses the term ''duck'' in a different context, saying it is explicitly named after the Big Duck to describe irrelevant decorative elements in [[information design]]:<ref>{{Cite book |last=Tufte |first=Edward R. |author-link=Edward Tufte |title=The Visual Display of Quantitative Information |publisher=Graphics Press |year=2001 |edition=2nd |location=Cheshire, Connecticut |pages=116 |isbn=978-0-9613921-4-7}}</ref>
{{Blockquote|text=When a graphic is taken over by decorative forms or computer debris, when the data measures and structures become Design Elements, when the overall design purveys Graphical Style rather than quantitative information, then the graphic may be called a ''duck'' in honor of the duck-form store, "Big Duck." For this building the whole structure is itself decoration, just as in the duck data graphic.}}Tufte describes ''ducks'' as "flamboyant" and "marginally useful", lumping them into the larger category of "[[chartjunk]]".<ref>{{Cite journal |last=Monmonier |first=Mark |date=December 1985 |title=Reviewed Work(s): Semiology of Graphics: Diagrams, Networks, Maps by Jacques Bertin and William J. Berg; The Visual Display of Quantitative Information by Edward R. Tufte |journal=[[Annals of the Association of American Geographers]] |volume=75 |issue=4 |pages=605-609 |jstor=2563117}}</ref>
== References ==
{{Sister project auto}}
{{Reflist}}
{{National Register of Historic Places in New York|state=collapsed}}
[[Category:Commercial buildings on the National Register of Historic Places in New York (state)]]
[[Category:Ducks in popular culture]]
[[Category:New York State Register of Historic Places in Suffolk County]]
[[Category:National Register of Historic Places in Southampton (town), New York]]
[[Category:Novelty buildings in New York (state)]]
[[Category:Roadside attractions in New York (state)]]
[[Category:Sculptures of birds in New York (state)]]
[[Category:Tourist attractions on Long Island]]
[[Category:Commercial buildings completed in 1931]]
[[Category:1931 establishments in New York (state)]]
395ifwo625p6rf6hv1mximt7u9y3q95
User:Iiirxs/Starter kit/Wl2
2
176899
750392
2026-07-07T11:59:00Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750392
wikitext
text/x-wiki
<div style="border:1px solid #CBD5E1;border-radius:4px;background:#ffffff;overflow:hidden;">
<div style="background:#F8FAFC;border-bottom:1px solid #CBD5E1;padding:8px 16px;font-weight:bold;">Wikipedia languages</div>
<div style="padding:16px;">
Many [https://meta.wikimedia.org/wiki/List_of_Wikipedias other Wikipedias are available]; some of the largest are listed below.
<ul style="list-style:none;margin:8px 0 0 0;padding:0;">
<li style="margin-bottom:12px;">
<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px;">
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
<div style="font-weight:bold;white-space:nowrap;">1,000,000+ articles</div>
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
</div>
<div style="line-height:2;">
[https://ar.wikipedia.org/wiki/ العربية] ·
[https://de.wikipedia.org/wiki/ Deutsch] ·
[https://es.wikipedia.org/wiki/ Español] ·
[https://fa.wikipedia.org/wiki/ فارسی]‎ ·
[https://fr.wikipedia.org/wiki/ Français] ·
[https://it.wikipedia.org/wiki/ Italiano] ·
[https://nl.wikipedia.org/wiki/ Nederlands] ·
[https://ja.wikipedia.org/wiki/ 日本語] ·
[https://pl.wikipedia.org/wiki/ Polski] ·
[https://pt.wikipedia.org/wiki/ Português] ·
[https://ru.wikipedia.org/wiki/ Русский] ·
[https://sv.wikipedia.org/wiki/ Svenska] ·
[https://uk.wikipedia.org/wiki/ Українська] ·
[https://vi.wikipedia.org/wiki/ Tiếng Việt] ·
[https://zh.wikipedia.org/wiki/ 中文]
</div>
</li>
<li style="margin-bottom:12px;">
<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px;">
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
<div style="font-weight:bold;white-space:nowrap;">250,000+ articles</div>
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
</div>
<div style="line-height:2;">
[https://id.wikipedia.org/wiki/ Bahasa Indonesia] ·
[https://ms.wikipedia.org/wiki/ Bahasa Melayu] ·
[https://nan.wikipedia.org/wiki/ 閩南語] ·
[https://bg.wikipedia.org/wiki/ Български] ·
[https://ca.wikipedia.org/wiki/ Català] ·
[https://cs.wikipedia.org/wiki/ Čeština] ·
[https://da.wikipedia.org/wiki/ Dansk] ·
[https://et.wikipedia.org/wiki/ Eesti] ·
[https://el.wikipedia.org/wiki/ Ελληνικά] ·
[https://eo.wikipedia.org/wiki/ Esperanto] ·
[https://eu.wikipedia.org/wiki/ Euskara] ·
[https://he.wikipedia.org/wiki/ עברית] ·
[https://hy.wikipedia.org/wiki/ Հայերեն] ·
[https://ko.wikipedia.org/wiki/ 한국어] ·
[https://hu.wikipedia.org/wiki/ Magyar] ·
[https://no.wikipedia.org/wiki/ Norsk] ·
[https://ro.wikipedia.org/wiki/ Română] ·
[https://simple.wikipedia.org/wiki/ Simple English] ·
[https://sk.wikipedia.org/wiki/ Slovenčina] ·
[https://sr.wikipedia.org/wiki/ Српски] ·
[https://sh.wikipedia.org/wiki/ Srpskohrvatski] ·
[https://fi.wikipedia.org/wiki/ Suomi] ·
[https://tr.wikipedia.org/wiki/ Türkçe] ·
[https://uz.wikipedia.org/wiki/ Oʻzbek]
</div>
</li>
<li style="margin-bottom:4px;">
<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px;">
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
<div style="font-weight:bold;white-space:nowrap;">50,000+ articles</div>
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
</div>
<div style="line-height:2;">
[https://ast.wikipedia.org/wiki/ Asturianu] ·
[https://az.wikipedia.org/wiki/ Azərbaycanca] ·
[https://bn.wikipedia.org/wiki/ বাংলা] ·
[https://bs.wikipedia.org/wiki/ Bosanski] ·
[https://ckb.wikipedia.org/wiki/ کوردی] ·
[https://fy.wikipedia.org/wiki/ Frysk] ·
[https://ga.wikipedia.org/wiki/ Gaeilge] ·
[https://gl.wikipedia.org/wiki/ Galego] ·
[https://hr.wikipedia.org/wiki/ Hrvatski] ·
[https://ka.wikipedia.org/wiki/ ქართული] ·
[https://ku.wikipedia.org/wiki/ Kurdî] ·
[https://lv.wikipedia.org/wiki/ Latviešu] ·
[https://lt.wikipedia.org/wiki/ Lietuvių] ·
[https://ml.wikipedia.org/wiki/ മലയാളം] ·
[https://mk.wikipedia.org/wiki/ Македонски] ·
[https://my.wikipedia.org/wiki/ မြန်မာဘာသာ] ·
[https://nn.wikipedia.org/wiki/ Norsk nynorsk] ·
[https://pa.wikipedia.org/wiki/ ਪੰਜਾਬੀ] ·
[https://sq.wikipedia.org/wiki/ Shqip] ·
[https://sl.wikipedia.org/wiki/ Slovenščina] ·
[https://th.wikipedia.org/wiki/ ไทย] ·
[https://te.wikipedia.org/wiki/ తెలుగు] ·
[https://ur.wikipedia.org/wiki/ اردو]
</div>
</li>
</ul>
</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
qfil1o4vm3tqidfgmg9xjryqel5ppoz
Category:2026 Winter Olympics
14
176900
750399
2026-07-07T12:55:36Z
DMburugu (WMF)
61358
Initial page
750399
wikitext
text/x-wiki
Category
j4pitvzoqcr25pr00h2drxooe7c3ppu
Category:Winter Olympics 2026
14
176901
750403
2026-07-07T13:26:26Z
DMburugu (WMF)
61358
Created page with "A page"
750403
wikitext
text/x-wiki
A page
j1bren97nrv0zjdw86pbqh5hg6hzki7
User:ToluAyod/Starter kit/Content categoriess
2
176902
750404
2026-07-07T14:27:39Z
ToluAyod
69650
Initialised by StarterKit tool — ready for translation
750404
wikitext
text/x-wiki
<div style="margin:10px 0;box-shadow:0 1px 1px rgba(0,0,0,0.1);background:#fff;">
{| style="border-spacing:1px;border-collapse:separate;width:100%;text-align:center;font-size:0.9em;padding:2px 3px;" class="hp-portalen"
| style="background:#F9F9F0;border-top:5px solid #999933;padding:3px 0.25em;width:25%;text-align:center;" | Arts & Literature
| style="background:#F4F9F0;border-top:5px solid #669933;padding:3px 0.25em;width:25%;text-align:center;" | Countries & Geography
| style="background:#F0F9F9;border-top:5px solid #339999;padding:3px 0.25em;width:25%;text-align:center;" | Science & Technology
| style="background:#F9F0F9;border-top:5px solid #993399;padding:3px 0.25em;width:25%;text-align:center;" | History & Events
|}
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
0s8mszlcwb2cozbahdpie2j7dr3wlnh
Wikipedia:Requests/Permissions/Barkeep49 3
4
176903
750435
2026-07-07T19:31:58Z
Barkeep49
12837
new request
750435
wikitext
text/x-wiki
<!--@Bureaucrats: If you close this request as {{Done}} add {{Request-done|1=~~~~|2=Closing rationale}} to the top of the page. If you close it as {{Not done}}, add {{Request-not done|1=~~~~|2=Closing rationale}} there, then close with {{Request closed}}.-->
=== [[User:Barkeep49|Barkeep49]] ===
* {{User3|Barkeep49}}, [[Special:CentralAuth/Barkeep49|global contribs]] 16:52, 23 March 2025 (UTC)
* '''Motive for request:''' I am enwiki crat who has developed a script to help promote admins on enwiki. I have done work throught the script and need to test that it remains functional.
* '''Requested rights:''' Bureaucrat<!-- Please include the rights requested (example: Administrator, Bureaucrat, etc.) -->
* '''Comments:''' <!-- Comments of other users -->
<!-- DO NOT FORGET to transclude your request at THE TOP of [[Wikipedia:Requests/Permissions]] or nobody will see it! -->
[[Category:!Requests]]
[[Category:Really big category]]
__NOINDEX__
cbhxezn5o15uy9iz3t3xttk23ewllh0
750436
750435
2026-07-07T19:32:09Z
Barkeep49
12837
sig
750436
wikitext
text/x-wiki
<!--@Bureaucrats: If you close this request as {{Done}} add {{Request-done|1=~~~~|2=Closing rationale}} to the top of the page. If you close it as {{Not done}}, add {{Request-not done|1=~~~~|2=Closing rationale}} there, then close with {{Request closed}}.-->
=== [[User:Barkeep49|Barkeep49]] ===
* {{User3|Barkeep49}}, [[Special:CentralAuth/Barkeep49|global contribs]] 16:52, 23 March 2025 (UTC)
* '''Motive for request:''' I am enwiki crat who has developed a script to help promote admins on enwiki. I have done work throught the script and need to test that it remains functional. Thanks and best, [[User:Barkeep49|Barkeep49]] ([[User talk:Barkeep49|talk]]) 19:32, 7 July 2026 (UTC)
* '''Requested rights:''' Bureaucrat<!-- Please include the rights requested (example: Administrator, Bureaucrat, etc.) -->
* '''Comments:''' <!-- Comments of other users -->
<!-- DO NOT FORGET to transclude your request at THE TOP of [[Wikipedia:Requests/Permissions]] or nobody will see it! -->
[[Category:!Requests]]
[[Category:Really big category]]
__NOINDEX__
ih7rs3phd2ztz52k21m53nw8gyh8d4p
750445
750436
2026-07-07T19:42:25Z
Barras
6527
750445
wikitext
text/x-wiki
{{Request-done|1=[[User:Barras|<span style="color:blue; font-family:Bookman Old Style">'''Barras'''</span>]] [[User Talk:Barras|<span style="color:red; font-family:Bookman Old Style">'''talk'''</span>]] 19:42, 7 July 2026 (UTC)|2=Legit request. }}
<!--@Bureaucrats: If you close this request as {{Done}} add {{Request-done|1=~~~~|2=Closing rationale}} to the top of the page. If you close it as {{Not done}}, add {{Request-not done|1=~~~~|2=Closing rationale}} there, then close with {{Request closed}}.-->
=== [[User:Barkeep49|Barkeep49]] ===
* {{User3|Barkeep49}}, [[Special:CentralAuth/Barkeep49|global contribs]] 16:52, 23 March 2025 (UTC)
* '''Motive for request:''' I am enwiki crat who has developed a script to help promote admins on enwiki. I have done work throught the script and need to test that it remains functional. Thanks and best, [[User:Barkeep49|Barkeep49]] ([[User talk:Barkeep49|talk]]) 19:32, 7 July 2026 (UTC)
* '''Requested rights:''' Bureaucrat<!-- Please include the rights requested (example: Administrator, Bureaucrat, etc.) -->
* '''Comments:''' <!-- Comments of other users -->
<!-- DO NOT FORGET to transclude your request at THE TOP of [[Wikipedia:Requests/Permissions]] or nobody will see it! -->
[[Category:!Requests]]
[[Category:Really big category]]
__NOINDEX__
{{Request closed}}
2k4m4zkrth31z6cnehlv57jfs2hmvuv
User:Iiirxs/Starter kit/Wb87
2
176904
750468
2026-07-08T07:42:46Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750468
wikitext
text/x-wiki
<div style="text-align: center; font-family: 'Linux Libertine', Georgia, Times, serif; margin: 1.5em 0;">
<span style="font-size: 2.3em; line-height: 1.2;">Welcome to {{#language:{{PAGELANGUAGE}}}} Wikipedia</span><br/>
<span style="font-size: 1.1em; color: #54595d;">The free encyclopedia that anyone can edit</span><br/>
<span style="font-size: 0.95em; color: #72777d; margin-top: 0.5em; display: inline-block;">{{NUMBEROFACTIVEUSERS}} active editors • '''{{NUMBEROFARTICLES}}''' articles in this {{SITENAME}}</span>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
2gaz0l1265uxned195lmw3a6r0oocxa
User:Iiirxs/Starter kit/Cc87
2
176905
750469
2026-07-08T07:43:27Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750469
wikitext
text/x-wiki
<templatestyles src="User:Iiirxs/Starter kit/Content categories/styles.css" />
<div class="skit-catnav">
<div class="skit-catnav__item">Arts & Literature</div>
<div class="skit-catnav__item">Countries & Geography</div>
<div class="skit-catnav__item">Science & Technology</div>
<div class="skit-catnav__item">History & Events</div>
<div class="skit-catnav__item">Requested Articles</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
tnv7jb24i5u0fsqux6naqc9dd7zmld2
User:Iiirxs/Starter kit/Cc870
2
176906
750470
2026-07-08T07:45:21Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750470
wikitext
text/x-wiki
<templatestyles src="User:Iiirxs/Starter kit/Content categories/styles.css" />
<div class="skit-catnav">
<div class="skit-catnav__item">Arts & Literature</div>
<div class="skit-catnav__item">Countries & Geography</div>
<div class="skit-catnav__item">Science & Technology</div>
<div class="skit-catnav__item">History & Events</div>
<div class="skit-catnav__item">Requested Articles</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
tnv7jb24i5u0fsqux6naqc9dd7zmld2
User:Iiirxs/Starter kit/Cc872
2
176907
750471
2026-07-08T07:46:16Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750471
wikitext
text/x-wiki
<templatestyles src="User:Iiirxs/Starter kit/Content categories/styles.css" />
<div class="skit-catnav">
<div class="skit-catnav__item">Arts & Literature</div>
<div class="skit-catnav__item">Countries & Geography</div>
<div class="skit-catnav__item">Science & Technology</div>
<div class="skit-catnav__item">History & Events</div>
<div class="skit-catnav__item">Requested Articles</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
tnv7jb24i5u0fsqux6naqc9dd7zmld2
User:Iiirxs/Starter kit/wb873
2
176908
750472
2026-07-08T09:41:57Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750472
wikitext
text/x-wiki
<div style="text-align: center; font-family: 'Linux Libertine', Georgia, Times, serif; margin: 1.5em 0;">
<span style="font-size: 2.3em; line-height: 1.2;">Welcome to {{#language:{{PAGELANGUAGE}}}} Wikipedia</span><br/>
<span style="font-size: 1.1em; color: #54595d;">The free encyclopedia that anyone can edit</span><br/>
<span style="font-size: 0.95em; color: #72777d; margin-top: 0.5em; display: inline-block;">{{NUMBEROFACTIVEUSERS}} active editors • '''{{NUMBEROFARTICLES}}''' articles in this {{SITENAME}}</span>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
2gaz0l1265uxned195lmw3a6r0oocxa
User:Iiirxs/Starter kit/cc873
2
176909
750473
2026-07-08T09:42:07Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750473
wikitext
text/x-wiki
<templatestyles src="Starter kit/Content categories/styles.css" />
<div class="skit-catnav">
<div class="skit-catnav__item">Arts & Literature</div>
<div class="skit-catnav__item">Countries & Geography</div>
<div class="skit-catnav__item">Science & Technology</div>
<div class="skit-catnav__item">History & Events</div>
<div class="skit-catnav__item">Requested Articles</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
g7jh6h6wsq5nq2hbq0nb4xqr0ebtqxe
Template:Starter kit/Content categories/styles.css
10
176910
750474
2026-07-08T09:42:09Z
Iiirxs
49827
Initialised by StarterKit tool (TemplateStyles)
750474
sanitized-css
text/css
/* Category navigation bar — generated by the StarterKit tool. */
.skit-catnav {
display: flex;
flex-wrap: wrap;
gap: 1px;
margin: 10px 0;
background: #fff;
box-shadow: 0 1px 1px rgba( 0, 0, 0, 0.1 );
font-size: 0.9em;
}
.skit-catnav__item {
flex: 1 1 140px;
padding: 3px 0.25em;
text-align: center;
}
.skit-catnav__item:nth-child( 5n + 1 ) { background: #f9f9f0; border-top: 5px solid #999933; }
.skit-catnav__item:nth-child( 5n + 2 ) { background: #f4f9f0; border-top: 5px solid #669933; }
.skit-catnav__item:nth-child( 5n + 3 ) { background: #f0f9f9; border-top: 5px solid #339999; }
.skit-catnav__item:nth-child( 5n + 4 ) { background: #f9f0f9; border-top: 5px solid #993399; }
.skit-catnav__item:nth-child( 5n + 5 ) { background: #f9f0f0; border-top: 5px solid #993333; }
2jaj5u7qo3s8ir5e5xna4mvnts6hbvo
User:Iiirxs/Starter kit/fa873
2
176911
750475
2026-07-08T09:42:23Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750475
wikitext
text/x-wiki
<div style="display: flow-root; border:1px solid #cef2e0;border-radius:4px;padding:8px;background:#f5fffa;margin-bottom:2px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #a3bfb1;border-radius:4px;background:#cef2e0;">'''Featured article'''</div>
<!-- Add a short excerpt from any well-written article on your wiki.
No need to update daily — refresh when a new article is ready.
To add an image: [[File:Filename.jpg|112px|left|alt=description]] -->
Add article title here – Add a short excerpt here (2–3 sentences). Introduce the topic clearly so readers want to learn more.
<!-- Replace "Full article..." below with: [[Article name|Full article...]] -->
<small>(Full article...)</small>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
87p1q0jeb8rfvmpsag69upwn6r6ws51
User:Iiirxs/Starter kit/itn873
2
176912
750476
2026-07-08T09:42:44Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750476
wikitext
text/x-wiki
<div style="display: flow-root; border:1px solid #cedff2;border-radius:4px;padding:8px;background:#f5faff;margin-bottom:2px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #a3b0bf;border-radius:4px;background:#cedff2;">'''In the news'''</div>
<!-- Add recent events or news relevant to your community or topic area.
No need to update daily — refresh when something noteworthy happens.
To add an image: [[File:Filename.jpg|64px|right|alt=description]] -->
* Add a recent event or news item and link to a relevant article here.
* Add a recent event or news item and link to a relevant article here.
* Add a recent event or news item and link to a relevant article here.
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
cbe53ipg70fxuemrvvszrqqx7sth49v
User:Iiirxs/Starter kit/dyk873
2
176913
750477
2026-07-08T09:43:51Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750477
wikitext
text/x-wiki
<div style="display: flow-root; border:1px solid #cef2e0;border-radius:4px;padding:8px;background:#f5fffa;margin-bottom:2px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #a3bfb1;border-radius:4px;background:#cef2e0;">'''Did you know ...'''</div>
<!-- Update with 3–5 interesting facts from recently created or expanded articles.
No need to update daily — refresh when new articles are added.
To add an image: [[File:Filename.jpg|80px|left|alt=description]] -->
* ... that add an interesting fact and link to a relevant article here?
* ... that add an interesting fact and link to a relevant article here?
* ... that add an interesting fact and link to a relevant article here?
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
9edp7vp4p83eig6ls3w6d61u8zw51xx
User:Iiirxs/Starter kit/otd873
2
176914
750478
2026-07-08T09:44:03Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750478
wikitext
text/x-wiki
<div style="display: flow-root; border:1px solid #cedff2;border-radius:4px;padding:8px;background:#f5faff;margin-bottom:2px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #a3b0bf;border-radius:4px;background:#cedff2;">'''On this day'''</div>
<!-- Add 2–3 historical events relevant to your community or topic area.
No need to update daily — refresh occasionally as your wiki grows.
To add an image: [[File:Filename.jpg|80px|right|alt=description]] -->
Add a date here
* Add a historical event and link to a relevant article here.
* Add a historical event and link to a relevant article here.
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
4p7vktxyt5mhesvw4qyfpmxvvi2qijs
User:Iiirxs/Starter kit/fp873
2
176915
750479
2026-07-08T09:44:16Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750479
wikitext
text/x-wiki
<div style="display: flow-root; border:1px solid #ddcef2;border-radius:4px;padding:8px;background:#faf5ff;margin-top:4px;">
<div style="padding:4px 12px;margin-bottom:8px;border:1px solid #afa3bf;border-radius:4px;background:#ddcef2;">'''Featured picture'''</div>
<!-- Add any image that represents your wiki well — from Commons or locally uploaded.
No need to update daily — refresh whenever a good image is available.
To add the image: [[File:Filename.jpg|320px|left|alt=description]] -->
Add image title here
Add a description of the image here (2–3 sentences).
<small>''Credit: Add photographer or source credit here''</small>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
oyggvmjszbcayipcna8ezh73x5cwbdz
User:Iiirxs/Starter kit/cr873
2
176916
750480
2026-07-08T09:44:30Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750480
wikitext
text/x-wiki
<div style="border:1px solid #CBD5E1;border-radius:4px;background:white;overflow:hidden;margin-bottom:2px;">
<div style="background:#F1F5F9;border-bottom:1px solid #CBD5E1;padding:8px 16px;">'''Community resources'''</div>
<div style="padding:16px;">
<!-- Add links to pages that help your community connect and collaborate.
Replace each placeholder below with a real page, or remove lines that don't apply yet. -->
* Add a link to a discussion venue where the community can talk about the wiki.
* Add a link to a welcome or help page for new editors.
* Add a link to an upcoming or recurring community event.
* Add a link to any other community resource relevant to your wiki.
</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
9qpbhbxyfrphef8hiaacfno4y7tohtc
User:Iiirxs/Starter kit/tr873
2
176917
750481
2026-07-08T09:44:47Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750481
wikitext
text/x-wiki
<div style="border:1px solid #CBD5E1;border-radius:4px;background:white;overflow:hidden;margin-bottom:2px;">
<div style="background:#F1F5F9;border-bottom:1px solid #CBD5E1;padding:8px 16px;">'''Translation resources'''</div>
<div style="padding:16px;">
<!-- Edit: replace placeholder items with real pages once they exist on your wiki.
Add or remove items as your community grows. -->
* Translate the most-used interface messages for your wiki on [https://translatewiki.net/w/i.php?title=Special:Translate&group=core-mostused&language=<!--LANGUAGE_CODE--> Translatewiki.net] - The essential messages that power your wiki's interface.
* [https://en.wikipedia.org/wiki/Wikipedia:Five_pillars Wikipedia's Five Pillars] - The core principles of Wikipedia. Translate these into your language as a starting point for your wiki's policies.
* [https://meta.wikimedia.org/wiki/List_of_articles_every_Wikipedia_should_have 1,000 articles every Wikipedia should have] - A list of essential topics and a great guide for deciding what to write first.
* Add a link to a translation guide or resource relevant to your community.
</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
9otl2wtitymgbojg52quzf5se6sxb60
User:Iiirxs/Starter kit/wsp873
2
176918
750482
2026-07-08T09:45:02Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750482
wikitext
text/x-wiki
<div style="border:1px solid #CBD5E1;border-radius:4px;background:#ffffff;overflow:hidden;margin-bottom:16px;">
<div style="background:#F8FAFC;border-bottom:1px solid #CBD5E1;padding:8px 16px;font-weight:bold;">Wikipedia's sister projects</div>
<div style="padding:16px;">
Wikipedia is written by volunteer editors and hosted by the [https://wikimediafoundation.org/ Wikimedia Foundation], a non-profit organization that also hosts a range of other volunteer [https://wikimediafoundation.org/our-work/wikimedia-projects/ projects]:
<ul style="list-style:none;margin:8px 0 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;">
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Commons-logo.svg|31px|link=https://commons.wikimedia.org/|alt=Commons logo]]<span>[https://commons.wikimedia.org/ Commons]<br/><small style="color:#555;">Free media repository</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:MediaWiki-2020-icon.svg|35px|link=https://www.mediawiki.org/|alt=MediaWiki logo]]<span>[https://www.mediawiki.org/ MediaWiki]<br/><small style="color:#555;">Wiki software development</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikimedia Community Logo.svg|35px|link=https://meta.wikimedia.org/|alt=Meta-Wiki logo]]<span>[https://meta.wikimedia.org/ Meta-Wiki]<br/><small style="color:#555;">Wikimedia project coordination</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikibooks-logo.svg|35px|link=https://www.wikibooks.org/|alt=Wikibooks logo]]<span>[https://www.wikibooks.org/ Wikibooks]<br/><small style="color:#555;">Free textbooks and manuals</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikidata-logo.svg|47px|link=https://www.wikidata.org/|alt=Wikidata logo]]<span>[https://www.wikidata.org/ Wikidata]<br/><small style="color:#555;">Free knowledge base</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikinews-logo.svg|51px|link=https://www.wikinews.org/|alt=Wikinews logo]]<span>[https://www.wikinews.org/ Wikinews]<br/><small style="color:#555;">Free-content news</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikiquote-logo.svg|35px|link=https://www.wikiquote.org/|alt=Wikiquote logo]]<span>[https://www.wikiquote.org/ Wikiquote]<br/><small style="color:#555;">Collection of quotations</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikisource-logo.svg|35px|link=https://www.wikisource.org/|alt=Wikisource logo]]<span>[https://www.wikisource.org/ Wikisource]<br/><small style="color:#555;">Free-content library</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikispecies-logo.svg|35px|link=https://species.wikimedia.org/|alt=Wikispecies logo]]<span>[https://species.wikimedia.org/ Wikispecies]<br/><small style="color:#555;">Directory of species</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikiversity logo 2017.svg|41px|link=https://www.wikiversity.org/|alt=Wikiversity logo]]<span>[https://www.wikiversity.org/ Wikiversity]<br/><small style="color:#555;">Free learning tools</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wikivoyage-Logo-v3-icon.svg|35px|link=https://www.wikivoyage.org/|alt=Wikivoyage logo]]<span>[https://www.wikivoyage.org/ Wikivoyage]<br/><small style="color:#555;">Free travel guide</small></span></li>
<li style="display:flex;align-items:center;gap:16px;padding:4px 0;">[[File:Wiktionary-logo-v2.svg|35px|link=https://www.wiktionary.org/|alt=Wiktionary logo]]<span>[https://www.wiktionary.org/ Wiktionary]<br/><small style="color:#555;">Dictionary and thesaurus</small></span></li>
</ul>
</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
sqqnlmlgl2eejn6h1edrw231bhol386
User:Iiirxs/Starter kit/wl873
2
176919
750483
2026-07-08T09:45:17Z
Iiirxs
49827
Initialised by StarterKit tool — ready for translation
750483
wikitext
text/x-wiki
<div style="border:1px solid #CBD5E1;border-radius:4px;background:#ffffff;overflow:hidden;">
<div style="background:#F8FAFC;border-bottom:1px solid #CBD5E1;padding:8px 16px;font-weight:bold;">Wikipedia languages</div>
<div style="padding:16px;">
Many [https://meta.wikimedia.org/wiki/List_of_Wikipedias other Wikipedias are available]; some of the largest are listed below.
<ul style="list-style:none;margin:8px 0 0 0;padding:0;">
<li style="margin-bottom:12px;">
<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px;">
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
<div style="font-weight:bold;white-space:nowrap;">1,000,000+ articles</div>
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
</div>
<div style="line-height:2;">
[https://ar.wikipedia.org/wiki/ العربية] ·
[https://de.wikipedia.org/wiki/ Deutsch] ·
[https://es.wikipedia.org/wiki/ Español] ·
[https://fa.wikipedia.org/wiki/ فارسی]‎ ·
[https://fr.wikipedia.org/wiki/ Français] ·
[https://it.wikipedia.org/wiki/ Italiano] ·
[https://nl.wikipedia.org/wiki/ Nederlands] ·
[https://ja.wikipedia.org/wiki/ 日本語] ·
[https://pl.wikipedia.org/wiki/ Polski] ·
[https://pt.wikipedia.org/wiki/ Português] ·
[https://ru.wikipedia.org/wiki/ Русский] ·
[https://sv.wikipedia.org/wiki/ Svenska] ·
[https://uk.wikipedia.org/wiki/ Українська] ·
[https://vi.wikipedia.org/wiki/ Tiếng Việt] ·
[https://zh.wikipedia.org/wiki/ 中文]
</div>
</li>
<li style="margin-bottom:12px;">
<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px;">
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
<div style="font-weight:bold;white-space:nowrap;">250,000+ articles</div>
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
</div>
<div style="line-height:2;">
[https://id.wikipedia.org/wiki/ Bahasa Indonesia] ·
[https://ms.wikipedia.org/wiki/ Bahasa Melayu] ·
[https://nan.wikipedia.org/wiki/ 閩南語] ·
[https://bg.wikipedia.org/wiki/ Български] ·
[https://ca.wikipedia.org/wiki/ Català] ·
[https://cs.wikipedia.org/wiki/ Čeština] ·
[https://da.wikipedia.org/wiki/ Dansk] ·
[https://et.wikipedia.org/wiki/ Eesti] ·
[https://el.wikipedia.org/wiki/ Ελληνικά] ·
[https://eo.wikipedia.org/wiki/ Esperanto] ·
[https://eu.wikipedia.org/wiki/ Euskara] ·
[https://he.wikipedia.org/wiki/ עברית] ·
[https://hy.wikipedia.org/wiki/ Հայերեն] ·
[https://ko.wikipedia.org/wiki/ 한국어] ·
[https://hu.wikipedia.org/wiki/ Magyar] ·
[https://no.wikipedia.org/wiki/ Norsk] ·
[https://ro.wikipedia.org/wiki/ Română] ·
[https://simple.wikipedia.org/wiki/ Simple English] ·
[https://sk.wikipedia.org/wiki/ Slovenčina] ·
[https://sr.wikipedia.org/wiki/ Српски] ·
[https://sh.wikipedia.org/wiki/ Srpskohrvatski] ·
[https://fi.wikipedia.org/wiki/ Suomi] ·
[https://tr.wikipedia.org/wiki/ Türkçe] ·
[https://uz.wikipedia.org/wiki/ Oʻzbek]
</div>
</li>
<li style="margin-bottom:4px;">
<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px;">
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
<div style="font-weight:bold;white-space:nowrap;">50,000+ articles</div>
<div style="flex:1;height:1px;background:#CBD5E1;"></div>
</div>
<div style="line-height:2;">
[https://ast.wikipedia.org/wiki/ Asturianu] ·
[https://az.wikipedia.org/wiki/ Azərbaycanca] ·
[https://bn.wikipedia.org/wiki/ বাংলা] ·
[https://bs.wikipedia.org/wiki/ Bosanski] ·
[https://ckb.wikipedia.org/wiki/ کوردی] ·
[https://fy.wikipedia.org/wiki/ Frysk] ·
[https://ga.wikipedia.org/wiki/ Gaeilge] ·
[https://gl.wikipedia.org/wiki/ Galego] ·
[https://hr.wikipedia.org/wiki/ Hrvatski] ·
[https://ka.wikipedia.org/wiki/ ქართული] ·
[https://ku.wikipedia.org/wiki/ Kurdî] ·
[https://lv.wikipedia.org/wiki/ Latviešu] ·
[https://lt.wikipedia.org/wiki/ Lietuvių] ·
[https://ml.wikipedia.org/wiki/ മലയാളം] ·
[https://mk.wikipedia.org/wiki/ Македонски] ·
[https://my.wikipedia.org/wiki/ မြန်မာဘာသာ] ·
[https://nn.wikipedia.org/wiki/ Norsk nynorsk] ·
[https://pa.wikipedia.org/wiki/ ਪੰਜਾਬੀ] ·
[https://sq.wikipedia.org/wiki/ Shqip] ·
[https://sl.wikipedia.org/wiki/ Slovenščina] ·
[https://th.wikipedia.org/wiki/ ไทย] ·
[https://te.wikipedia.org/wiki/ తెలుగు] ·
[https://ur.wikipedia.org/wiki/ اردو]
</div>
</li>
</ul>
</div>
</div>
<noinclude>[[Category:Starter kit templates]]</noinclude>
qfil1o4vm3tqidfgmg9xjryqel5ppoz